Spring Boot 探索之旅(一)——Spring Boot 简介

一、什么是Spring Boot

随着技术日新月异的发展,如今的软件设计已不想曾经那般单一。业务复杂,功能繁琐,大量三方组件的相互集成,成为了开发的一大难题。幸而,Spring Boot如同一道曙光,为我们java开发者带来了福音,让我们摆脱项目构架时各种配置的闹心,得以专心于项目逻辑的编写。

Spring Boot 的核心理念是“习惯优于配置”,它让大量依赖默认集成成为了可能。借助于Spring Boot 我们能做到以下几点:

1:对主流框架,不需要任何xml配置,即可默认集成

2:内嵌tomcat等服务器容器,无需打包为war,直接java -jar快捷部署运行

3:实时监控整个项目的运行状况

4:采用bean或者xml形式,引入自定义配置

5:通过 Spring Initializr 快速生成项目

二、Spring Boot的主要依赖

2.1  Spring Boot应用程序启动器

名称

描述

spring-boot-starter

核心启动器,包括自动配置支持,日志记录和YAML

spring-boot-starter-activemq

使用Apache ActiveMQ进行JMS消息传递

spring-boot-starter-amqp

使用Spring AMQP和Rabbit MQ

spring-boot-starter-aop

使用Spring AOP和AspectJ进行面向方面编程

spring-boot-starter-artemis

使用Apache Artemis进行JMS消息传递

spring-boot-starter-batch

使用Spring Batch批量处理

spring-boot-starter-cache

提供Spring Framework的缓存支持

spring-boot-starter-cloud-connectors

使用Spring Cloud Connectors的简化了Cloud Foundry和Heroku等云平台中的服务连接

spring-boot-starter-data-cassandra

使用Cassandra分布式数据库和Spring Data Cassandra

spring-boot-starter-data-cassandra-reactive

使用Cassandra分布式数据库和Spring Data Cassandra Reactive

spring-boot-starter-data-couchbase

使用Couchbase面向文档的数据库和Spring Data Couchbase

spring-boot-starter-data-couchbase-reactive

使用Couchbase面向文档的数据库和Spring Data Couchbase Reactive

spring-boot-starter-data-elasticsearch

使用Elasticsearch搜索和分析引擎以及Spring Data Elasticsearch

spring-boot-starter-data-jdbc

使用Spring Data JDBC

spring-boot-starter-data-jpa

使用Spring Data JPA与Hibernat

spring-boot-starter-data-ldap

使用Spring Data LDAP

spring-boot-starter-data-mongodb

使用MongoDB面向文档的数据库和Spring Data MongoDB

spring-boot-starter-data-mongodb-reactive

使用MongoDB面向文档的数据库和Spring Data MongoDB Reactive

spring-boot-starter-data-neo4j

使用Neo4j图形数据库和Spring Data Neo4j

spring-boot-starter-data-redis

与Spring Data Redis和Lettuce客户端一起使用Redis键值数据存储

spring-boot-starter-data-redis-reactive

使用Redis键值数据存储与Spring Data Redis被动和Lettuce客户端

spring-boot-starter-data-rest

使用Spring Data REST通过REST公开Spring Data存储库

spring-boot-starter-data-solr

使用Apache Solr搜索平台和Spring Data Solr

spring-boot-starter-freemarker

使用FreeMarker视图构建MVC Web应用程序

spring-boot-starter-groovy-templates

使用Groovy模板视图构建MVC Web应用程序

spring-boot-starter-hateoas

使用Spring MVC和Spring HATEOAS构建基于超媒体的RESTful Web应用程序

spring-boot-starter-integration

使用Spring Integration

spring-boot-starter-jdbc

将JDBC与HikariCP连接池一起使用

spring-boot-starter-jersey

使用JAX-RS和Jersey构建RESTful Web应用程序。替代spring-boot-starter-web

spring-boot-starter-jooq

使用jOOQ访问SQL数据库。替代spring-boot-starter-data-jpaspring-boot-starter-jdbc

spring-boot-starter-json

读写json

spring-boot-starter-jta-atomikos

使用Atomikos进行JTA交易

spring-boot-starter-jta-bitronix

使用Bitronix进行JTA事务

spring-boot-starter-mail

使用Java Mail和Spring Framework的电子邮件发送支持

spring-boot-starter-mustache

使用Mustache视图构建Web应用程序

spring-boot-starter-oauth2-oidc-client

使用Spring Security的OAuth2 / OpenID Connect客户端功能

spring-boot-starter-quartz

使用Quartz调度程序

spring-boot-starter-security

使用Spring Security 权限管理

spring-boot-starter-test

使用JUnit,Hamcrest和Mockito等库来测试Spring Boot应用程序

spring-boot-starter-thymeleaf

使用Thymeleaf视图构建MVC Web应用程序

spring-boot-starter-validation

使用Java Bean Validation和Hibernate Validator进行参数校验

spring-boot-starter-web

使用Spring MVC构建Web(包括RESTful)应用程序。使用Tomcat作为默认嵌入式容器

spring-boot-starter-web-services

使用Spring Web Services

spring-boot-starter-webflux

使用Spring Framework的Reactive Web支持构建WebFlux应用程序

spring-boot-starter-websocket

使用Spring Framework的WebSocket支持构建WebSocket应用程序

2.2  Spring Boot应用监控

名称

描述

spring-boot-starter-actuator

使用Spring Boot的Actuator的启动器,它提供生产就绪功能,帮助您监控和管理您的应用程序

2.3  Spring Boot服务容器或日志替换

名称

描述

spring-boot-starter-jetty

使用Jetty作为嵌入式servlet容器。替代spring-boot-starter-tomcat

spring-boot-starter-log4j2

使用Log4j2进行日志记录。替代spring-boot-starter-logging

spring-boot-starter-logging

使用Logback进行日志记录。默认日志启动器

spring-boot-starter-reactor-netty

使用Reactor Netty作为嵌入式响应式HTTP服务器。

spring-boot-starter-tomcat

使用Tomcat作为嵌入式servlet容器。使用的默认servlet容器启动器spring-boot-starter-web

spring-boot-starter-undertow

使用Undertow作为嵌入式servlet容器。替代spring-boot-starter-tomcat

 

猜你喜欢

转载自blog.csdn.net/qq_35813653/article/details/82838627