今天遇到类似问题,记录下来以便以后查阅: @Aspect作用于action,致使action中的@Autowired注入为null的解决方案,以下三种任选一种: 1.去掉@Autowired,改用set,get注入 2.将action纳入spring的ioc管理(struts.objectFactory = org.apache.struts2.spring.StrutsSpringObjectFactory) 3.修改Struts.xml文件的属性,使自动注入总是有效 Tip:必须在所有使用了…