美文网首页
1 Hello World

1 Hello World

作者: lijiaccy | 来源:发表于2017-06-28 22:28 被阅读0次

    1、新建maven项目
    File --> New --> Project --> Maven

    Paste_Image.png Paste_Image.png
    一直确定到最后,生产maven项目
    <pre>
    <?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.lijia</groupId>
    <artifactId>springboot-study</artifactId>
    <version>1.0-SNAPSHOT</version>
    

    <strong></strong>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
    </parent>
    
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>
    

    </project>
    </pre>

    写启动类


    Paste_Image.png

    运行main方法

    Paste_Image.png
    左边没有错误,右边有端口号和启动时间。
    在浏览器中输入http://localhost:8080/ Paste_Image.png

    springboot最基本的HelloWorld就搭建起来了。

    相关文章

      网友评论

          本文标题:1 Hello World

          本文链接:https://www.haomeiwen.com/subject/ezjpcxtx.html