Eclipse 弹簧注释don';添加Spring安全库(Maven)后无法工作

Eclipse 弹簧注释don';添加Spring安全库(Maven)后无法工作,eclipse,spring,maven,dependencies,Eclipse,Spring,Maven,Dependencies,我将Spring MVC应用程序(3.2.5)中的Spring安全库(3.1.4版)添加到pom.xml中,以使用Spring安全性(请参阅后面添加的依赖项)。但是现在不使用我在配置类中使用的注释 我做错了什么? 这是一个Eclipse错误: 错误消息: pom.xml中的Spring依赖项(注释使用它): org.springframework 弹簧芯 ${spring.version} org.springframework 弹簧网 ${spring.version} org.spri

我将Spring MVC应用程序(3.2.5)中的Spring安全库(3.1.4版)添加到pom.xml中,以使用Spring安全性(请参阅后面添加的依赖项)。但是现在不使用我在配置类中使用的注释

我做错了什么?

这是一个Eclipse错误:

错误消息:

pom.xml中的Spring依赖项(注释使用它):


org.springframework
弹簧芯
${spring.version}
org.springframework
弹簧网
${spring.version}
org.springframework
SpringWebMVC
${spring.version}
pom.xml中的Spring安全依赖项(注释不适用于它):


org.springframework.security
spring安全网
3.1.4.1发布
org.springframework.security
spring安全内核
3.1.4.1发布
org.springframework.security
spring安全网
3.1.4.1发布

由于spring security core 3.1.4.RELEASE依赖于spring context 3.0.7.RELEASE,您需要显式地为spring context 3.2.5.RELEASE添加一个依赖项,以强制maven使用最新版本

至少。ComponentScan仅在3.1中添加

编辑:
M.Deinum所述,使用
块定义所有依赖项版本。因此,您可以在“main”
块中省略任何
标记。

因为spring security core 3.1.4.RELEASE依赖于spring context 3.0.7.RELEASE,所以您需要显式地为spring context 3.2.5.RELEASE添加一个依赖项,以强制maven使用最新版本

至少。ComponentScan仅在3.1中添加

编辑:
M.Deinum所述,使用
块定义所有依赖项版本。因此,您可以在“main”
块中省略任何
标记。

因为spring security core 3.1.4.RELEASE依赖于spring context 3.0.7.RELEASE,所以您需要显式地为spring context 3.2.5.RELEASE添加一个依赖项,以强制maven使用最新版本

至少。ComponentScan仅在3.1中添加

编辑:
M.Deinum所述,使用
块定义所有依赖项版本。因此,您可以在“main”
块中省略任何
标记。

因为spring security core 3.1.4.RELEASE依赖于spring context 3.0.7.RELEASE,所以您需要显式地为spring context 3.2.5.RELEASE添加一个依赖项,以强制maven使用最新版本

至少。ComponentScan仅在3.1中添加

编辑:
M.Deinum所述,使用
块定义所有依赖项版本。因此,您可以在“main”
块中省略任何
标记。

您使用的是maven eclipse插件吗?@reagten-是的,我使用。您使用的是maven eclipse插件吗?@reagten-是的,我使用。您使用的是maven eclipse插件吗?@reagten-是的,我使用。正确。一般来说,我在maven中使用一个
块来强制特定框架的版本。好吧,我已经从我最初的问题中解决了依赖性问题,但是现在我需要扩展
WebSecurity ConfigureAdapter
,这个类是在Spring Security 3.2.0.RC中添加的。它是可解的吗?正确。一般来说,我在maven中使用一个
块来强制特定框架的版本。好吧,我已经从我最初的问题中解决了依赖性问题,但是现在我需要扩展
WebSecurity ConfigureAdapter
,这个类是在Spring Security 3.2.0.RC中添加的。它是可解的吗?正确。一般来说,我在maven中使用一个
块来强制特定框架的版本。好吧,我已经从我最初的问题中解决了依赖性问题,但是现在我需要扩展
WebSecurity ConfigureAdapter
,这个类是在Spring Security 3.2.0.RC中添加的。它是可解的吗?正确。一般来说,我在maven中使用一个
块来强制特定框架的版本。好吧,我已经从我最初的问题中解决了依赖性问题,但是现在我需要扩展
WebSecurity ConfigureAdapter
,这个类是在Spring Security 3.2.0.RC中添加的。它是可解的吗?
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
    </dependency>

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

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

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>