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的版本各加了“一”
012021-06-11
相似问题