Wednesday, March 13, 2013

Spring Properties get in class

test.properties
application.file.home = fileHomeString
spring.xml


      
        classpath:/properties/test.properties
      


Bean class
public PropertyTest class{

  @Value("${" + "application.file.home" + "}")
  private String propertiValue;

}

No comments:

Post a Comment