Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
springboot 无法启动
如图一

图二:

主要原因:
Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
所以找到启动位置:

把MapperScan改为ComponentScan 后,问题解决,启动正常。
文章描述了在SpringBoot应用中遇到的一个启动错误,该错误指出PropertysqlSessionFactoryorsqlSessionTemplatearerequired。作者通过将MapperScan注解改为ComponentScan成功解决了此问题,使得应用能够正常启动。
1万+

被折叠的 条评论
为什么被折叠?



