13章Sprintboot启动失败,请问错在何处?

来源:14-1 打包配置

慕仰0274710

2020-06-09

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2020-06-08 14:08:43.673 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userManager’: Unsatisfied dependency expressed through field ‘template’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘sqlSessionTemplate’ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘sqlSessionTemplate’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory’ threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.ibatis.session.Configuration.setDefaultEnumTypeHandler(Ljava/lang/Class;)V

写回答

1回答

慕仰0274710

提问者

2020-06-09

解决,pom 文件中mybatis-spring-boot-starter 和mybatis的版本各加了“一”

0
1
cloudonthesun
请问你是怎么解决的呀?我也遇到这个了
2021-06-11
共1条回复

Java接口自动化测试实战,搞定理论基础+典型应用场景

打破传统测试用例设计方法,搞懂基于TestNG的接口自动化测试技术

2086 学习 · 920 问题

查看课程