用的idea检查了好几遍

来源:1-5 快速入门小例子

itmk

2019-09-18 21:58

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [C:\Genius\IdeaProjects\spring\target\classes\com\wisdom\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.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 com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: GlobalConfigUtils setMetaData Fail !  Cause:java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1515)


写回答 关注

2回答

  • itmk
    2019-09-19 09:22:20

    昨天晚上,启动类配置了包扫描,确定配置了,跟着你的快速入门小例子写的,yml只配置了数据库模块.
    今天换了一台电脑,我重新写了一遍,竟然可以了,目前还没有发现具体原因

  • 慕虎02294
    2019-09-18 23:50:05

    spring boot启动类没有配置包扫描

    或者yml中没有.xml扫描

    老猿 回复itmk

    哦,解决了就好,没帮上你的忙

    2019-09-20 08:47:03

    共 2 条回复 >

MyBatis-Plus入门

MyBatis-Plus框架入门必学课程!

56140 学习 · 381 问题

查看课程

相似问题