打赏

http406错误

The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers

详细出现上述错误信息,检查发现只引入了

        <!-- json-lib -->
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
            <classifier>jdk15</classifier>
        </dependency>

还需要引入

        <!-- Jackson Json处理工具包 -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.4.2</version>
        </dependency>

不然客户的无法解释json格式

posted @ 2018-10-29 16:46  每天都要学一点  阅读(202)  评论(0编辑  收藏  举报