1、從啓動類刪除@EnableConfigurationProperties註解
2、在註解的類上加上@Component
3、加上@PropertySource("classpath:xxx.properties")註解
1、從啓動類刪除@EnableConfigurationProperties註解
2、在註解的類上加上@Component
3、加上@PropertySource("classpath:xxx.properties")註解
Spring boot 配置數據源 spring: mvc: favicon: enabled: false datasource: primary: username: root