Hi Les,
I follow some docs, and write this in shiro.ini

*[main]*
*jdbcRealm* = org.apache.*shiro*.realm.jdbc.*JdbcRealm*
*jdbcRealm*.authenticationQuery = "SELECT password FROM users WHERE
user_name = ?"
ds = org.Postgresql.Driver
ds.serverName = IP
ds.user = user
ds.password = pass
ds.databaseName = DATABASE
jdbcRealm.dataSource = $ds

But ds.serverName does not exist.
I have to change anything?
Thanks

2011/8/16 Les Hazlewood <[email protected]>

> Hi Fabricio,
>
> Look at the JdbcRealm's implementation here:
>
>
> http://svn.apache.org/repos/asf/shiro/trunk/core/src/main/java/org/apache/shiro/realm/jdbc/JdbcRealm.java
>
> and notice the *_QUERY constants.  For testing, you can make your
> tables structured so that the queries will work for you.  But mostly
> they are there as a default and to give you ideas.
>
> Usually, you will create database tables as necessary and call the
> set*Query(String query) methods to match your database schema.
>
> HTH,
>
> --
> Les Hazlewood
> CTO, Katasoft | http://www.katasoft.com | 888.391.5282
> twitter: @lhazlewood | http://twitter.com/lhazlewood
> katasoft blog: http://www.katasoft.com/blogs/lhazlewood
> personal blog: http://leshazlewood.com
>

Reply via email to