zoukankan      html  css  js  c++  java
  • Using Spring Boot —— Build Systems

    使用spring boot —— maven构建

    1.继承 starter parent

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
    </parent>

    2.如果你的系统pom已经有自定义的parent,又想使用springboot。还可以直接添加如下依赖:

    <dependencyManagement>
        <dependencies>
         <!-- 这儿写其他依赖 -->
            <dependency>
                <!-- Import dependency management from Spring Boot -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>2.1.8.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    3. Spring Boot包含一个Maven插件,可以将项目打包为可执行jar。需要在pom中添加如下的<plugin>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    4.springboot 提供了很多种starters,使用时只需要添加对应的依赖即可。





      

  • 相关阅读:
    struts2 的特征
    The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
    web.xml 404 500 配置
    重大发现 springmvc Controller 高级接收参数用法
    struts2 file
    struts2-core-2.3.20.jar
    系统设计工具
    Java基础
    IAM
    秒杀系统
  • 原文地址:https://www.cnblogs.com/han6/p/11505388.html
Copyright © 2011-2022 走看看