首先來說一下什么是spring boot架構
那么spring boot有能夠解決什么問題呢?
1) Spring Boot使編碼變簡單
2) Spring Boot使配置變簡單
3) Spring Boot使部署變簡單
4) Spring Boot使監控變簡單
5) Spring Boot的不足
下面說一下Spring Boo的在平台中的定位,以及如何與相關的技術想融合
1) SpringBoot與SEDA +MicroService + RESTful
2) SpringBoot與Mock
然后再來看一看采用了這個 SpringBoot之后,技術的管理應該如何做
SpringBoot是伴隨着Spring4.0誕生的;
從字面理解,Boot是引導的意思,因此SpringBoot幫助開發者快速搭建Spring框架;
SpringBoot幫助開發者快速啟動一個Web容器;
SpringBoot繼承了原有Spring框架的優秀基因;
SpringBoot簡化了使用Spring的過程
那么應該如何使用SpringBoot到實踐當中呢?
首先來說一說starter *的pom依賴
使用SpringBoot開發時,在pom.xml文件中引入的依賴一般都是形如spring-boot-starter-*
。starter依賴是居於某個場景或者功能的,我們引入一個starter依賴之后,它會間接引入實現這個場景或功能所需的其他依賴。我們可以把這些starters稱為場景啟動器,只需要在項目里面引入這些starter相關場景的所有依賴都會導入進來。要用什么功能就導入什么場景的啟動器。這里以spring-boot-starter-web
為例分析。
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency>
spring-boot-starter-web的間接依賴
我們來看下spring-boot-starter-web
的pom文件,它定義了一個父類spring-boot-starters
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starters</artifactId> <version>1.5.4.RELEASE</version> </parent> <artifactId>spring-boot-starter-web</artifactId> <name>Spring Boot Web Starter</name> <url>http://projects.spring.io/spring-boot/</url> <organization> <name>Pivotal Software, Inc.</name> <url>http://www.spring.io</url> </organization> <properties> <main.basedir>${basedir}/../..</main.basedir> </properties>
spring-boot-starters
的打包類型為pom,它定義好了SpringBoot中所有的starter,同時它的父類為spring-boot-parent
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-parent</artifactId> <version>1.5.4.RELEASE</version> <relativePath>../spring-boot-parent</relativePath> </parent> <artifactId>spring-boot-starters</artifactId> <packaging>pom</packaging> <name>Spring Boot Starters</name> <description>Spring Boot Starters</description> <url>http://projects.spring.io/spring-boot/</url> <organization> <name>Pivotal Software, Inc.</name> <url>http://www.spring.io</url> </organization> <properties> <main.basedir>${basedir}/..</main.basedir> </properties> <modules> <module>spring-boot-starter</module> <module>spring-boot-starter-activemq</module> <module>spring-boot-starter-amqp</module> <module>spring-boot-starter-aop</module> <module>spring-boot-starter-artemis</module> <module>spring-boot-starter-batch</module> <module>spring-boot-starter-cache</module> <module>spring-boot-starter-cloud-connectors</module> <module>spring-boot-starter-data-cassandra</module> <module>spring-boot-starter-data-couchbase</module> <module>spring-boot-starter-data-elasticsearch</module> <module>spring-boot-starter-data-gemfire</module> <module>spring-boot-starter-data-jpa</module> <module>spring-boot-starter-data-ldap</module> <module>spring-boot-starter-data-mongodb</module> <module>spring-boot-starter-data-neo4j</module> <module>spring-boot-starter-data-redis</module> <module>spring-boot-starter-data-rest</module> <module>spring-boot-starter-data-solr</module> <module>spring-boot-starter-freemarker</module> <module>spring-boot-starter-groovy-templates</module> <module>spring-boot-starter-hateoas</module> <module>spring-boot-starter-integration</module> <module>spring-boot-starter-jdbc</module> <module>spring-boot-starter-jersey</module> <module>spring-boot-starter-jetty</module> <module>spring-boot-starter-jooq</module> <module>spring-boot-starter-jta-atomikos</module> <module>spring-boot-starter-jta-bitronix</module> <module>spring-boot-starter-jta-narayana</module> <module>spring-boot-starter-logging</module> <module>spring-boot-starter-log4j2</module> <module>spring-boot-starter-mail</module> <module>spring-boot-starter-mobile</module> <module>spring-boot-starter-mustache</module> <module>spring-boot-starter-actuator</module> <module>spring-boot-starter-parent</module> <module>spring-boot-starter-security</module> <module>spring-boot-starter-social-facebook</module> <module>spring-boot-starter-social-twitter</module> <module>spring-boot-starter-social-linkedin</module> <module>spring-boot-starter-remote-shell</module> <module>spring-boot-starter-test</module> <module>spring-boot-starter-thymeleaf</module> <module>spring-boot-starter-tomcat</module> <module>spring-boot-starter-undertow</module> <module>spring-boot-starter-validation</module> <module>spring-boot-starter-web</module> <module>spring-boot-starter-websocket</module> <module>spring-boot-starter-web-services</module> </modules>
引用:www.imooc.com/article/274147?block_id=tuijian_wz
https://www.cnblogs.com/anywherego/p/9591252.html