今天总结一份springboot项目的搭建步骤
准备:
	工具:IntelliJ IDEA
	我这里也准备了一份最新的安装包:
	伙伴们也可以关注公众号“java菜鸟团”--工具下载中获取该工具
  (附有安装文档和**码!)

SpringBoot的搭建--Idea篇SpringBoot的搭建--Idea篇
首先你需要新建好一个文件夹,这个文件夹等会就作为你项目的工作空间
我新建的文件夹为springboot_idea
SpringBoot的搭建--Idea篇
SpringBoot的搭建--Idea篇
SpringBoot的搭建--Idea篇
SpringBoot的搭建--Idea篇
咱们做一个简单的web模块访问,所有需要选择这个模块
SpringBoot的搭建--Idea篇
SpringBoot的搭建--Idea篇
创建完的目录结构是这样的
SpringBoot的搭建--Idea篇
SpringBoot的搭建--Idea篇
SpringBoot的搭建--Idea篇

@RequestMapping
@Controller
public class SpringContrlloer {
    
    //写一个方法,返回值为字符串
    @RequestMapping("/hello")
    @ResponseBody
    public String hello(){
        return "springboot,hello!";
    }
}

SpringBoot的搭建--Idea篇
SpringBoot的搭建--Idea篇
访问:localhost:8080/hello
SpringBoot的搭建--Idea篇
OK!访问成功

相关文章: