SpringBoot的配置优先级,一个具体的练习例子
SpringBoot里的官方文档叫做Externalized Configuration: 优先级依次如下: (1) Devtools global settings properties in the $HOME/.config/spring-boot folder when devtools is active. (2) @TestPropertySource annotations on your tests. (3) properties attribute on your tests. Available on @SpringBootTest and the test annotations for testing a particular slice of your application. (4) Command line arguments. (5) Properties from SPRING_APPLICATION_JSON (inline JSON embedded in an environment variable or system property). (...