美文网首页
使用idea创建springboot具体过程

使用idea创建springboot具体过程

作者: 程序媛小雪 | 来源:发表于2018-08-29 09:50 被阅读0次

准备材料

  1. 安装并配置好的idea

创建springboot详细过程如下

image.png image.png image.png image.png image.png image.png

到此,springboot项目引入完毕

项目文件目录如下

image.png

为项目创建controller

image.png

手写第一个helloworld

package com.springboot.demo.springbootdemo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloWorldController {

    @RequestMapping("/hello")
    @ResponseBody
    public String hello(){
        return "Hello spring boot";
    }
}

访问项目

image.png

访问效果

image.png

相关文章

网友评论

      本文标题:使用idea创建springboot具体过程

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