0
点赞
收藏
分享

微信扫一扫

PageHelper 中文乱码

老王420 2023-10-09 阅读 30

PageHelper 中文乱码

 

在springmvc 的 mvc:annotation-driven 中配置编码

<mvc:annotation-driven /> 会自动注册DefaultAnnotationHandlerMapping与AnnotationMethodHandlerAdapter 两个bean,是spring MVC为@Controllers分发请求所必须的,即解决了@Controller注解使用的前提配置。

 <mvc:annotation-driven /> is actually rather pointless. It declares explicit support for annotation-driven MVC controllers (i.e.@RequestMapping@Controller, etc), even though support for those is the default behaviour.

 

response.setCharacterEncoding("text/html;charset=UTF-8"); 加在json对象前

 

 




举报

相关推荐

0 条评论