將看到的Spring Boot依賴記錄下來;
下列dependency採用從父依賴繼承版本的方式:Spring Boot 父依賴如下:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
- 1
- 2
- 3
- 4
- 5
- 6
SpringBoot的依賴和其描述及其dependency:
1)名稱 : spring-boot-starter
描述:核心Spring Boot starter ,包括自動配置支持,日誌和YAML;
2)名稱 :spring-boot-starter-actuator
描述:生產準備的特性,用於幫你監控和管理應用;
pom:
<!--從父依賴那繼承版本號,下面省略此註釋-->
<!--生產準備的特性,用於幫你監控和管理應用 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
3)名稱 :spring-boot-starter-amqp
描述:對高級消息隊列協議的支持,通過spring-rabbit實現;
pom:
<!--對高級消息隊列協議的支持,通過SpringBoot-rabbit實現 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
4)名稱 :spring-boot-starter-aop
描述:對面向切面變成的支持,通過spring-aop和AspectJ
pom:
<!--對面向切面變成的支持,通過spring-aop和AspectJ -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
5)名稱 :spring-boot-starter-batch
描述:對Spring batch 的支持,包括HSQLDB數據庫
pom:
<!--對Spring batch 的支持,包括HSQLDB數據庫 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
6)名稱 :spring-boot-starter-cloud-connection
描述:對Spring Cloud Connection的支持,簡化在雲平臺下(例如,Cloud Foundry和Heroku)服務的連接;
7)名稱 :spring-boot-starter-elasticsearch
描述:對Elasticsearche搜索和分析引擎的支持,包括spring-data-elasticsearch;
8)名稱 :spring-boot-starter-data-gemfire
描述:對GemFire分佈式數據存儲的支持,包括spring-data-gemfire;
pom:
<!--對GemFire分佈式數據存儲的支持,包括spring-data-gemfire-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-gemfire</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
9)名稱 :spring-boot-starter-data-jpa
描述:對java持久化API的支持,包括Spring-data-jpa,spring-orm和Hibernate;
pom:
<!--對java持久化API的支持,包括Spring-data-jpa,spring-orm和Hibernate-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
10)名稱 :spring-boot-starter-data-mongodb
描述:對MongoDB NOSQL數據庫的支持,包括spring-data-mongodb;
pom:
<!--對MongoDB NOSQL數據庫的支持,包括spring-data-mongodb-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
11)名稱 :spring-boot-starter-data-rest
描述:通過對REST暴露Spring data倉庫的支持,通過spring-data-rest-webmvc實現;
pom:
<!--通過對REST暴露Spring data倉庫的支持,通過Spring-data-rest-webmvc實現-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
12)名稱 :spring-boot-starter-data-solr
描述:對Apache Solr搜索平臺的支持,包括spring-data-solr;
pom:
<!--對Apache Solr搜索平臺的支持,包括spring-data-solr-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-solr</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
13)名稱 :spring-boot-starter-freemaker
描述:對FreeMarker模板引擎的支持;
pom:
<!--對FreeMarker模板引擎的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
14)名稱 :spring-boot-starter-Groovy
描述:對Groovy模板引擎的支持;
15)名稱 :spring-boot-starter-hateoas
描述:對基於HATEOAS的RESTful服務的支持,通過spring-hateoas;
pom:
<!--對基於HATEOAS的RESTful服務的支持,通過Spring-hateoas;-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
16)名稱 :spring-boot-starter-integration
描述:對普通spring-integration模塊的支持;
pom:
<!--對普通Spring-integration模塊的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-integration</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
17)名稱 :spring-boot-starter-hornetq
描述:對”java消息服務API”的支持,通過HornetQ實現;
18)名稱 :spring-boot-starter-jdbc
描述:對JDBC數據庫的支持;
pom:
<!--對JDBC數據庫的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
19)名稱 :spring-boot-starter-jersey
描述:對Jersey RESTful Web服務框架的支持;
pom:
<!--對Jersey RESTful Web服務框架的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
20)名稱 :spring-boot-starter-jta-atomikos
描述:對JTA分佈式事務的支持。通過Atomikos實現;
pom:
<!--對JTA分佈式事務的支持,通過Atomikos-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
21)名稱 :spring-boot-starter-jta-bitronix
描述:對JTA分佈式事務的支持,通過Bitronix實現;
pom:
<!--對JTA分佈式事務的支持,通過Bitronix實現-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-bitronix</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
22)名稱 :spring-boot-starter-mail
描述:對javax.mail的支持;
pom:
<!--對javax.mail的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
23)名稱 :spring-boot-starter-mobile
描述:對spring-mobile的支持;
pom:
<!--對spring-mobile的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mobile</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
24)名稱 :spring-boot-starter-redis
描述:對REDIS鍵值數據存儲的支持,包括Spring-redis;
25)名稱 :spring-boot-starter-security
描述:對spring -security模板引擎的支持;
pom:
<!--對spring -security模板引擎的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
26)名稱 :spring-boot-starter-social-facebook
描述:對spring-social-facebook的支持;
pom:
<!--對spring-social-facebook的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-social-facebook</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
27)名稱 :spring-boot-starter-social-twitter
描述:對spring-social-twitter的支持;
pom:
<!--對spring-social-twitter的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-social-twitter</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
28)名稱 :spring-boot-starter-test
描述:對常用測試依賴的支持,包括JUnit,Hamcrest和Mockito還有spring-test模塊;
pom:
<!--對常用測試依賴的支持,包括JUnit,Hamcrest和Mockito還有Spring-test模塊-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
29)名稱 :spring-boot-starter-thymeleaf
描述:對Thymeleaf模板引擎的支持,包括和Spring的集成;
pom:
<!--對Thymeleaf模板引擎的支持,包括和Spring的集成-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
30)名稱 :spring-boot-starter-velocity
描述:對velocity模板引擎的支持;
31)名稱 :spring-boot-starter-web
描述:對全棧web開發的支持,包括Tomcat和spring-webmvc;
pom:
<!--對全棧web開發的支持,包括Tomcat和spring-webmvc-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
32)名稱 :spring-boot-starter-websocket
描述:對websocket開發的支持;
pom:
<!--對websocket開發的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
33)名稱 :spring-boot-starter-ws
描述:對Spring web服務的支持;
最後,Spring Boot包含一些可用於排除或交換具體技術方面的starters;
34)名稱 :spring-boot-starter-jetty
描述:導入Jetty HTTP引擎(作爲Tomcat的代替);
pom:
<!--導入Jetty HTTP引擎(作爲Tomcat的代替-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
35)名稱 :spring-boot-starter-logging
描述:對Log4J日誌系統的支持;
pom:
<!--對Log4J日誌系統的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
36)名稱 :spring-boot-starter-logging
描述:導入SpringBoot的默認日誌系統(Logback);
pom:
<!--導入SpringBoot的默認日誌系統(Logback-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
37)名稱 :spring-boot-starter-tomcat
描述:導入SpringBoot的默認HTTP引擎(Tomcat);
pom:
<!--導入SpringBoot的默認HTTP引擎(Tomcat-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
38)名稱 :spring-boot-starter-undertow
描述:導入Undertow HTTP引擎(作爲tomcat的代替);
pom:
<!--導入Undertow HTTP引擎(作爲tomcat的代替-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
- 1
- 2
- 3
- 4
- 5
參看了資料將常用的和可能用到的依賴記下,最後我的pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zlc</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!--從父依賴那繼承版本號-->
<!--生產準備的特性,用於幫你監控和管理應用 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!--對高級消息隊列協議的支持,通過SpringBoot-rabbit實現 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<!-- 對面向切面變成的支持,通過spring-aop和AspectJ -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!--對Spring batch 的支持,包括HSQLDB數據庫 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<!-- 對MongoDB NOSQL數據庫的支持,包括spring-data-mongodb-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<!-- 通過對REST暴露Spring data倉庫的支持,通過Spring-data-rest-webmvc實現-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<!-- 對java持久化API的支持,包括Spring-data-jpa,spring-orm和Hibernate-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-solr</artifactId>
</dependency>
<!-- 對FreeMarker模板引擎的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<!-- 對基於HATEOAS的RESTful服務的支持,通過Spring-hateoas;-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<!-- 對普通Spring-integration模塊的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-integration</artifactId>
</dependency>
<!-- 對JDBC數據庫的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!-- 對Jersey RESTful Web服務框架的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<!-- 對JTA分佈式事務的支持,通過Atomikos-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
</dependency>
<!-- 對JTA分佈式事務的支持,通過Bitronix實現-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-bitronix</artifactId>
</dependency>
<!-- 對javax.mail的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!-- 對spring-mobile的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mobile</artifactId>
</dependency>
<!-- 對spring -security模板引擎的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- 對spring-social-facebook的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-social-facebook</artifactId>
</dependency>
<!-- 對spring-social-twitter的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-social-twitter</artifactId>
</dependency>
<!-- 對常用測試依賴的支持,包括JUnit,Hamcrest和Mockito還有Spring-test模塊;-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<!-- 對Thymeleaf模板引擎的支持,包括和Spring的集成;-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- 對全棧web開發的支持,包括Tomcat和spring-webmvc;-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- 對websocket開發的支持-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!-- 導入Jetty HTTP引擎(作爲Tomcat的代替)-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- 導入SpringBoot的默認日誌系統(Logback)-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<!-- 導入SpringBoot的默認HTTP引擎(Tomcat)-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<!-- 導入Undertow HTTP引擎(作爲tomcat的代替)-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<!-- 對GemFire分佈式數據存儲的支持,包括spring-data-gemfire-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-gemfire</artifactId>
</dependency>
<!-- 對java持久化API的支持,包括Spring-data-jpa,spring-orm和Hibernate-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210
- 211
- 212
- 213
- 214
- 215
- 216
- 217
- 218
- 219
- 220
- 221