<select class="col-sm-2 form-control" id="searchPost">
<option value="">请选择</option>
<option th:value="#{post.java.value}" th:text="#{post.java.name}"></option>
<option th:value="#{post.c.value}" th:text="#{post.c.name}"></option>
<option th:value="#{post.oracle.value}" th:text="#{post.oracle.name}"></option>
<option th:value="#{post.test.value}" th:text="#{post.test.name}"></option>
</select>
引用我resources/templates下的.properties文件中的变量。
但是结果却不能正常显示:<option value="??post.java.value_zh_CN??">??post.java.name_zh_CN??</option>
<!DOCTYPE HTML>
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
http://forum.thymeleaf.org/ThymeLeaf-SpringBoot-Using-Map-property-in-Form-td4029593.html
https://stackoverflow.com/questions/30106659/how-to-include-message-properties-with-thymeleaf
https://stackoverflow.com/questions/36545667/spring-boot-thymeleaf-not-finding-message-properties
参考一下这几个。
因为看不到你具体的.properties文件内容,不知道里面怎么定义的。
而且路径也看不到,所以只能帮你到这了。