Points To Remember You can use @PropertySource annotation to load the properties file from classpath. Keep your properties file under the resources folder. Use @Value annotation to load the values from property file with "${key}" as key. Load Properties file from classpath in Spring boot. Your properties file look like following. spring.data1=sampleData1 spring.data2=sampleData2 spring.data3=sampleData3 You can load the properties using the following two approaches In this approach you can specify a prefix with which your config starts in the properties file @Component @PropertySource("sample.properties") @ConfigurationProperties(prefix = "spring") public class SampleConfig { private String data1; private String data2; private String data3; // GETTERS and SETTERS } In this approach you need to specify the whole key to read the value from the properties file. @Component @PropertySource(value = "sample.properties") public c...