Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 1.56 KB

File metadata and controls

48 lines (42 loc) · 1.56 KB

shiro-guice-resteasy-webapp-archtype

Maven Archetype for Building RESTful Web Services using Apache Shiro 1.2.3, JBoss RestEasy 3 and Google Guice 3

Dependencies included

  • Servlet 2.5
  • JBoss RestEasy 3.0.9.Final
  • Guice 3.0
  • Apache Shiro 1.2.3
  • guice-persist 3.0
  • gson 2.2.4
  • joda-time 2.4
  • JUnit 4.10

Requirements

  • Java 7
  • Maven 3
  • Application Server (Tomcat, JBoss/WildFly or Jetty)

Building and Running

#!/bin/bash
### Install the Archetype in your local Maven Repo 
mvn install
### Create a New Maven Project from command line:
mvn archetype:generate -DarchetypeGroupId=com.pampanet \ 
  -DarchetypeArtifactId=shiro-guice-resteasy-webapp-archetype \ 
  -DarchetypeVersion=0.1.0-RELEASE \ 
  -DgroupId=<my.company.name> \ 
  -DartifactId=<sample> \ 
  -DarchetypeRepository=local \ 
  -DinteractiveMode=false

Apache Shiro Filters

  • 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 default ShiroAopModule class.

Apache Shiro Users Configuration