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

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

SpringBoot配置项目字符编码

相关文章:

  • 2022-02-08
  • 2021-08-15
  • 2021-12-17
  • 2021-12-02
  • 2021-08-11
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2021-07-11
  • 2021-10-06
  • 2021-05-29
  • 2021-11-30
相关资源
相似解决方案