- remove
@PropertySourceannotation, you not need it - rename your
scheduling.ymlintosrc/main/resources/application-scheduling.yml -
add in
src/main/resources/application.ymlfile next line:spring.profiles.include: 'scheduling'
@PropertySource annotation, you not need itscheduling.yml into src/main/resources/application-scheduling.ymladd in src/main/resources/application.yml file next line:
spring.profiles.include: 'scheduling'