How to set velocity template character encoding with spring boot?

流过昼夜 提交于 2019-12-05 20:22:08

When using templating technologies with Spring Boot and trying to set properties not available through default Spring Boot properties (like spring.velocity.charSet) there is a spring.[template-engine].properties.* that will work. See the list of properties.

Basically adding spring.velocity.properties.input.encoding=UTF-8 to your application.properties should do the trick.

spring.velocity.properties.input.encoding=UTF-8
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!