@Profile 控制接口的可见
假设有多个配置文件
application.properties 默认
application-pet.properties 性能测试
application-dev.properties xxx
@RestController
@Profile({
"pet"
})
@RequestMapping("/v1/ops/performanceTest/")
public class DebugPerformanceTestController {
}
DebugPerformanceTestController 只在 application-pet.properties 启用,也就是压测时生效。