0
点赞
收藏
分享

微信扫一扫

controller同时接收对象和字符串 && json字符串转换为javaBean对象

海滨公园 2022-03-12 阅读 77

前端传值
在这里插入图片描述
后端接收 和 控制台打印输出在这里插入图片描述

主要jar包
import net.sf.json.JSONObject;

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

引入后运行项目可能会报错
1、NoClassDefFoundError
2、Could not load [org.springframework.boot.actuate.endpoint.jmx.EndpointMBean]

因为我也是小白 遇到问题找度娘 第一个没有找出来
然后百度了第二个问题
然后

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot</artifactId>
	<version>2.4.1</version>
</dependency>
引入spring boot监控(貌似是的)
后
就可以了
举报

相关推荐

0 条评论