报错信息如下:
ERROR 8768 --- [nio-8081-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseSelectProvider.dynamicSQL). Cause: java.lang.InstantiationException: tk.mybatis.mapper.provider.base.BaseSelectProvider] with root cause
这里主要是Service层对Dao层的调用出了问题,
解决方法:
1.在Service层里添加注解@Service
2.检查Service层里和Dao层里的调用名是否保持一致,必须要一致才能正确调用
Service:
Dao: