SpringBoot配置项目字符编码

方式有两种,一种是写一个配置类,等同于原来Spring web项目中的web.xml中配置的CharacterEncoding,不过这种方式很麻烦,不推荐使用,下面介绍第二种方式:

直接在application.yml文件中配置即可,不过SpringBoot是默认UTF-8:


猜你喜欢

转载自blog.csdn.net/Dongguabai/article/details/80864462
今日推荐