java.lang.IllegalArgumentException: No converter found for return value of type:class 解决方案

GSON数据解析异常报错java.lang.IllegalArgumentException: Unable to create converter for 创维v5机型gson解析数据造成应用闪退 异常log要点:java.lang.NoSuchMethodError: com.google.gson.Gson.newJsonReader 异常log要点:java.lang.IllegalArgumentException: Unable to create converter for <class> 项目使用框架:retrofit... 阅读详情

今天在使用springMvc框架时,想让controller返回json数据的时候,报出了这异常。

原因:SpringMvc本身没有序列化对象的功能,需要导入jackson的第三方jar包。

解决方案:在maven中添加如下代码:

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.8.8</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.8.8</version>
    </dependency>

别再死磕AUTOSAR文档了!手把手教你用ISOLAR-A配置BswM模块(附实战流程图) 本文通过Vector ISOLAR-A工具实战演示AUTOSAR BswM模块的配置流程,帮助工程师快速掌握基础软件模式管理。从环境准备到模式仲裁规则配置,再到动作列表实现,详细讲解每个步骤,并提供常见问题排查和高级优化技巧,大幅提升开发效率。 阅读详情

相关推荐

C语言新手必练:10个实战小项目带你快速上手(附完整代码)

本文为C语言初学者精选10个实战项目,从基础的温度转换器到高级的迷宫求解算法,涵盖输入输出、条件判断、循环控制、数组操作等核心知识点。每个项目配有完整代码和详细解析,帮助新手通过实践掌握编程思维,特别适合刚学完语法但缺乏实战经验的学习者。

weixin_29208077的博客 750

已解决:No converter for [class XXX] with preset Content-Type ‘application/csv;charset=UTF-8‘]

导出excel、pdf文件后台报异常,但是文件可以正常导出和查看。controller层返回值改为void。

naruto227的博客 4944

TCNOpen实现TRDP通信协议(源码编译运行测试)

概述 本文介绍了通过TCNOpen开源源码实现TRDP通信,包括源码下载,开发环境搭建,编译运行,测试。 Linux环境下编译运行TRDP (一) 下载CANOpen源码。 下载地址:https://sourceforge.net/p/tcnopen/trdp/HEAD/tree/ (二) 源码编译 下载源码解压过后,在根目录文件readme-makefile.txt有介绍源码的配置和编译方法。 在trdp/config目录下可以看到包含在linux环境下的编译配置文件LINUX_config;执行”m

fengweibo112的博客 9635

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

org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class cn.guet.utils.Result] with preset Content-Type 'multipart/form-data'

qq_53318060的博客 1万+

emwin与Modbus通信结合:项目实例

通过实际项目讲解emwin界面设计与Modbus通信协议的融合应用,深入剖析数据交互流程。掌握emwin在工业控制场景中的实用技巧,提升系统人机交互与稳定通信能力。

weixin_34618526的博客 483

MQTT在智能家居中的实战:用Android手机控制ESP8266设备(基于EMQX)

本文详细介绍了如何利用MQTT协议构建一个完整的智能家居控制系统,通过Android手机App远程操控ESP8266设备。文章提供了从EMQX服务器部署、ESP8266端Arduino固件开发到Android客户端搭建的完整实战指南,并深入探讨了系统联调、稳定性优化与安全加固等关键环节,为物联网开发者提供了一套可复用的解决方案。

ujm567890的博客 457

已解决:No converter for [class XXX] with preset Content-Type ‘XXX‘

No converter for [class XXX] with preset Content-Type 'XXX,No converter for [class XXX] with preset Content-Type ‘application/vnd.ms-excel;charset=utf-8‘,No converter for [class XXX] with preset Content-Type 'application/octet-stream;charset=UTF-8‘

青灯文案的博客 2369

永磁同步电机自抗扰控制ADRC(位置环/速度环控制器)Matlab/Simulink仿真(S-Function)

ESO是ADRC的核心,其作用是跟踪被控对象的输出,同时给出受控对象的各阶状态变量以及系统总扰动的实时估计,将其补偿到控制器中,实现动态补偿线性化。NLSEF采用非线性函数把TD产生的跟踪及微分信号与ESO给出的状态变量估计值之间的误差进行非线性组合得到初级控制量,然后同总扰动的补偿量一起生成最终的控制信号。自抗扰控制(ADRC)技术的核心思想是将简单的积分串联型视为标准模型,把系统模型中不同于标准型的部分和外部干扰之和视为总扰动,并将其扩张为一个新的状态。看作系统内外部扰动之和。令一个高阶状态变量为。

m0_66341377的博客 7615

Unable to create converter for class`

测试的时候出了问题。 java.lang.IllegalArgumentException: Unable to create converter for class` 最后查看代码少了一句话而已。真是闹心啊。Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://apis.baidu.com/ac

人生在世 1万+

DICOM图像知识:深入详解DICOM的层级关系

解析DICOM的四个主要层级:Patient(患者)、Study(检查)、Series(序列)和SOP(服务-对象对),探讨它们之间的关系、各自的唯一标识符以及在实际应用中的用途

编程技术探索者,分享C/C++、C#、Java、数据库等开发经验,聚焦实战技巧与AI兴趣,助力编程爱好者成长。 3305

