如何解决spring mvc org.springframework.security错误?

时间:2015-02-20 23:53:06

标签: spring maven spring-mvc spring-security maven-plugin

当我尝试在我的pom.xml中添加这个2 Dependency时,它会在pom.xml文件中出错。

    

    1)org.springframework.security:spring-security-taglibs:3.2.8.RELEASE     2)org.springframework.security:spring-security-config:3.2.8.RELEASE     

我遇到这个错误:     

缺少工件org.springframework.security:spring-security-taglibs:jar:3.2.8.RELEASE     

和     

缺少工件org.springframework.security:spring-security-config:jar:3.2.8.RELEASE     

我该如何解决它。     

1 个答案:

答案 0 :(得分:1)

当前版本的Spring Security是3.2.5.RELEASE

这样做:

<properties>
    <spring.security.version>3.2.5.RELEASE</spring.security.version>
</properties>

<dependencies>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-taglibs</artifactId>
        <version>${spring.security.version}</version>
    </dependency>

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

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

    ...

</dependencies>