会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
聆听*幸福
博客园
首页
新随笔
联系
管理
订阅
2018年7月27日
在非Controller中@Autowired注解变量
摘要: 当在非Controller要自动注解变量,尤其是static变量时会在运行时报出空指针的错误。我就遇到了这种情况,后来在网上查了许多后,总结基本上有这种情况可以解决。@Component //申明为spring组件public class TestU...
阅读全文
posted @ 2018-07-27 10:23 聆听*幸福
阅读(320)
评论(0)
推荐(0)
编辑
公告