zoukankan      html  css  js  c++  java
  • fastjson依赖 配置fastjson为默认json转换器

    <dependency>

      <groupId>com.alibaba</groupId>

      <artifactId>fastjson</artifactId>

      <version>1.2.38</version>

     </dependency>

    <mvc:annotation-driven>

           <!-- 设置fastjson的转换器对象 -->

           <mvc:message-converters register-defaults="true">

             <bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">

                <property name="supportedMediaTypes">

                   <list>

                      <value>text/html;charset=utf-8</value>

                      <value>application/json;charset=utf-8</value>

                   </list>

                </property>

    </bean>

            </mvc:message-converters>

    </mvc:annotation-driven>

  • 相关阅读:
    luffy后台登录+注册+课程
    luffy前台登录+注册+课程
    luffy前台准备
    luffy后台准备
    跨域请求
    pip源和虚拟环境的搭建
    Book接口
    drf-Xadmin的使用
    drf-JWT认证
    drf-自动生成接口文档
  • 原文地址:https://www.cnblogs.com/rui-320/p/9805474.html
Copyright © 2011-2022 走看看