iT邦幫忙

2021 iThome 鐵人賽

DAY 7
1
Modern Web

誤打誤撞學了Spring Boot 還當了後端工程師系列 第 7

Day 07 - Spring Boot 常用依賴

正如Day 04 - Spring Boot 的前世今生所說,Spring Boot 為了簡化設定提供了大量開箱即用的starter,這邊會列出一些常用的依賴,雖然不會每個都實作一遍,但先知道有支援哪些功能,未來開發有需要時才用得到。

spring-boot-starter-web

Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
</dependency>

spring-boot-starter-test

Starter for testing Spring Boot applications with libraries including JUnit Jupiter, Hamcrest and Mockito

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-test</artifactId>
	<scope>test</scope>
</dependency>

spring-boot-starter-data-jpa

Starter for using Spring Data JPA with Hibernate

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

spring-boot-starter-data-jdbc

Starter for using Spring Data JDBC

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-data-jdbc</artifactId>
</dependency>

spring-boot-starter-thymeleaf

Starter for building MVC web applications using Thymeleaf views

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

spring-boot-starter-mail

Starter for using Java Mail and Spring Framework's email sending support

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-mail</artifactId>
</dependency>

spring-boot-starter-integration

Starter for using Spring Integration

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-integration</artifactId>
</dependency>

spring-boot-starter-data-redis

Starter for using Redis key-value data store with Spring Data Redis and the Lettuce client

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

spring-boot-starter-validation

Starter for using Java Bean Validation with Hibernate Validator

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

spring-boot-starter-websocket

Starter for building WebSocket applications using Spring Framework's WebSocket support

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

spring-boot-starter-web-services

Starter for using Spring Web Services

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>

spring-boot-starter-hateoas

Starter for building hypermedia-based RESTful web application with Spring MVC and Spring HATEOAS

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>

spring-boot-starter-security

Starter for using Spring Security

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-security</artifactId>
</dependency>

參考網站

Maven Repository


上一篇
Day 06 - MVC 與三層架構
下一篇
Day 08 - Spring Boot 常用註釋(上)
系列文
誤打誤撞學了Spring Boot 還當了後端工程師30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言