springboot-1-hello
创建springboot项目
1、使用网站https://start.spring.io/
2、IDEA内部集成上方网站创建
项目编辑
1、controller,dao,pojo,service包在Application类同级目录下创建
2、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 "helloworld";
}
}
3、banner.txt更改启动图案
4、application.properties更改配置属性
5、使用Application类启动
6、启动完成
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。