idea从maven导入jar包

背景:项目开发要用到第三方的接口,用idea来搞的,无耐只能研究下idea。

那么怎么引入jar是个问题,不然没法搞。

解决:

1、File-Project Struture

比如导入httpclient

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.10</version>
</dependency>

groupId:artifactId:version,这样就可以了。那么上面的应该:org.apache.httpcomponents:httpclient:4.5.10

查询下,然后确定就可以。

这样就引入了我们要导入的包,这个是从Maven上面导入的。

原文地址:https://www.cnblogs.com/jiduoduo/p/13563164.html