|
@@ -18,24 +18,25 @@ import org.springframework.transaction.annotation.EnableTransactionManagement
|
|
|
*/
|
|
|
@Configuration
|
|
|
@EnableTransactionManagement
|
|
|
-class MybatisPlusConfig {
|
|
|
+open class MybatisPlusConfig {
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 并不会自动注入
|
|
|
*/
|
|
|
@Bean
|
|
|
- fun physicalSqlInjector(): ISqlInjector {
|
|
|
+ open fun physicalSqlInjector(): ISqlInjector {
|
|
|
return LogicMoreSqlInjector()
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 性能分析插件
|
|
|
+ * // 开发环境开启
|
|
|
*/
|
|
|
@Bean
|
|
|
- @Profile("dev") // 开发环境开启
|
|
|
- fun performanceInterceptor(): PerformanceInterceptor {
|
|
|
+ @Profile("dev")
|
|
|
+ open fun performanceInterceptor(): PerformanceInterceptor {
|
|
|
return PerformanceInterceptor().also { it.isFormat = true }
|
|
|
}
|
|
|
|
|
@@ -43,12 +44,12 @@ class MybatisPlusConfig {
|
|
|
* 分页插件
|
|
|
*/
|
|
|
@Bean
|
|
|
- fun paginationInterceptor(): PaginationInterceptor {
|
|
|
+ open fun paginationInterceptor(): PaginationInterceptor {
|
|
|
return PaginationInterceptor()
|
|
|
}
|
|
|
|
|
|
@Bean
|
|
|
- fun metaObjectHandler(): MetaObjectHandler {
|
|
|
+ open fun metaObjectHandler(): MetaObjectHandler {
|
|
|
return CustomMetaObjectHandler()
|
|
|
}
|
|
|
|