spring security maven dependency

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring security maven dependency相关的知识,希望对你有一定的参考价值。

Unable to locate Spring NamespaceHandler for XML schema namespace [

spring secutity dependency:

        <!-- Spring Security -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>${springsecurity.version}</version>
        </dependency>
  
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>${springsecurity.version}</version>
        </dependency>
  
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>${springsecurity.version}</version>
        </dependency>

或者:

        <!-- spring security -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>${springsecurity.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>${springsecurity.version}</version>
        </dependency>

包含spring-security-web会自动下载spring-security-core。

 

不可缺少spring-security-config,因为其包含xsd文件,缺少该artifactId会报Unable to locate Spring NamespaceHandler for XML schema namespace的错。

以上是关于spring security maven dependency的主要内容,如果未能解决你的问题,请参考以下文章

Maven Repository 上 4.1.1 中的 spring-security-web 在哪里?

spring-security

spring security4.2.2的maven配置+spring-security配置详解+java源码+数据库设计

在简单的 Maven 项目中找不到依赖 spring-boot-starter-security

spring security demo

用于解决对 Spring + Spring Data + Spring Security 的依赖关系的 Maven BOM?