Spring加载时编织没有检测用@configurable注释的类

mik*_*kek 5 java spring aspectj

我无法让AspectJ在我的主项目中使用@configurable注释的类上执行加载时编织.没有设置字段,也没有触及任何设置器.

我不认为配置本身存在问题,因为我已经提取了配置并在较小的沙箱项目上对其进行了测试.只是为了它,我会把它包含在这个问题中.

所以,我想知道:

  1. 大型项目中是否有任何可能阻碍Spring/AspectJ检测此特定类的内容?
  2. 有没有办法检查春天是否甚至意识到问题中的班级?

最后,无论我提取什么代码(请原谅混淆):

从配置XML:

<context:annotation-config />
<context:spring-configured />
<context:component-scan base-package="se.isydev" />
<context:component-scan base-package="se.istools" />
<aop:aspectj-autoproxy />
<context:load-time-weaver aspectj-weaving="on" />
<context:property-placeholder location="classpath:settings.properties" />
(...)
<bean class="com.company.ClassToBeWeaved"
    scope="prototype">      
    <property name="injectedBean" ref="injectedBean" />
</bean>
Run Code Online (Sandbox Code Playgroud)

班级本身:

@Configurable
public class ClassToBeWeaved {
    private InjectedBean injectedBean;

    @Required
    public void setInjectedBean() { ... }
}
Run Code Online (Sandbox Code Playgroud)

编辑:

好吧,事实证明它由于循环依赖而无法正常工作.哦,亲爱的,我喜欢处理遗留代码.不过,我原来的问题仍然存在.