I have a really difficult problem with application.properties
file because I can not read properly from this file with java spring. The simple source code is given below. Thank you in advance.
application.properties file
message.username=john12345
Messages.java
@Value("${message.username}")
private String username;
It throws a FileNotFoundException
and shows that the value is always null
.
You should configure
property-placeholder
in your spring context: