windchill 如何配置SpringMVC

一,找到mvc.xml文件

路径: \ptc\Windchill_11.0\Windchill\codebase\config\mvc

二,添加配置

<context:component-scan base-package="ext.bica3.mvc" />

三,测试效果

四,如果出现中文乱码问题

目前能成解决中文乱码问题的方式,但并不是最终解决办法。

    @ResponseBody
    @RequestMapping(value="zh2")
    public void zh2(HttpServletResponse res) throws IOException {
        res.setContentType("text/html;charset=utf-8");
        res.getWriter().print("唱跳rap打篮球");
    }
posted @ 2020-11-10 16:40  Wzzzz~  阅读(801)  评论(0)    收藏  举报