SpringBoot的Controller的使用以及页面跳转
本系列是SpringBoot的项目系列的第二篇,此篇文章内容涉及SpringBoot的Controller的使用以及页面跳转
如何写一个Controller代码
https://spring.io/quickstart
可以参考上诉网址
1.新建一个controller包,再新建一个HelloController类
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210118214606517.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM1NzY0NDYw,size_16,color_FFFFFF,t_70)
2.写代码,写一个hello的请求
import org.springframework.web.bind.annotation.RequestMapping;
import org