jdk版本:1.8.0_162

1.打开IDEA-file-new-project-Spring Initializer,JDK和URL选默认,next

(这一步如果是不能联网的话,可以选择直接创建maven项目)

2.project metadata --默认

Springboot(一)-IDEA搭建springboot项目(demo)

3.dependencies选 web-web(如有其他需要可自行按需选择)

Springboot(一)-IDEA搭建springboot项目(demo)

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.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>demo</name>
    <description>Demo project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.0.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <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>

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


</project>
View Code

相关文章:

  • 2022-12-23
  • 2021-08-31
  • 2021-11-29
  • 2021-11-13
  • 2021-04-24
  • 2021-05-22
  • 2021-05-17
  • 2021-07-07
猜你喜欢
  • 2021-07-29
  • 2021-05-02
  • 2021-05-31
  • 2021-05-29
  • 2022-01-19
  • 2021-11-28
  • 2021-07-06
相关资源
相似解决方案