介绍下SpringBoot常用的依赖项

Spring Boot 是一个用于快速开发 Spring 应用程序的框架,它通过自动配置和依赖管理简化了开发过程。以下是一些 Spring Boot 项目中常用的依赖项:

1. Spring Boot Starter Web

  • 作用: 用于构建 Web 应用程序,包括 RESTful 服务。
  • 依赖项 : spring-boot-starter-web
  • 包含的库: Spring MVC, Tomcat, Jackson 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

2. Spring Boot Starter Data JPA

  • 作用: 用于简化数据库操作,支持 JPA(Java Persistence API)。
  • 依赖项 : spring-boot-starter-data-jpa
  • 包含的库: Hibernate, Spring Data JPA 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

3. Spring Boot Starter Thymeleaf

  • 作用: 用于构建服务器端渲染的 Web 应用程序,支持 Thymeleaf 模板引擎。
  • 依赖项 : spring-boot-starter-thymeleaf
  • 包含的库: Thymeleaf, Spring Web 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

4. Spring Boot Starter Security

  • 作用: 用于添加安全性功能,如认证和授权。
  • 依赖项 : spring-boot-starter-security
  • 包含的库: Spring Security 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>

5. Spring Boot Starter Test

  • 作用: 用于编写单元测试和集成测试。
  • 依赖项 : spring-boot-starter-test
  • 包含的库: JUnit, Mockito, Spring Test 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
</dependency>

6. Spring Boot Starter Actuator

  • 作用: 用于监控和管理应用程序。
  • 依赖项 : spring-boot-starter-actuator
  • 包含的库: Spring Actuator 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

7. Spring Boot Starter Data MongoDB

  • 作用: 用于与 MongoDB 数据库进行交互。
  • 依赖项 : spring-boot-starter-data-mongodb
  • 包含的库: Spring Data MongoDB 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>

8. Spring Boot Starter Cache

  • 作用: 用于简化缓存配置。
  • 依赖项 : spring-boot-starter-cache
  • 包含的库: Spring Cache 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-cache</artifactId>
</dependency>

9. Spring Boot Starter Mail

  • 作用: 用于发送电子邮件。
  • 依赖项 : spring-boot-starter-mail
  • 包含的库: JavaMail, Spring Mail 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mail</artifactId>
</dependency>

10. Spring Boot Starter AOP

  • 作用: 用于支持面向切面编程(AOP)。
  • 依赖项 : spring-boot-starter-aop
  • 包含的库: Spring AOP, AspectJ 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-aop</artifactId>
</dependency>

11. Spring Boot Starter Batch

  • 作用: 用于批处理应用程序。
  • 依赖项 : spring-boot-starter-batch
  • 包含的库: Spring Batch 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-batch</artifactId>
</dependency>

12. Spring Boot Starter AMQP

  • 作用: 用于与 AMQP(高级消息队列协议)消息代理(如 RabbitMQ)进行交互。
  • 依赖项 : spring-boot-starter-amqp
  • 包含的库: Spring AMQP, RabbitMQ 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-amqp</artifactId>
</dependency>

13. Spring Boot Starter Data Redis

  • 作用: 用于与 Redis 数据库进行交互。
  • 依赖项 : spring-boot-starter-data-redis
  • 包含的库: Spring Data Redis, Lettuce 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

14. Spring Boot Starter WebSocket

  • 作用: 用于构建 WebSocket 应用程序。
  • 依赖项 : spring-boot-starter-websocket
  • 包含的库: Spring WebSocket 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

15. Spring Boot Starter Validation

  • 作用: 用于支持 Bean Validation API。
  • 依赖项 : spring-boot-starter-validation
  • 包含的库: Hibernate Validator 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-validation</artifactId>
</dependency>

16. Spring Boot Starter Logging

  • 作用: 用于日志记录。
  • 依赖项 : spring-boot-starter-logging
  • 包含的库: Logback, SLF4J 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-logging</artifactId>
</dependency>

17. Spring Boot Starter JSON

  • 作用: 用于处理 JSON 数据。
  • 依赖项 : spring-boot-starter-json
  • 包含的库: Jackson 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-json</artifactId>
</dependency>

18. Spring Boot Starter JDBC

  • 作用: 用于简化 JDBC 操作。
  • 依赖项 : spring-boot-starter-jdbc
  • 包含的库: Spring JDBC, Tomcat JDBC 连接池 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

19. Spring Boot Starter Freemarker

  • 作用: 用于支持 Freemarker 模板引擎。
  • 依赖项 : spring-boot-starter-freemarker
  • 包含的库: Freemarker, Spring Web 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>

