欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

springboot場景啟動器怎么用-創(chuàng)新互聯(lián)

這篇文章將為大家詳細講解有關(guān)springboot場景啟動器怎么用,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

聞喜網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)!從網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項目制作,到程序開發(fā),運營維護。創(chuàng)新互聯(lián)從2013年開始到現(xiàn)在10年的時間,我們擁有了豐富的建站經(jīng)驗和運維經(jīng)驗,來保證我們的工作的順利進行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)。

為什么springboot不需要我們?nèi)ヅ渲媚敲捶爆嵉臇|西?

我們直接看pom.xml

<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  <modelVersion>4.0.0</modelVersion>  <groupId>com.gong</groupId>  <artifactId>myspringboot</artifactId>  <version>1.0-SNAPSHOT</version>  <parent>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-parent</artifactId>    <version>1.5.9.RELEASE</version>  </parent>  <dependencies>    <!--引入springboot的web支持,幫你封裝好了很多個依賴-->    <dependency>      <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-starter-web</artifactId>    </dependency>  </dependencies>  <build>    <plugins>      <plugin>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-maven-plugin</artifactId>      </plugin>    </plugins>  </build></project>

首先看spring-boot-starter-parent,spring-boot-start就是場景啟動器,這是所有項目的父項目,我們ctrl+鼠標左鍵點進去:

新文件的開頭部分:

<parent>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-dependencies</artifactId>    <version>1.5.9.RELEASE</version>    <relativePath>../../spring-boot-dependencies</relativePath>  </parent>

它的父項目是spring-boot-dependencies,用于管理依賴包的版本號。也就是說spring-boot-start-parent是版本仲裁中心。

再來看spring-boot-starter-web,我們來查看其中有什么:

<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  <modelVersion>4.0.0</modelVersion>  <parent>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starters</artifactId>    <version>1.5.9.RELEASE</version>  </parent>  <artifactId>spring-boot-starter-web</artifactId>  <name>Spring Boot Web Starter</name>  <description>Starter for building web, including RESTful, applications using Spring    MVC. Uses Tomcat as the default embedded container</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>  <dependencies>    <dependency>      <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-starter</artifactId>    </dependency>    <dependency>      <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-starter-tomcat</artifactId>    </dependency>    <dependency>      <groupId>org.hibernate</groupId>      <artifactId>hibernate-validator</artifactId>    </dependency>    <dependency>      <groupId>com.fasterxml.jackson.core</groupId>      <artifactId>jackson-databind</artifactId>    </dependency>    <dependency>      <groupId>org.springframework</groupId>      <artifactId>spring-web</artifactId>    </dependency>    <dependency>      <groupId>org.springframework</groupId>      <artifactId>spring-webmvc</artifactId>    </dependency>  </dependencies></project>

這里面才是幫我們導(dǎo)入了真正所需的依賴包。

springboot還有許多場景啟動器,例如AOP、郵件開發(fā)等等。我們只需要在項目里面引用這些starter,這些場景的相關(guān)依賴包就會自動導(dǎo)入出來。

關(guān)于“springboot場景啟動器怎么用”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。

分享標題:springboot場景啟動器怎么用-創(chuàng)新互聯(lián)
文章轉(zhuǎn)載:http://chinadenli.net/article32/deecsc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號、小程序開發(fā)響應(yīng)式網(wǎng)站、Google品牌網(wǎng)站建設(shè)、網(wǎng)站收錄

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)