I am totally new to Spring and started to do the official guides from this site: https://spring.io/guides
I\'d like to do this guide: https://spring.io/guides/gs/sch
If you package it as a single jar and it's non web app try to load app context as below.
@SpringBootApplication
ApplicationContext ctx = new AnnotationConfigApplicationContext(Main.class);
Or use below plugin to package as a single jar
org.springframework.boot
spring-boot-maven-plugin
repackage
you can specify the external configs by using below command to run
java -jar myproject.jar --spring.config.location=classpath:/default.properties,classpath:/override.properties
/http://docs.spring.io/spring-boot/docs/current/reference/htmlboot-features-external-config.html#boot-features-external-config-application-property-files
Note that if you are passing the properties as arguments then don't include @PropertySource("classpath:test.properties") it will override the parameters