Quantcast
Channel: BTSoru.com - Bilisim ve Yazilim Teknolojileri Soru/Cevap Platformu - latest questions
Viewing all articles
Browse latest Browse all 4270

Spring Security Ve PostgreSql İle Yetkilendirme Sorunu

$
0
0

Spring Security ile PostgreSql'i birlikte kullanmak istiyorum. Şöyle bir kodum var:

<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="org.postgresql.Driver" />
    <property name="url" value="jdbc:postgresql://localhost:5432/HospitalAutomation" />
    <property name="username" value="ilkay" />
    <property name="password" value="12345" />
</bean>
<security:authentication-manager>

    <security:authentication-provider>
        <security:password-encoder hash="md5"/>
        <security:jdbc-user-service data-source-ref="dataSource"
                                    users-by-username-query="select username, password, enabled from kullanicilar where username=?"
                                    authorities-by-username-query="select u.username, r.role from kullanicilar u, user_roles r
                                        where u.username = r.kullanici and u.username =?"/>
    </security:authentication-provider>
</security:authentication-manager>

Bu kod ile yetkilendirme mekanizması için çalışıyorum. MySql Select Where'de '' ve "" lar arası ayrım yapmazken PostgreSql sadece ' ' ile veri çekilmesine izin veriyor. Sorun sizce de buradan kaynaklı mı? Çözümü ne olabilir?


Viewing all articles
Browse latest Browse all 4270