在网上找了半天都没解决,最后才发现是springMvc配置类

@EnableWebMvc这个注解被我注释掉了

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;@Configuration
@ComponentScan({"com.hncj.controller", "com.hncj.config"})
@EnableWebMvc
public class SpringMvcConfig {
}

这玩意是真坑,Junit测试的时候要注释掉才能测试service,在Tomcat上部署时得打开才行

No converter for [class XXX] with preset Content-Type ‘null‘相关推荐

  1. No converter for [class xxx] with preset Content-Type ‘multipart/form-data’

    报错 org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class cn.gu ...

  2. 常见异常:No converter for XXX with preset Content-Type ‘applicationoctet-stream

    No converter for XXX with preset Content-Type 'application/octet-stream:charset=UTF-8' 在导出excel中返回公共 ...

  3. Error while extracting response for type [class xxx] and content type application/xml;charset=UTF-8

    强烈推荐一个大神的人工智能的教程:http://www.captainbed.net/zhanghan [前言] 最近在用restTemplate进行一次http请求时发现了报错(Error whil ...

  4. http://www.xxx.com/ skipped. Content of size 67099 was truncated to 59363

    如果提示http://www.xxx.com/ skipped. Content of size 67099 was truncated to 59363 在nutch-site.xml中添加: &l ...

  5. No converter for [class xxx] Content-Type ‘appliction/octet-stream;charset=UTF-8‘ 的解决办法

    报错的类:AbstractMessageConverterMethodProcessor 报错的代码块 报错原因 respose在被传入其他的方法后,其content type 被篡改了,导致与req ...

  6. restTemplate http请求报错:no suitable HttpMessageConverter found for response type and content type

    报错信息: org.springframework.web.client.UnknownContentTypeException: Could not extract response: no sui ...

  7. Error while extracting response for type [] and content type [],json返回值被解析为xml

    在使用restTemplate请求restful接口时,在特定情况下总会将返回的json数据解析为xml数据然后处理,接着就会爆出标题中的错误: Error while extracting resp ...

  8. Server returned HTTP response code 415 for URL , Content type text/plain charset=UTF-8 not support

    客户端 http 请求报错 415,具体如下: Server returned HTTP response code: 415 for URL: http://ip:port/xxx 服务器端 用的是 ...

  9. Java POI WPS另存为的XLSX Excel报错Package should contain a content type part [M1.13]

    最近在写项目的时候,使用到了POI对表格的处理,在通过文件流创建工作簿的时候,出现异常,异常信息是:Package should contain a content type part [M1.13] ...

最新文章

  1. android 定义集合长度,Android Dex文件结构解析
  2. linux下字节对齐
  3. GDCM:gdcm::UIComp的测试程序
  4. $.ajax防止多次点击重复提交的方法
  5. php 代码符号,网站开发编程中的特殊符号处理_php
  6. [机器学习]总结特征工程干货
  7. GprMax 3.1.5 建模的in文件编写详解(1)
  8. html 如何实现一条竖线边上有 刻度_Android H5交互Webview实现localStorage数据存储
  9. docker run
  10. 预测大盘最准确的指标_炒股天才江恩一辈子研究的指标,准确预测大盘走势
  11. Spring配置文件头及xsd文件版本浅析
  12. 计算机专业窗体的事件何时触发,高三计算机专业VB试题(六)1
  13. java突然无法加载主类_JAVA之中出现无法加载主类的情况解决方法
  14. 基于routeros的ADSL带宽叠加
  15. 读《Boost程序库完全开发指南》
  16. purifier 常用配置 保留 id 和 iframe
  17. python学习 -女神或者男神把微信消息撤回后好慌,有了这个妈妈再也不担心你看不到女神或者男神撤回的消息了(超详解)...
  18. 【译】Inside SafetyNet - part 3
  19. 迷宫寻宝(一) 82
  20. 树莓派4B开机自启动Python程序,发送WIFI-IP至指定邮箱

热门文章

  1. 汉字 Unicode编码范围及 计算文本的中文英文字数
  2. WPS表格 - Excel数据按颜色求和
  3. 一零零九、Docker搭建 全集群 环境配置
  4. 微信小程序出现:getLocation:fail auth deny
  5. Linux源码目录说明
  6. [项目管理]项目计划如何做
  7. 手机号,固定电话,400,800号码正则表达
  8. #论文阅读CTG The Use of Convolutional Neural Networks in Biomedical Data Processing
  9. c语言程序设计第一次月考考试重点,月考小技巧,助你得高分
  10. 华为上交 | GAN 将古典人像变3D,视角可切换