在ValidationMessages.properties中写中文会乱码将文件改为UTF-8编码 然后在application.properties 中设置spring.messages.encoding=UTF-8 ,在idea中输入spring.messages.encoding 时会自动提示spring.messages.encoding=UTF-8 我以为默认就是UTF-8,其实不是的要手动声明好坑哇
imageimage.png image image
在ValidationMessages.properties中写中文会乱码将文件改为UTF-8编码 然后在application.properties 中设置spring.messages.encoding=UTF-8 ,在idea中输入spring.messages.encoding 时会自动提示spring.messages.encoding=UTF-8 我以为默认就是UTF-8,其实不是的要手动声明好坑哇
image本文标题:springboot 中ValidationMessages.p
本文链接:https://www.haomeiwen.com/subject/lonoaftx.html
网友评论