【Spring-boot】運行環境獲取

1、類級別 @Profile(「dev」) 好比:能夠用來控制,swagger只在測試環境使用 @Profile({「dev」, 「loc」}) public class SwaggerConfig {}web 2、方法級別 【Spring-boot】經過ApplicationContextAware獲取spring管理對象spring
相關文章
相關標籤/搜索