|
|
@ -31,13 +31,13 @@ import org.springframework.context.annotation.Configuration;
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
public class MybatisPlusConfig {
|
|
|
|
public class MybatisPlusConfig {
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${spring.profiles.active:mysql}")
|
|
|
|
@Value("${hippo4j.database.dialect:mysql}")
|
|
|
|
private String profilesActive;
|
|
|
|
private String databaseDialect;
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
|
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
|
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
|
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
|
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.getDbType(profilesActive)));
|
|
|
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.getDbType(databaseDialect)));
|
|
|
|
return interceptor;
|
|
|
|
return interceptor;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|