https://github.com/jjoe64/shiroexample
apache shiro with hibernate example project
https://github.com/jjoe64/shiroexample
Last synced: 9 days ago
JSON representation
apache shiro with hibernate example project
- Host: GitHub
- URL: https://github.com/jjoe64/shiroexample
- Owner: jjoe64
- Created: 2014-02-27T06:07:32.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-04T06:01:57.000Z (about 11 years ago)
- Last Synced: 2025-03-27T13:11:22.509Z (27 days ago)
- Language: Java
- Homepage: http://www.jjoe64.com/2014/01/apache-shiro-with-hibernatesql-full.html
- Size: 148 KB
- Stars: 11
- Watchers: 4
- Forks: 29
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
== Apache Shiro Web App Example project from my blog post
Read the full tutorial at
http://www.jjoe64.com/2014/01/apache-shiro-with-hibernatesql-full.html== Create the database schema
To run this example you have to create the mysql database schema
described at the blog post.To test the admin-permission example, ensure to create this entity
in the RolesPermission table:
> INSERT INTO `RolesPermission` VALUES (1,'admin:access','admin');Alternativly you can import the sql-dump file (dump.sql).
== Set the mysql config
You have to set the mysql username, password and database name in
this files:
* src/hibernate.cfg.xml
* WebContent/WEB-INF/shiro.ini== Run example
* Register servlet
http://localhost:8080/shiroexample/register
* Login servlet
http://localhost:8080/shiroexample/login
* Protected area / only accessable for registered users
http://localhost:8080/shiroexample/hello
* Only for admin users
http://localhost:8080/shiroexample/admin