mybatis-plus Common Error and Their Solution


Error 1: there is no @EnumValue annotation when writing enumeration class

Solution 1: @EnumValueis an annotation supported after mybatis-plus version 3.0


Error 2:

java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation.MapperScan.factoryBean()

Solution 2:

Modify the dependency from





Error 3:
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘***’: Unsatisfied dependency

Solution 3:

Delete the dependency of mybaits



Error 4:

The list() method reports red, indicating that the parameter is missing,

Solution 4:

View source code

Method does require parameters

View official documents

It may be due to the version problem. In the latest version, you do not need to pass the parameter. The parameter should be null



Error 5:

java.lang.IllegalArgumentException: No enum constant

Solution 5:

Removing spring-boot-devtools, this plug-in will cause many problems. It is estimated that it should be the main reason

Read More: