SpringBoot 国际化

一、配置文件

二、application.properties 文件( 让国际化的文件被 SpringBoot 识别 )

spring.messages.basename=i18n.login

三、html 文件

<h1 th:text="#{login.tip}">Please sign in</h1>
<input type="checkbox" value="remember-me"> [[#{login.remember}]]

四、properties 文件乱码问题

File --> Others Settings --> Default Settings

 

posted @ 2018-04-24 18:45  方方方方方方  阅读(82)  评论(0编辑  收藏  举报