Thursday, September 21, 2017

Add Properties File using Spring


Annotation : @Value


@Value("${jdbc.driverClassName}")     // Pass key using exp. Language
private String driverClassName;


Add Resource Path:

@PropertySource("classpath:/application.properties")

<context:property-placeholder location="classpath:/application.properties"/>

No comments:

Post a Comment