下载安装
首次运行配置
第一个是以前安装过idea,第二个是没有安装过
选择喜欢的ui然后点击右下角进入下一步
右下角下一步
最后等待进入
新建spring boot
第一步
第二步
第三步
第四步
第五步
第六步
第七步
package com.example.first;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@SpringBootApplication
public class FirstApplication {
@RequestMapping("/")
String index() {
return "Hello Spring Boot";
}
public static void main(String[] args) {
SpringApplication.run(FirstApplication.class, args);
}
}
最后
到此就完成了
效果
打开浏览器输入http://localhost:8080/