In Spring Boot, I know that I can replace application.properties with application.yml and use the YAML format. However, my application.yml is getting crowded so I need to split it up a bit. How can I do that? I would like to do something like this:
...
@Configuration
@EnableAutoConfiguration
@EnableWebMvc
@EnableScheduling
@PropertySource({"classpath:application.yml", "classpath:scheduling.yml"})
public class ApplicationConfig {
...
@PropertySource
annotation, you not need itscheduling.yml
into src/main/resources/application-scheduling.yml
add in src/main/resources/application.yml
file next line:
spring.profiles.include: 'scheduling'