IDEA2018.3创建springboot

没有项目的先在setting-》plugins下搜索Spring Assistant安装完重启IDEA。

1.新建项目,next

下一步,

 

2、next

 3、finish

4、测试

创建一个Controller类进行测试

package com.edu;

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

@Controller
@ResponseBody
public class controller {
    @RequestMapping("/hello")
    public String say(){
        return  "hello";
    }

}

运行在浏览器输入访问:

返回:

不经一番彻骨寒,哪有梅花扑鼻香?
原文地址:https://www.cnblogs.com/zongyao/p/13831192.html