-
-
Save redmoon512/4f43b39001cae05b9db060a4552986ae to your computer and use it in GitHub Desktop.
example jdbcRealm configured in shiro.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [main] | |
| ds = com.mysql.jdbc.Driver | |
| ds.serverName = localhost | |
| ds.user = user | |
| ds.password = password | |
| ds.databaseName = db_name | |
| jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm | |
| jdbcRealm.dataSource = $ds | |
| jdbcRealm.permissionsLookupEnabled = true | |
| jdbcRealm.authenticationQuery = "SELECT password FROM users WHERE user_name = ?" | |
| jdbcRealm.userRolesQuery = "SELECT role_name FROM user_rolesWHERE user_name = ?" | |
| jdbcRealm.permissionsQuery = "SELECT permission FROM roles_permissions WHERE role_name = ?" | |
| authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter | |
| authc.loginUrl = /login/ | |
| [urls] | |
| /login/ = authc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment