思路:1.先建一下pojo 也叫bean ,然后写其中的属性,例如name ,sex ,记得吧get,set tostring之类的搞定,如果有lombok,@data就行 。
2.在application.peroperties里边赋值, bean层里记得 @configurationproperties(perfix=“ ”) 配置绑定,
3. 绑定之后记得写controller,负责跳转页面,记得 autowired。
component是容器组件,只有容器组件有springboot强大功能