会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
西八没天台
天下古今之庸人,皆以一惰字致败,天下古今之才人,皆以一傲字致败.
博客园
首页
新随笔
联系
订阅
管理
2021年8月19日
SpringBoot中非Controller类调用service方法出现null空指针
摘要: 原因:service无法导入到非controller层中去。 解决方法:注入bean @Component //重点 public class TestServerse{ @Autowired //正常引用目标service private OtherService otherService ; /
阅读全文
posted @ 2021-08-19 22:18 西八没天台
阅读(1406)
评论(0)
推荐(0)
编辑