springboot之国际化
1.国际化配置
在resource下新建i18n文件夹
并在文件夹下创建login.properties配置文件

在
模式下创建配置文件
查看messageSourceAutoConfigration
发现在
自动装配前缀为spring.messages

进入发现默认配置为messages
在配置文件中将spring.message.basename改为i18n.login

2.自定义配置国际化语言

在mvc中注入

1.国际化配置
在resource下新建i18n文件夹
并在文件夹下创建login.properties配置文件

在
模式下创建配置文件
查看messageSourceAutoConfigration
发现在
自动装配前缀为spring.messages

进入发现默认配置为messages
在配置文件中将spring.message.basename改为i18n.login

2.自定义配置国际化语言

在mvc中注入
