Wang Xiang's Blog
Friday, January 2, 2015
Spring MVC read properties in the class
This is sample code:
@Component( "emailService" )
public class EmailService {
@Value( "${mail.server.url}" )
private String url;
....
}
in the property file
mail.server.ur=http://abc/def
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment