I would like to use a value from application.properties
file in order to pass it in the method in another class. The problem is that the value returns always NULL
. What could be the problem? Thanks in advance.
application.properties
filesystem.directory=temp
FileSystem.java
@Value("${filesystem.directory}")
private static String directory;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…