Maven导入shiro的依赖后,欢迎页面404、shiro-features异常的解决方案:
自己练习shiro的时候,导入shiro官网的全部依赖,发现有两个依赖在项目里会造成某些异常。
以下时shiro官方提供的全部依赖,但是有两个最好注释掉:
<!-- shiro相关的所有依赖等同于shiro-all --> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-core</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-web</artifactId> <version>1.5.2</version> </dependency> <!-- <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-servlet-plugin</artifactId> <version>1.5.2</version> </dependency> --> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-jaxrs</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-aspectj</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-cas</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-ehcache</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-hazelcast</artifactId> <version>1.5.2</version> </dependency> <!--<dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-features</artifactId> <version>1.5.2</version> </dependency> --> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-guice</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-quartz</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring</artifactId> <version>1.5.2</version> </dependency> <!--<dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring-boot-starter</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring-boot-web-starter</artifactId> <version>1.5.2</version> </dependency> -->
springboot的依赖就不说了,这里用maven项目。
其中造成异常的两个pom依赖:
shiro-servlet-plugin依赖会造成欢迎页面404,shiro-features依赖由于无法下载,索性注释掉。
相关推荐
xclxcl 2020-08-03
zmzmmf 2020-08-03
likesyour 2020-08-01
杜鲁门 2020-11-05
luckyxl0 2020-08-16
Dullonjiang 2020-08-09
MicroBoy 2020-08-02
ganjing 2020-08-02
zmzmmf 2020-07-09
MicroBoy 2020-07-05
zzhao 2020-06-26
子云 2020-06-18
visionzheng 2020-06-07
neweastsun 2020-06-04
ErixHao 2020-06-03
GDreams0 2020-06-01
ganjing 2020-05-29
zmzmmf 2020-05-28
nullcy 2020-05-26