🏹 Springboot3环境安装
# 依赖
对于 Springboot 项目来说, 只需要添加 forest-spring-boot-starter 依赖即可
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-spring-boot3-starter</artifactId>
<version>1.5.35</version>
</dependency>
1
2
3
4
5
2
3
4
5
compile group: 'com.dtflys.forest', name: 'forest-spring-boot3-starter', version: '1.5.35'
1
// Make sure to add code blocks to your code group
# JSON框架依赖
Springboot 已自带 Jackson 框架依赖,如需要 Fastjson,请添加以下依赖。否则可以跳过此步
Fastjson依赖:版本 >= 1.2.48
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.73</version>
</dependency>
1
2
3
4
5
2
3
4
5
compile group: 'com.alibaba', name: 'fastjson', version: '1.2.73'
1
// Make sure to add code blocks to your code group
# XML框架依赖
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-jakarta-xml</artifactId>
<version>1.5.35</version>
</dependency>
1
2
3
4
5
2
3
4
5
compile group: 'com.dtflys.forest', name: 'forest-jakarta-xml', version: '1.5.35'
1
// Make sure to add code blocks to your code group
# Protobuf框架依赖
如果您的项目需要使用 Protobuf, 就需要引入 Google 的 Protobuf 包依赖
若是已经引入了 forest-spring-boot-starter
启动包,就不用再引入该依赖了,因为在 Forest 的启动包中已经传递依赖此包
版本 >= 3.14.0
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.18.1</version>
</dependency>
1
2
3
4
5
2
3
4
5
compile group: 'com.google.protobuf', name: 'protobuf-java', version: '3.18.1'
1
// Make sure to add code blocks to your code group
帮助我们改善此文档 (opens new window)
上次更新: 2024/02/27, 12:43:35