使用idea创建springboot项目

一:在idea上新建一个springboot项目   file -- new -- project--Spring initializr--next

使用idea创建springboot项目使用idea创建springboot项目


二:一直下一步 选择一个web项目(试需求而定)   然后一路next到底

使用idea创建springboot项目


三:项目建完后删除这三个文件

使用idea创建springboot项目使用idea创建springboot项目


四:在整个项目开关类DemoApplication同级的地方建立包或者类 否则springboot管理不到

使用idea创建springboot项目使用idea创建springboot项目


五:标识controller  添加映射路径

使用idea创建springboot项目


六: 启动项目   或者右键左边高亮部分  手动选择

使用idea创建springboot项目




七:浏览器访问  192.168.1.173为本机ip 可换为127.0.0.1

使用idea创建springboot项目使用idea创建springboot项目