I have a message.properties
in my Spring Boot program and it works fine with Thymeleaf in HTML templates. However, I want to use key=value also in Java code. For example, I have:
public static final String PDF_PROGRAM_INFO_FIRST_LINE = "Some text"
In message.properties
, I have:
text = Some text
How to put key into my string in code to use it value instead of typing string by hand?
I tried:
public static final String PDF_PROGRAM_INFO_FIRST_LINE =("${text}")
However, this doesn't work.