在mybatisplus中由这样一个监控慢查询的bean需要注入,但是上生产环境需要将其注释掉, 改用profile的方式来切换生产或开发环境。
1
2
3
4
5
@Profile(value = "!prod")
@Bean
public PerformanceInterceptor performanceInterceptor() {
return new PerformanceInterceptor();
}
在mybatisplus中由这样一个监控慢查询的bean需要注入,但是上生产环境需要将其注释掉, 改用profile的方式来切换生产或开发环境。
1
2
3
4
5
@Profile(value = "!prod")
@Bean
public PerformanceInterceptor performanceInterceptor() {
return new PerformanceInterceptor();
}