1. 程式人生 > >SpringMVC+Shiro許可權管理

SpringMVC+Shiro許可權管理

  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  2.   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">  
  3.   <modelVersion>4.0.0</modelVersion>  
  4.   <groupId>com.hyx</groupId>  
  5.   <artifactId>springmvc</artifactId>  
  6.   <packaging>war</packaging>  
  7.   <version>0.0.1-SNAPSHOT</version>  
  8.   <name>springmvc Maven Webapp</name>  
  9.   <url>http://maven.apache.org</url>  
  10.   <dependencies>  
  11.     <dependency>  
  12.       <groupId>junit</groupId>  
  13.       <artifactId>junit</artifactId>  
  14.       <version>3.8.1</version>  
  15.       <scope>test</scope>  
  16.     </dependency>  
  17.     <!-- SpringMVC核心jar -->  
  18.     <dependency>  
  19.         <groupId>org.springframework</groupId>  
  20.         <artifactId>spring-webmvc</artifactId>  
  21.         <version>3.2.4.RELEASE</version>  
  22.     </dependency>  
  23.     <!-- springmvc連線資料庫需要的jar -->  
  24.     <dependency>  
  25.         <groupId>org.springframework</groupId>  
  26.         <artifactId>spring-jdbc</artifactId>  
  27.         <version>3.2.4.RELEASE</version>  
  28.     </dependency>  
  29.     <dependency>  
  30.         <groupId>org.springframework</groupId>  
  31.         <artifactId>spring-orm</artifactId>  
  32.         <version>3.2.4.RELEASE</version>  
  33.     </dependency>  
  34.     <!-- ************************************ -->  
  35.     <!-- Hibernate相關jar -->  
  36.     <dependency>  
  37.         <groupId>org.hibernate</groupId>  
  38.         <artifactId>hibernate-core</artifactId>  
  39.         <version>4.2.5.Final</version>  
  40.     </dependency>  
  41.     <dependency>  
  42.         <groupId>org.hibernate</groupId>  
  43.         <artifactId>hibernate-ehcache</artifactId>  
  44.         <version>4.2.5.Final</version>  
  45.     </dependency>  
  46.     <dependency>  
  47.         <groupId>net.sf.ehcache</groupId>  
  48.         <artifactId>ehcache</artifactId>  
  49.         <version>2.7.2</version>  
  50.     </dependency>  
  51.     <dependency>  
  52.         <groupId>commons-dbcp</groupId>  
  53.         <artifactId>commons-dbcp</artifactId>  
  54.         <version>1.4</version>  
  55.     </dependency>  
  56.     <dependency>  
  57.         <groupId>mysql</groupId>  
  58.         <artifactId>mysql-connector-java</artifactId>  
  59.         <version>5.1.26</version>  
  60.     </dependency>  
  61.     <!-- javax提供的annotation -->  
  62.     <dependency>  
  63.         <groupId>javax.inject</groupId>  
  64.         <artifactId>javax.inject</artifactId>  
  65.         <version>1</version>  
  66.     </dependency>          
  67.     <!-- **************************** -->  
  68.     <!-- hibernate驗證 -->  
  69.     <dependency>  
  70.         <groupId>org.hibernate</groupId>  
  71.         <artifactId>hibernate-validator</artifactId>  
  72.         <version>5.0.1.Final</version>  
  73.     </dependency>  
  74.     <!-- 用於對@ResponseBody註解的支援 -->  
  75.     <dependency>  
  76.         <groupId>org.codehaus.jackson</groupId>  
  77.         <artifactId>jackson-mapper-asl</artifactId>  
  78.         <version>1.9.13</version>  
  79.     </dependency>          
  80.     <!-- 提供對c標籤的支援 -->  
  81.     <dependency>  
  82.         <groupId>javax.servlet</groupId>  
  83.         <artifactId>jstl</artifactId>  
  84.         <version>1.2</version>  
  85.     </dependency>  
  86.     <!-- servlet api -->  
  87.     <dependency>  
  88.       <groupId>javax.servlet</groupId>  
  89.       <artifactId>servlet-api</artifactId>  
  90.       <version>2.5</version>  
  91.     </dependency>  
  92.     <!--Apache Shiro所需的jar包-->    
  93.     <dependency>    
  94.       <groupId>org.apache.shiro</groupId>    
  95.       <artifactId>shiro-core</artifactId>    
  96.       <version>1.2.2</version>    
  97.     </dependency>    
  98.     <dependency>    
  99.       <groupId>org.apache.shiro</groupId>    
  100.       <artifactId>shiro-web</artifactId>    
  101.       <version>1.2.2</version>    
  102.     </dependency>    
  103.     <dependency>    
  104.       <groupId>org.apache.shiro</groupId>    
  105.       <artifactId>shiro-spring</artifactId>    
  106.       <version>1.2.2</version>    
  107.     </dependency>   
  108.   </dependencies>  
  109.   <build>  
  110.     <finalName>springmvc</finalName>  
  111.     <!-- maven的jetty伺服器外掛 -->  
  112.     <plugins>  
  113.         <plugin>  
  114.           <groupId>org.mortbay.jetty</groupId>  
  115.           <artifactId>jetty-maven-plugin</artifactId>  
  116.           <configuration>  
  117.             <scanIntervalSeconds>10</scanIntervalSeconds>  
  118.             <webApp>  
  119.               <contextPath>/</contextPath>  
  120.             </webApp>  
  121.             <!-- 修改jetty的預設埠 -->  
  122.             <connectors>  
  123.                <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">  
  124.                   <port>80</port>  
  125.                   <maxIdleTime>60000</maxIdleTime>  
  126.                </connector>  
  127.             </connectors>  
  128.           </configuration>  
  129.         </plugin>  
  130.     </plugins>  
  131.   </build>  
  132. </project>