基于Xilinx XDMA 的PCIE通信

基于Xilinx XDMA 的PCIE通信 概述:   想实现基于FPGA的PCIe通信,查阅互联网各种转载…基本都是对PCIe的描述,所以想写一下基于XDMA的PCIe通信的实现(PCIe结构仅做简单的描述(笔记),了解详细结构移至互联网)。实践实践!!! 说明: 参考文档: PCI Express Base Specification Revision 3.0 PCI Express Base Specification Revision 5.0 pg195-pcie-dma PCI Express体系

Crazzy_M的博客 1万+

no argument java_解决java.lang.IllegalArgumentException: No converter found for return value of type: ...

一、背景最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回List的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter found for return va...

weixin_36036447的博客 389

手把手教你学Simulink——基于通信协议与标准的场景实例:卫星通信中的网络安全协议(IPSec)仿真

随着卫星通信在国防、金融、应急指挥、能源管网等关键领域的广泛应用,其安全性已成为系统设计的核心要求。然而,卫星链路具有广播特性、长距离传输、地面站分布广等特点,极易遭受窃听、篡改、重放、中间人攻击等网络威胁。传统的“信任链路层安全”已不足以应对现代网络攻击。为此,国际标准组织(如IETF、ETSI、CCSDS)推荐在卫星通信中部署协议,实现端到端的数据机密性、完整性、身份认证和抗重放保护。本文将手把手教你如何在中构建一个符合标准的仿真系统,涵盖从明文传输到加密隧道的完整安全链路建模。本文完整实现了。

MHD0815的博客 151

解决java.lang.IllegalArgumentException: No converter found for return value of type: class java.util

Controller方法中return 数据时候,适用@ResponseBody注解进行返回List<对象>的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.Ar...

qq_41172982的博客 708

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

【已解决】java.lang.IllegalArgumentException: No converter found for return value of type: class java.uti

最近在做自己的网站,有一个模块是点赞,为了减小不必要的数据传递,考虑用ajax+json与后台(spring mvc)交互实现。 run的时候,后台controller能够接收到前台传来的数据,也能够写入mysql中,但是前台不能接收到返回信息,eclipse抛出出现了如下异常: java.lang.IllegalArgumentException: No converter found fo

geniusle201的博客 7956

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

java.lang.IllegalArgumentException: No converter found for return value of type

遇见 java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList 解决办法 如果我们碰见这个问题一般是我们在配置pom文件的时候,缺包所导致的 主要原因是:这是因为springmvc默认是没有对象转换成json的转换器的,需要手动添加jackso...

hello_heheha的博客 578

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

解决java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.A...

一、背景   最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回List&lt;对象&gt;的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter ...

Realize My Dream 488

maven中ssm项目报错java.lang.IllegalArgumentException: No converter found for return value of type: class

java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.HashMap 查阅百度后解决问题,问题出在返回的Jackson数据没有导依赖 <!--jackson依赖--> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifact

qq_43266942的博客 252

java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.Has

今天使用了一个开源项目 是基于SpringMVC架构编写的项目  发现在Controller里加入@ResponseBody注解之后 返回的类型转换成JSON对象会出错  控制台里反馈 org.springframework.web.util.NestedServletException: Request processing failed; nested exception

a751101884的博客 5624

解决返回JSON时报错:No converter found for return value of type:

exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class com...

Li_born的博客 1万+

解决java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.A

一、背景   最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回List&lt;对象&gt;的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter found...

Heavy_Dream的博客 544

整合SSM之springmvc 报错:No converter found for return value of type: class java.util.ArrayList

今天用idea整合SSM时测试报错 java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayList org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConv...

lgb1997的博客 573

@ResponseBody java.lang.IllegalArgumentException: No converter found for return value of type:class

最近在搭建SSM项目,在使用@ResponseBody注解返回Json数据时出现了问题,报错java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.HashMap,问题已解决,在这里做下备份。如下是在网上找到的解决办法;1、导入jackson 2.5.4包2、在...

冰零0o的博客 1083

报错处理:java.lang.IllegalArgumentException: No converter found for return value of type:

SpirngBoot项目访问Restful类型的接口时报错: java.lang.IllegalArgumentException: No converter found for return value of type: class com.example.demo.result.Result 原因:返回的Result类中缺少Get、Set方法 /** * 成功时调用 *...

z_z_h_0的博客 1084

解决java.lang.IllegalArgumentE:No converter found for return value of type: class java.util.ArrayList

最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回List<对象>的json数据时出现了:nested exception is java.lang.IllegalArgumentException: No converter found for ret...

三枪不倒地 481

java.lang.IllegalArgumentException: No converter found for return value of type: class

原文地址http://stackoverflow.com/questions/33832735/spring-boot-application-no-converter-found-for-return-value-of-type 原因:请求返回的数据无法转换,需要添加如下配置 1.在pom.xml 里添加 com.fasterxml.jackson.core

我是天才的专栏 1万+
上一篇: SQL语句优化(来自十年经验架构师的课堂)
下一篇: MyBatis配置文件resultMap可省略的情况
LiQiyaoo
博客等级 码龄11年 337粉丝 206原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值