首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

运用springsied时action中的属性用@Autowired注解注入失败

2013-02-04 
使用springsied时action中的属性用@Autowired注解注入失败本帖最后由 tiandaoc 于 2013-01-22 11:20:59 编

使用springsied时action中的属性用@Autowired注解注入失败
本帖最后由 tiandaoc 于 2013-01-22 11:20:59 编辑  运行时跳转到ArticleAction老是提示

java.lang.NullPointerException
at sunships.dhcc.web.ArticleAction.list(ArticleAction.java:43)
at sunships.dhcc.web.CrudActionSupport.execute(CrudActionSupport.java:35)

估计ArticleManager没能成功注入,但@Autowired @Service 及springcontext.xml中都有自动扫描祖先包的配置,不得其解...
其中43行在

@Override
41public String list() throws Exception {
42
43page = articleManager.getAll(page);
44return SUCCESS;
}
autowired action springside ssh javaweb
[解决办法]
空指针异常呀!
[解决办法]
把配置文件的关键部分贴出来

热点排行