springboot下自定義yml文件

1.新建yml文件,如application-test.yml 2.插入數據 3.自定義配置類 @Component//使用@Configuration也能夠 @PropertySource(value = 「classpath:application-test.yml」)//配置文件路徑 @ConfigurationProperties(prefix = 「tx2config」) public
相關文章
相關標籤/搜索