Here is 2 simple steps to configure property file in Spring ,

Step 1:  Prepare Bean for property file.

Sample property File:

Bean Configuration:

@PropertySource(value = {""})
@Scope ( scopeName = ConfigurableBeanFactory.SCOPE_SINGLETON )
public class Resources {

              @Value( value = "${app.image.path}" ) 
             private String fileImagePath;

             // Add getters and Setters


Step 2: Resolve arguments for ${…}

Configure PropertySourcesPlaceholderConfigurer in the container or bean.

Using Annotation based configuration:

Add ,
public static PropertySourcesPlaceholderConfigurer placeHolderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();

For XML Configuration,

 <bean class="">
          <property name="environment">
              <bean class=""/>


Possible Exception if Step 2: is missed:

 Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'app.image.path' in string value "${app.image.path}"