02-SpringBoot默认的目录结构

-src
    -main
        -java
            -包名
                启动类
                业务代码:需要放在启动类同级包下或者子包下
        -resources
            -static    存放静态资源
            -templates    存放模板页面
            application.properties    SpringBoot提供的唯一配置文件
    -test    测试相关
.gitignore    默认忽略一些文件和目录的文件
pom.xml    maven依赖信息

其中:pom.xml文件

    <!--父工程:指定当前工程为SpringBoot工程;声明了starter依赖相关版本-->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <!--项目元数据:包名、项目名、版本号-->
    <groupId>com.shiory</groupId>
    <artifactId>springboot-demo01</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>springboot-demo01</name>
    <description>Demo project for Spring Boot</description>

    <!--properties信息:指定了Java版本-->
    <properties>
        <java.version>15</java.version>
    </properties>

    <!--默认导入的依赖-->
    <dependencies>
        <!--web项目相关依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!--测试相关依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!--SpringBoot版本的maven插件-->
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值