20. Spring Boot Starter Mustache

  • 作用: 用于支持 Mustache 模板引擎。
  • 依赖项 : spring-boot-starter-mustache
  • 包含的库: Mustache, Spring Web 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mustache</artifactId>
</dependency>

21. Spring Boot Starter Groovy Templates

  • 作用: 用于支持 Groovy 模板引擎。
  • 依赖项 : spring-boot-starter-groovy-templates
  • 包含的库: Groovy Templates, Spring Web 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-groovy-templates</artifactId>
</dependency>

22. Spring Boot Starter Velocity

  • 作用: 用于支持 Velocity 模板引擎。
  • 依赖项 : spring-boot-starter-velocity
  • 包含的库: Velocity, Spring Web 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-velocity</artifactId>
</dependency>

23. Spring Boot Starter JOOQ

  • 作用: 用于支持 JOOQ(Java Object Oriented Querying)。
  • 依赖项 : spring-boot-starter-jooq
  • 包含的库: JOOQ, Spring JDBC 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jooq</artifactId>
</dependency>

24. Spring Boot Starter Data REST

  • 作用: 用于快速构建 RESTful 服务,基于 Spring Data REST。
  • 依赖项 : spring-boot-starter-data-rest
  • 包含的库: Spring Data REST, Spring HATEOAS 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>

25. Spring Boot Starter Data Elasticsearch

  • 作用: 用于与 Elasticsearch 进行交互。
  • 依赖项 : spring-boot-starter-data-elasticsearch
  • 包含的库: Spring Data Elasticsearch 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>

26. Spring Boot Starter Data Cassandra

  • 作用: 用于与 Cassandra 数据库进行交互。
  • 依赖项 : spring-boot-starter-data-cassandra
  • 包含的库: Spring Data Cassandra 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-cassandra</artifactId>
</dependency>

27. Spring Boot Starter Data Couchbase

  • 作用: 用于与 Couchbase 数据库进行交互。
  • 依赖项 : spring-boot-starter-data-couchbase
  • 包含的库: Spring Data Couchbase 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-couchbase</artifactId>
</dependency>

28. Spring Boot Starter Data LDAP

  • 作用: 用于与 LDAP 服务器进行交互。
  • 依赖项 : spring-boot-starter-data-ldap
  • 包含的库: Spring Data LDAP 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-ldap</artifactId>
</dependency>

29. Spring Boot Starter Data Neo4j

  • 作用: 用于与 Neo4j 图数据库进行交互。
  • 依赖项 : spring-boot-starter-data-neo4j
  • 包含的库: Spring Data Neo4j 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>

30. Spring Boot Starter Data Solr

  • 作用: 用于与 Solr 搜索引擎进行交互。
  • 依赖项 : spring-boot-starter-data-solr
  • 包含的库: Spring Data Solr 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-solr</artifactId>
</dependency>

31. Spring Boot Starter Data Gemfire

  • 作用: 用于与 Gemfire 数据网格进行交互。
  • 依赖项 : spring-boot-starter-data-gemfire
  • 包含的库: Spring Data Gemfire 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-gemfire</artifactId>
</dependency>

32. Spring Boot Starter Data Geode

  • 作用: 用于与 Geode 数据网格进行交互。
  • 依赖项 : spring-boot-starter-data-geode
  • 包含的库: Spring Data Geode 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-geode</artifactId>
</dependency>

33. Spring Boot Starter Data REST

  • 作用: 用于快速构建 RESTful 服务,基于 Spring Data REST。
  • 依赖项 : spring-boot-starter-data-rest
  • 包含的库: Spring Data REST, Spring HATEOAS 等。
xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
相关推荐
B站计算机毕业设计超人34 分钟前
计算机毕业设计制造业MES生产管理平台 MES 生产制造源码+文档+运行视频+讲解视频)
java·spring boot·mysql·eclipse·tomcat·maven·web
技术咖啡馆C1 小时前
二、通义灵码插件保姆级教学-IDEA(使用篇)
java·intellij-idea·通义灵码·ai助手·idea-plugin
星星点点洲2 小时前
【SpringBoot实现全局API限频】 最佳实践
java·spring boot·后端
华梦岚2 小时前
F#语言的学习路线
开发语言·后端·golang
linwq82 小时前
Java网络编程学习(一)
java·网络·学习
lllsure2 小时前
【快速入门】SpringMVC
java·后端·spring·mvc
翻晒时光2 小时前
24、深入理解与使用 Netty:Java 高性能网络编程的利器
java·网络
心之语歌2 小时前
RabbitMQ 在 Spring Boot中使用方式
spring boot·rabbitmq·java-rabbitmq
梅清瑶3 小时前
Powershell语言的数据库编程
开发语言·后端·golang
阿芯爱编程3 小时前
java面试题
java·后端