背景:
SpringBoot项目启动成功,访问API时报错。页面显示 whitelabel error page,
控制台报错:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request
原因:
Service层实现类未添加注解@Autowired。
@Autowired的作用是自动注入依赖的Bean。
欢迎加群讨论:
565191947
另外,给大家介绍一款国内很实惠便宜的服务器运营商:
https://www.didiyun.com/activity.html?invite=298tSgEjvtp#annually