惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
博客园_首页
博客园 - 聂微东
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
D
Docker
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
B
Blog RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Jina AI
Jina AI
博客园 - Franky
D
DataBreaches.Net

博客园 - 秦岭过客

BigDecimal SourceTree for Mac 不断弹出“输入密码”框 两组日期取交集 LocalDateTime、LocalDate、Long、Date、String 相互转换 macbook 蓝牙关闭按钮灰色的 freemarker java BigDecimal pom.xml spring @Transactional注解参数详解 B树、B+树、二叉树、红黑树 Vector、List、LinkedList HashSet、HashMap、Hashtable、TreeMap循环、区别 java线程初写,陆续更新中。。 Thread的六中状态 mac shell mac 安装Sequel Pro Error:java: Compilation failed: internal java compiler error idea 取消控制台的行数限制 【JXL】导出Excel
JsonObject没有fromObject、idea引入maven有红线没依赖、Json...
秦岭过客 · 2018-03-07 · via 博客园 - 秦岭过客

目录:

1、JsonObject maven 依赖包

2、idea引入maven有红线,没依赖

3、JsonObject没有fromObject

\\\\\\\\\\\\\\\\\\\\\\\

1、JsonObject maven 依赖包

一共就用一个,但是功能全就六个,我也是上网查到的。

pom.xml如下:

<dependencies>

<!-- https://mvnrepository.com/artifact/net.sf.json-lib/json-lib -->
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160810</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sf.ezmorph/ezmorph -->
<dependency>
<groupId>net.sf.ezmorph</groupId>
<artifactId>ezmorph</artifactId>
<version>1.0.6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>

<!--用于解析json-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>

</dependencies>

2、idea引入maven有红线,没依赖。
原因不少,
可能是路径错了,
或者是仓库里根本就没有下载来,
有的是电脑卡,没缓冲上,可以点一下如下图。

还有一个是:少了如下红框的。网上查着说classifier“它表示在相同版本下针对不同的环境或者jdk使用的jar,如果配置了这个元素,则会将这个元素名在加在最后来查找相应的jar”

意思我理解是:路径什么的都对,但是那个jar你还要再定一下。

3、JsonObject没有fromObject

这个事挺操蛋的。

你有可能是用了这个包

但是fromObject在下面这个包里