Spring @Value 注入汉字乱码问题解决方法

1.添加注解

@PropertySource(value = "classpath:application.properties",encoding = "utf-8")

2.修改idea字符编码

 

3.修改idea 下*.properties文件换行符

 

posted @ 2021-08-04 15:51  风林月影  阅读(494)  评论(0)    收藏  举报