发布时间:2023-04-12 09:00
安装插件导向窗口完成后,在eclipse右下角将会出现安装插件的进度,等插件安装完成后重启eclipse生效
org.springframework.boot spring-boot-starter-parent 2.0.2.RELEASE
org.springframework.boot spring-boot-starter-web
org.springframework.boot spring-boot-maven-plugin
package com.springboot.springbootDemo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class App { public static void main( String[] args ) { SpringApplication.run(App.class, args); } }
package com.springboot.springbootDemo.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping(\"hello2\") public class HelloController { @RequestMapping(\"\") public String hello() { return \"helloworld2\"; } }
http://localhost:8012/hello2
访问http://start.spring.io/
解压后,使用eclipse,Import -> Existing Maven Projects -> Next ->选择解压后的文件夹-> Finsh,OK done!
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。