zoukankan      html  css  js  c++  java
  • 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依赖由于无法下载,索性注释掉。

  • 相关阅读:
    Android应用视觉效果设计技巧
    Android实现图片缩放与旋转
    schema 对象的简单介绍
    Index Scans 索引扫描
    Oracle Database Transaction Isolation Levels 事务隔离级别
    第一篇博客,纪念一下,终于开通啦!
    Linux 开机引导流程
    springBoot中tomcat默认端口修改
    面向服务架构之RPC原理与实例
    vs2008中xlslib与libxls库的编译及使用
  • 原文地址:https://www.cnblogs.com/timingstarts/p/12731407.html
Copyright © 2011-2022 走看看