SpringBoot是由Pivotal團隊提供的全新框架,旨在簡化新Spring應用的初始搭建以及開發過程。以下是一些關于SpringBoot的詳細介紹:
- 設計目的:SpringBoot通過特定的方式來進行配置,使得開發人員不再需要定義樣板化的配置,從而簡化了編碼、配置、部署和監控等過程。
- 主要特性:
- 內嵌的Web容器:SpringBoot內置了多種常用的Web容器,如Tomcat、Jetty等,使構建獨立的Web應用程序變得簡單,無需將應用程序部署到外部應用服務器。
- 自動化依賴管理:通過提供一系列的“starter”依賴,SpringBoot自動管理了應用程序的依賴關系,從而簡化了依賴管理的工作。
- 豐富的開發者工具:提供了多種開發者工具,如熱部署、自動重啟、自動配置報告等,提高了開發效率。
- 外部化配置:支持使用外部配置文件來配置應用程序的屬性,如數據庫連接、日志配置等,使應用程序的配置更加靈活和可管理。
- 強大的監控能力:提供了Actuator模塊,用于監控和管理SpringBoot應用程序。
- 最新版本及特性:截至2024年5月,SpringBoot的最新版本是3.2.x系列。新版本提供了更多的安全相關改進和更新,以確保應用程序的安全性得到增強。同時,Spring Boot 3.2還引入了對JDK中虛擬線程的支持,利用虛擬線程可以更高效地在單個JVM上處理并發任務,從而提升并發性能。此外,Spring Boot 3.0開始遷移到Jakarta命名空間,這是從Java EE到Jakarta EE生態的重要轉變。
- 作用:SpringBoot可以創建獨立的Spring應用程序,嵌入Tomcat等Web容器,無需部署WAR文件。同時,它簡化了Maven配置,自動配置Spring,并提供生產就緒型功能,如指標、健康檢查和外部配置等。
總的來說,SpringBoot是一個簡化Spring應用開發過程的強大框架,它通過自動化配置、內嵌Web容器、豐富的開發者工具等特性,提高了開發效率和應用程序的可靠性。
文章目錄
開始學習吧
- 【第1章】SpringBoot入門
- 【第2章】SpringBoot配置文件
功能模塊
1. First Steps
2. Upgrading From an Earlier Version
3. Developing With Spring Boot
4. Learning About Spring Boot Features
5. Web
6. Data
7. Messaging
8. IO
9. Container Images
10. Moving to Production
11. GraalVM Native Images
12. Advanced Topics
常用Starters
啟動器包含許多依賴項,這些依賴項是您快速啟動和運行項目所需的,并且具有一組一致的、受支持的托管可傳遞依賴項。
Name | Description |
---|---|
spring-boot-starter | Core starter, including auto-configuration support, logging and YAML |
spring-boot-starter-activemq | Starter for JMS messaging using Apache ActiveMQ |
spring-boot-starter-amqp | Starter for using Spring AMQP and Rabbit MQ |
spring-boot-starter-aop | Starter for aspect-oriented programming with Spring AOP and AspectJ |
spring-boot-starter-batch | Starter for using Spring Batch |
spring-boot-starter-cache | Starter for using Spring Framework’s caching support |
spring-boot-starter-data-elasticsearch | Starter for using Elasticsearch search and analytics engine and Spring Data Elasticsearch |
spring-boot-starter-data-jdbc | Starter for using Spring Data JDBC |
spring-boot-starter-data-jpa | Starter for using Spring Data JPA with Hibernate |
spring-boot-starter-data-mongodb | Starter for using MongoDB document-oriented database and Spring Data MongoDB |
spring-boot-starter-data-redis | Starter for using Redis key-value data store with Spring Data Redis and the Lettuce client |
spring-boot-starter-data-rest | Starter for exposing Spring Data repositories over REST using Spring Data REST and Spring MVC |
spring-boot-starter-freemarker | Starter for building MVC web applications using FreeMarker views |
spring-boot-starter-jdbc | Starter for using JDBC with the HikariCP connection pool |
spring-boot-starter-json | Starter for reading and writing json |
spring-boot-starter-mail | Starter for using Java Mail and Spring Framework’s email sending support |
spring-boot-starter-quartz | Starter for using the Quartz scheduler |
spring-boot-starter-security | Starter for using Spring Security |
spring-boot-starter-test | Starter for testing Spring Boot applications with libraries including JUnit Jupiter, Hamcrest and Mockito |
spring-boot-starter-thymeleaf | Starter for building MVC web applications using Thymeleaf views |
spring-boot-starter-validation | Starter for using Java Bean Validation with Hibernate Validator |
spring-boot-starter-web | Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container |
spring-boot-starter-actuator | Starter for using Spring Boot’s Actuator which provides production ready features to help you monitor and manage your application |
spring-boot-starter-log4j2 | Starter for using Log4j2 for logging. An alternative to spring-boot-starter-logging |
druid-spring-boot-starter | 阿里開源的一款數據庫連接池產品。 |
mybatis-spring-boot-starter | Starter for using Mybatis |
mybatis-plus-spring-boot3-starter | Starter for using Mybatis-Plus |
Starter的作用就是幫助你把相關的jar引入進來,各個依賴之間的版本關系也由Starter管理,你只管使用。
更多支持請查看官網
項目源碼
官方文檔
快速入門
視頻學習
我犧牲了手機號,幫助兄弟們拿到了資源。
致力于幫助大家提供完整的學習路徑,期待與大家共同成長。
視頻學習配套資料
誠邀您點擊一下“關注”按鈕,您的支持是我堅持創作的動力。