报错信息:Expected '$(student - name)' to be an inline constant of type java.lang.String in @org.springframework.beans.factory.annotation.Value
这样使用会报错,原因是 Gradle和Springboot占位符冲突;解决方法就是将$符号转义以下即可
@Value("\${student-name}")
private String fooBar;
报错信息:Expected '$(student - name)' to be an inline constant of type java.lang.String in @org.springframework.beans.factory.annotation.Value
这样使用会报错,原因是 Gradle和Springboot占位符冲突;解决方法就是将$符号转义以下即可
@Value("\${student-name}")
private String fooBar;
https://blog.csdn.net/u013129300/article/details/129329786