Spring @Value annotation in @Controller class not evaluating to value inside properties file
- 阅读更多 关于 Spring @Value annotation in @Controller class not evaluating to value inside properties file
问题 I am new to Spring and trying to inject a string with a value using the @Value("${loginpage.message}") annotation inside of a controller annotated with the @Controller annotation and the value of my string is being evaluated as the string "${loginpage.message}" and not what is inside my properties file. Below is my controller with the string 'message' that I want to inject. @Controller public class LoginController extends BaseController { @Value("${loginpage.message}") private String message;