Closed CzyerChen closed 4 years ago
springboot : 2.0.4.RELEASE mybatis-plus:3.1.2 Druid DataSource:1.1.10
使用官方文档上说明的配置MybatisPlusConfig
@EnableTransactionManagement @Configuration public class MybatisPlusConfig { @Bean public ConfigurationCustomizer mybatisConfigurationCustomizer() { return new ConfigurationCustomizer() { @Override public void customize(MybatisConfiguration configuration) { configuration.setObjectWrapperFactory(new MapWrapperFactory()); } }; } @Bean public PaginationInterceptor paginationInterceptor() { PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); return paginationInterceptor; } @Bean @Profile({"dev", "test"}) public PerformanceInterceptor performanceInterceptor() { PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor(); performanceInterceptor.setMaxTime(5000); performanceInterceptor.setFormat(true); return performanceInterceptor; } @Bean(name = "sqlSessionFactory") @ConditionalOnMissingBean public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception { SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); bean.setDataSource(dataSource); bean.setPlugins(new Interceptor[]{paginationInterceptor(), performanceInterceptor()}); return bean.getObject(); } @Bean public MapperScannerConfigurer mapperScannerConfigurer() { MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer(); scannerConfigurer.setBasePackage("com.xxxx.mapper*"); return scannerConfigurer; } }
BaseJdbcLogger 143 debug - ==> Preparing: SELECT user_id,user_name,company_code,create_time,modify_time,create_user,password FROM dmp_user BaseJdbcLogger 143 debug - ==> Parameters: .BaseJdbcLogger 143 debug - <== Total: 11
最新版本不能用。 用3.0.X
该插件不再维护已移除
当前使用版本
该问题是怎么引起的?
使用官方文档上说明的配置MybatisPlusConfig