Springboot报错 → Caused by: java.lang.annotation.AnnotationFormatError: Invalid default:

报错信息

Caused by: java.lang.annotation.AnnotationFormatError: Invaliddefault: public abstract java.lang.Classorg.mybatis.spring.annotation.MapperScan.factoryBean()

报错原因

缺少mybatis和springboot的整合包

解决方法

加入mybatis和springboot的整合依赖

        <!--mybatis和springboot的整合包-->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.0.0</version>
        </dependency>

猜你喜欢

转载自blog.csdn.net/qq_45928727/article/details/108269621