springboot下的纯html页面乱码带问号?
前端html也指定了utf-8也无用
html访问后端接口 返回的
Content-Type: text/html;charset=ISO-8859-1
![](https://img2024.cnblogs.com/blog/444141/202407/444141-20240706002233999-961402269.png)
所以大概率是springboot编码影响到了html页面
在springboot的application.yml加上以下配置
server:servlet:encoding:#enabled: true #让系统的CharacterEncdoingFilter生效charset: UTF-8 #默认编码格式force: true #强制request,response都使用charset属性的值