Sample Project for building RESTful Web Services using Apache Shiro 1.2.3, JBoss RestEasy 3 and Google Guice 3 with Asynchronous HTTP Request Processing support.
- Servlet 3.1.0 (http://java.net/projects/servlet-spec/pages/Home)
- JBoss RestEasy 3.0.9.Final (http://resteasy.jboss.org)
- Guice 3.0 (http://github.com/google/guice)
- Apache Shiro 1.2.3 (http://shiro.apache.org)
- gson 2.2.4 (http://code.google.com/p/google-gson/)
- joda-time 2.4 (http://www.joda.org/joda-time/)
- JUnit 4.10 (http://junit.org/)
- Jukito 1.4 (http://github.com/ArcBees/Jukito)
- Logback + SLF4J XLogger (http://logback.qos.ch)
- Java 8
- Maven 3
- Application Server (Tomcat 9(?), Jetty 9 Recommended)
- Make the war file
mvn clean package
- Deploy the war file in Tomcat with Eclipse or manually
- The REST WS are accessible under /*
- Front-End not yet implemented.
- You can run the application with Jetty via Maven doing
mvn jetty:run
- The application gets deployed by default in http://localhost:8080/shiro-guice-async-webapp
- Generate an archetype:
mvn archetype:create-from-project
- Go to
target/generated-sources/archetype
and runmvn install
- Create a fresh project from Archetype
mvn archetype:generate -DarchetypeCatalog=local
usingcom.pampanet:shiro-guice-async-webapp
- You can select the archetype from Eclipse IDE from the "New Maven Project" Wizard
- Shiro's Default Filters: http://shiro.apache.org/web.html#Web-DefaultFilters
- In
com.pampanet.sample.shiro.modules.BootstrapShiroModule
are all the filters, placed in order. - You can replace
com.pampanet.sample.shiro.modules.ShiroAnnotationsModule
with Shiro's defaultShiroAopModule
class.
- Sample
shiro.ini
file insrc/main/resources
- To configure more Realms and Filters, refer to Shiro's Documentation https://shiro.apache.org/static/current/apidocs/org/apache/shiro/realm/Realm.html
- Servlet 4 Push API
- Wiki
- More Code Coverage
- More stuff...