@EnableSpringConfigured导入

sta*_*000 6 java import spring spring-mvc maven

嗨,我正在使用spring mvc项目,我希望能够做这个注释

@EnableSpringConfigured

在我的一个类的顶部像这样

@Configuration
@EnableSpringConfigured  <---- this one gives me troubles
@ComponentScan( basePackages = {"com.abc.dom", "com.abc.repo", "com.abc.auth"})
@EnableJpaRepositories(basePackages="com.abc.repo")
public class ConfigJPA 
{

....

}
Run Code Online (Sandbox Code Playgroud)

我应该在pom.xml中使用什么maven依赖来执行此导入:

import org.springframework.context.annotation.aspectj.EnableSpringConfigured;
Run Code Online (Sandbox Code Playgroud)

我的春季版是4.0.6.RELEASE

sta*_*000 7

这是我如何添加依赖,它的工作原理

 <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>3.2.0.RELEASE</version>
    </dependency>
Run Code Online (Sandbox Code Playgroud)

Reimeus指向您提供artifactId的页面的链接是这样添加的

<artifactId>org.springframework.aspects</artifactId>
Run Code Online (Sandbox Code Playgroud)

相反,那<artifactId>spring-aspects</artifactId>就是为什么它不适合我,但谢谢,无论如何它也帮助了我