springboot 踩坑——dao类添加autowired 注解

springboot报错:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

service类或者dao类应该添加@Autowired注解

image-20200601175642886

posted @ 2020-06-01 17:59  火车不是推的  阅读(965)  评论(0编辑  收藏  举报