mybatis-plus Common Error and Their Solution

Mybatis-Plus Common Error And Their Solution

Error 1: there isn’t a @EnumValue annotation when writing enumeration class

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

Error 2:

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

Solution 2:

Modify the dependency from

<dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus</artifactId>
            <model>3.3.2</model>
        </dependency>

to

 <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <model>3.0.5</model>
        </dependency>

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

Solution 3:

Delete the dependency of mybaits

 <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <model>1.1.1</model>
        </dependency>

Error 4:

The record() methodology stories crimson, indicating that the parameter is lacking,

Mybatis Plus Common Error And Their Solution

Solution 4:

View supply code

1662367056 467 Mybatis Plus Common Error And Their Solution

Method does require parameters

View official paperwork

1662367060 828 Mybatis Plus Common Error And Their Solution

It could also be because of the model drawback. In the most recent model, you don’t want to move the parameter. The parameter ought to be null

1662367064 191 Mybatis Plus Common Error And Their Solution

Problem-solving

Error 5:

java.lang.IllegalArgumentException: No enum fixed com.guide.bookshop.entity.enums.Suit.1

Solution 5:

Removing spring-boot-devtools, this plug-in will trigger many issues. It is estimated that it ought to be the principle motive

Leave a Reply

Your email address will not be published.