springboot3.1 使用restTemplate httpclient5 fastjson 配置
时间: 2024-06-08 18:05:40
浏览: 199
首先,需要在 `pom.xml` 文件中添加以下依赖:
```xml
<dependencies>
<!-- Spring Boot Web Starter -->
<dependency>
<groupId>[org](https://geek.csdn.net/educolumn/23d0bba68b71e0503af30ae29797603f?spm=1055.2569.3001.10083).springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Test Starter -->
<dependency>
<groupId>[org](https://geek.csdn.net/educolumn/23d0bba68b71e0503af30ae29797603f?spm=1055.2569.3001.10083).springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Apache HttpClient 5 -->
<dependency>
<groupId>[org](https://geek.csdn.net/educolumn/23d0bba68b71e0503af30ae29797603f?spm=1055.2569.3001.10083).apache.httpcomponents</groupId>
<artifactId>httpclient5</artifactId>
<version>5.1.2</version>
</dependency>
<!-- F[ast](https://geek.csdn.net/educolumn/1d2c256574d93ae646d4473629b198e6?spm=1055.2569.3001.10083)json -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>f[ast](https://geek.csdn.net/educolumn/1d2c256574d93ae646d4473629b198e6?spm=1055.2569.3001.10083)json</artifactId>
<version>1.2.78</version>
</dependency>
</dependencies>
```