一、新建项目
通过 http://start.spring.io/ 构建简单的 Spring Boot 工程。
二、把工程导入 eclipse 后,在 pom.xml 中添加相关的 maven 依赖
- 1、Jsoup 依赖
- 2、由于需要用到 http 请求访问对应的页面,所以需要引入 httpclient 依赖。
<!-- Jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.10.3</version>
</dependency>
<!-- httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency>