spring AspectJ引用IOC对象为空

J2EE 码拜 9年前 (2015-04-15) 994次浏览 0个评论
@Aspect
public class LoggingAspect {

	@Autowired
	private LoggingAspectProcessor processor;
	@Autowired
	ControlManagerService service;

	@Around("@annotation(com.jp.tic.system.core.annotation.Log)")
//	@Around("execution( * cn.tisson.pms.dao..*(..))")
	public Object log(ProceedingJoinPoint pjp) throws Throwable {
		return processor.process(pjp);
	}
}

求解,为何在这里面引用的processor和service为空,在其他,比如controller里面,又不为空呢?

spring AspectJ引用IOC对象为空
60分
楼主看看这个,Spring的自动注入有区分的,不是每个class都能行的
http://blog.csdn.net/wangpeng047/article/details/8868753

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明spring AspectJ引用IOC对象为空
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!