Spring-boot整合mybatis-plus时报错:Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.Logger

今天在整合mybatis-plus时启动报错,最后一个错误如下:

Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.LoggerFactory
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 66 more


Process finished with exit code -1

配置文件如下:



    4.0.0
    
        org.springframework.boot
        spring-boot-starter-parent
        2.1.7.RELEASE
         
    
    com.jujung
    fms
    0.0.1-SNAPSHOT
    fms
    Founds Management System

    
        1.8
    

    
        
            org.springframework.boot
            spring-boot-starter-web
        
        
        
            com.baomidou
            mybatis-plus-boot-starter
            3.1.2
        
        
        
            com.alibaba
            druid
            1.0.9
        
        
        
            mysql
            mysql-connector-java
            5.1.6
        

         
        
            net.sf.dozer
            dozer
            5.5.1
        

        
            net.sf.dozer
            dozer-spring
            5.5.1
        
        
        
            com.github.pagehelper
            pagehelper-spring-boot-starter
            1.2.3
        

        
            org.projectlombok
            lombok
            true
        

        
            org.springframework.boot
            spring-boot-starter-test
            test
        
    

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
        
    


排查了好久,最后发现是由于引入了pageHelper引起的,注释掉pageHelper的依赖,启动正常

你可能感兴趣的:(Spring-boot整合mybatis-plus时报错:Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.Logger)