Mybatis Plus 性能分析插件
本文最后更新于:2024年9月8日 晚上
Mybatis Plus 性能分析插件
配置插件
1 2 3 4 5 6 7 8
| @Bean @Profile({"dev","test"}) public PerformanceInterceptor performanceInterceptor() { PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor(); performanceInterceptor.setMaxTime(100); performanceInterceptor.setFormat(true); return performanceInterceptor; }
|
使用
1 2 3 4 5
| @Test void contextLoads() { List<User> users = userMapper.selectList(null); users.forEach(System.out::println); }
|