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


<<:  .NET Core第22天_FormActionTagHelper的使用

>>:  工欲善其事,必先利其器

day14: 模组化好的写法 -单一功能原则(2)

接续前一天的单一功能原则,我们重构了 fetchUser 变成一个 customer hook , ...

[Day20] Flutter - Theme: Dark mode & Light mode(part4)

前言 Hi, 我是鱼板伯爵今天要教如何利用Theme结合Bloc来切换主题配色,教学内容只会撷取片段...

[Day23]solidity合约内容讲解part.1

因为它原本就会有一个storage是先帮你写好的,或许你第一次看到的时候会不知道这是甚麽,那我们会...

[Day 5] Ktor 微框架就如同一间毛胚屋,先来列出想要整合的框架及实作的功能清单

Ktor 的架构设计及开发风格是我所喜欢的,但相对地使用 Ktor 开发也要付出代价。因为 Ktor...

专注,就是你要懂得说不。

专注,就是你要懂得说不。 Focus means saying no. 苹果创办人 Steve Jo...