🏹 Solon环境安装
# 依赖
对于 Solon 项目来说, 只需要添加 forest-solon-plugin 依赖即可
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-solon-plugin</artifactId>
<version>1.5.33</version>
</dependency>
1
2
3
4
5
2
3
4
5
compile group: 'com.dtflys.forest', name: 'forest-spring-boot-starter', version: '1.5.33'
1
// Make sure to add code blocks to your code group
# JSON框架依赖
Solon 已自带的 JSON 框架扩展包,如(solon.serialization.fastjson
和solon.serialization.jackson
),如果已添加过这些扩展包可以跳过此步。
但若没有,或想用和 Solon 序列化扩展包不同的 JSON 框架,可以添加以下依赖:
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
Jackson依赖:版本 >= 2.9.10
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.10</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.10</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.10</version>
</dependency>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.10'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.10'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.10'
1
2
3
2
3
// Make sure to add code blocks to your code group
# XML框架依赖
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-jaxb</artifactId>
<version>1.5.33</version>
</dependency>
1
2
3
4
5
2
3
4
5
compile group: 'com.dtflys.forest', name: 'forest-jaxb', version: '1.5.33'
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