IDEA使用Spring Initializr创建Spring项目

文章目录

    • 1、创建一个Module项目
    • 2、选择Spring_Initializr创建项目。
    • 3、设置项目的基本信息
    • 4、选择项目所需的依赖
    • 5、创建SpringBoot项目
    • 6、项目结构图
    • 7、项目pom.xml文件

1、创建一个Module项目

IDEA使用Spring Initializr创建Spring项目_第1张图片

2、选择Spring_Initializr创建项目。

IDEA使用Spring Initializr创建Spring项目_第2张图片

3、设置项目的基本信息

IDEA使用Spring Initializr创建Spring项目_第3张图片

4、选择项目所需的依赖

IDEA使用Spring Initializr创建Spring项目_第4张图片

5、创建SpringBoot项目

IDEA使用Spring Initializr创建Spring项目_第5张图片

6、项目结构图

IDEA使用Spring Initializr创建Spring项目_第6张图片

7、项目pom.xml文件


<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.0modelVersion>
    <parent>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-parentartifactId>
        <version>2.2.6.RELEASEversion>
        <relativePath/> 
    parent>
    <groupId>com.examplegroupId>
    <artifactId>spring_initializr_demoartifactId>
    <version>0.0.1-SNAPSHOTversion>
    <name>spring_initializr_demoname>
    <description>Demo project for Spring Bootdescription>

    <properties>
        <java.version>1.8java.version>
    properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-webartifactId>
        dependency>
        <dependency>
            <groupId>org.mybatis.spring.bootgroupId>
            <artifactId>mybatis-spring-boot-starterartifactId>
            <version>2.1.2version>
        dependency>

        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-testartifactId>
            <scope>testscope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintagegroupId>
                    <artifactId>junit-vintage-engineartifactId>
                exclusion>
            exclusions>
        dependency>
    dependencies>

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

project>

你可能感兴趣的:(Spring,java,maven,spring,spring,boot)