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:
- [Solved] Mybatis.generator error: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
- [Solved] Mybatis Error: Could not find resource mybatis-conf.xml
- [Solved] Tk-Mybatis Error: tk.mybatis.mapper.MapperException:
- [Solved] mybatis plus Insert Error: mybatis plus Error setting null for parameter #1 with JdbcType OTHER
- mybatis-plus Common Error and Their Solution
- [Solved] Mybatis integrates PageHelper and uses sqlserver paging error
- How to Solve mybatis-plus Paging Plug-in PaginationInnerInterceptor error
- Problems in springboot upgrade 2.4.0: when allowcredentials is true, allowedorigins cannot contain the specia
- JUnit tests mybatis-plus error: null pointer [How to Solve]
- Mybatis plus paging Plugin and Auto-fill
- serviceimpl inherits generic public impl startup error: ClassCastException (Mybatis-plus version Issue)
- Mybatis Error: All elements are null [How to Solve]
- How to Solve Log4j 2.5 upgrade to 2.15 error
- [Solved] Mybatis Batch Modify Error: multi-statement not allow
- Mybatis Error: The error may exist in xxxxMapper.xml [How to Solve]
- [Solved] Mybatis-Plus Error: Invalid bound statement (not found)
- [Solved] JavaErrors_mybatis collection column Pass Value Error
- [Solved] Mybatis Error: attempting to get column ‘XX’ from result set
- Build a mybatis and it will appear session.selectOne Method error
- Mybatis Error: Invalid bound statement (not found)