Mybatisenumtypehandler upgrade error of mybatis plus

Background

After I recently upgraded mybatis plus from 3.4.1 to 3.4.3.1, a series of errors occurred. The first error is that an attribute of the configuration file is red:

Prompt that there is a problem with the path of mybatisenumtypehandler. It is true that this class does not exist in the source package

Solution

Later, I queried the whole project by copying this type, and finally found this class. It turned out that it was moved to other places, and it can be moved to other packages at will. It’s too casual!

Original address:

default-enum-type-handler: com.baomidou.mybatisplus.extension.handlers.MybatisEnumTypeHandler

New address:

default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler

After modification, it will not be popular and solve the problem.

There is also an error:

A setusedeprecetedexecutor attribute in config became popular. It turned out that a plug-in was removed in the new version. You need to configure the latest version of paging plug-in

Screenshot of error reporting:

Solution:

Configure the latest version of paging plug-in on the official website:

Official website link: https://mp.baomidou.com/guide/page.html

Latest configuration:

    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        return interceptor;
    }

Read More: