NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
**1.SpringBootDemo 入口** ~~~ package com.nobb; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; //@SpringBootConfiguration //@EnableAutoConfiguration //@ComponentScan @SpringBootApplication public class SpringBootDemo { //SpringBoot入口方法 public static void main(String[] args){ SpringApplication.run(SpringBootDemo.class, args); } } ~~~ **2.controller测试** ~~~ package com.nobb.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { @RequestMapping("/hello") public String hello(){ return "hello"; } } ~~~