zoukankan      html  css  js  c++  java
  • 2021年4月12日

    时间:2.1个小时左右

    代码:200行左右

    博客:1

    知识点:springboot文件依赖

    <?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.5.1</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>
        <groupId>com.example</groupId>
        <artifactId>demo1</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <name>demo1</name>
        <description>Demo project for Spring Boot</description>
        <properties>
            <java.version>11</java.version>
        </properties>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
    
    </project>

    如上所示,主要有四个部分:

    • 项目元数据:创建时候输入的Project Metadata部分,也就是Maven项目的基本元素,包括:groupId、artifactId、version、name、description等
    • parent:继承spring-boot-starter-parent的依赖管理,控制版本与打包等内容
    • dependencies:项目具体依赖,这里包含了spring-boot-starter-web用于实现HTTP接口(该依赖中包含了Spring MVC);spring-boot-starter-test用于编写单元测试的依赖包。更多功能模块的使用我们将在后面的教程中逐步展开。
    • build:构建配置部分。默认使用了spring-boot-maven-plugin,配合spring-boot-starter-parent就可以把Spring Boot应用打包成JAR来直接运行。
  • 相关阅读:
    strtok() and strtod()
    quernation,euler,rotationmatrix之间的相互转换
    Ubuntu16.04+Ros+Usb_Cam ORB SLAM2
    windows10下VS2013搭建opencv2.4.9吐血之作
    深度学习之numpy.poly1d()函数
    matplotlib动态图subplots()和subplot()不同及参数
    python学习之matplotlib绘制动图(FuncAnimation()参数)
    javascipt——jQuery
    Javascript——(2)DOM
    linux nc 命令详解
  • 原文地址:https://www.cnblogs.com/j-y-s/p/14903274.html
Copyright © 2011-2022 走看看