I'd like to autowire a spring-managed bean into an Aspect. The following works like a champ:
I realized that I need to define a privileged aspect, which is not supported in @AspectJ. So I converted back to the retro AspectJ notation:Code:@Aspect @Configurable public class PointWrapper { @Autowired private JobSupport job_support; (point-cuts-here) }
Problem is, this second syntax doesn't seem to work. I get a NullPointerException when referring to job_support. Is there a hack to make @Configurable / @Autowired work with old-school aspects?Code:@Configurable public privileged aspect PointWrapper { @Autowired private JobSupport job_support; (point-cuts-here) }
Thanks
Norman


Reply With Quote