具体步骤:
第一次有的电脑你再创建项目的时候右下角会提醒你弹窗:让你下载没有的东西
一定要下载!!可能会很慢
运行结果:
因为他是默认的8080端口所以在运行的时候输入的url如下图:
新建了一个controller代码如下
package cn.lvb.boot01.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class HelloController {@RequestMapping("/hello")@ResponseBodypublic String hello(){return "hello springboot";}
}
再运行以下的url 就是上面代码里的内容
到这里说明可以正常运行了~~~