框架:SpringBoot3
问题:响应内容乱码
问题代码:
// 成功登录响应的内容
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
response.setCharacterEncoding("utf-8");
response.getWriter().write("成功登录");
}
});
我们设置了响应内容的字符编码为utf-8,看看结果

乱码了,但是我们将utf-8改成gbk就没有这个问题了













![[C#]winform制作圆形进度条好用的圆环圆形进度条控件和使用方法](https://img-blog.csdnimg.cn/direct/8cf01adbc3ed4d918a5dcef2b5364201.gif)






