【发布时间】:2022-01-11 19:42:42
【问题描述】:
我正在使用 Thymeleaf 模板引擎,并希望从我的项目属性中获取 head 块上元标记的字符集属性值,即:<meta th:charset="${@environment.getProperty('html.charset')}">
但是当我想保存我的 html 文件时,我得到了这个弹出错误:
无法完成保存。如果问题仍然存在,请尝试“文件”>“另存为”。
原因:
字符编码“${@environment.getProperty('html.charset')}”不是合法的字符编码。
我什至尝试从 eclipse 之外保存文件,但是当回到 eclipse 并想要打开文件时,我无法访问它并收到此错误:
不支持的字符编码
此平台不支持字符编码“${@environment.getProperty('html.charset')}”。
设置编码...
我尝试暂停 eclipse Preferences 上的所有验证器,但这并不能解决问题。
任何帮助的想法?提前致谢。
我在 Mac OS 上使用 Eclipse IDE for Enterprise Java and Web Developers,版本:2021-09 (4.21.0)。
【问题讨论】:
标签: java eclipse spring-thymeleaf