第一步:创建一个项目 

    IDEA创建SpringBoot+maven项目

这里注意一下:要求jdk版本为1.8以上 这是因为springboot版本更新问题  需要jdk1.8的支持

IDEA创建SpringBoot+maven项目


IDEA创建SpringBoot+maven项目

IDEA创建SpringBoot+maven项目


IDEA创建SpringBoot+maven项目

最终目录结构

IDEA创建SpringBoot+maven项目


注意:DemoApplication启动类自动默认扫描当前包以及子包 

这样一个springboot项目就创建完成了

我们来完成一个简单的demo

创建一个controller

IDEA创建SpringBoot+maven项目

源码:

    IDEA创建SpringBoot+maven项目

然后在浏览器中访问 http://localhost:8080

IDEA创建SpringBoot+maven项目

ok  用IDEA创建springboot项目完成

相关文章:

  • 2022-12-23
  • 2022-01-08
  • 2021-08-28
  • 2021-09-21
  • 2021-10-18
  • 2021-12-02
  • 2021-11-16
猜你喜欢
  • 2021-06-23
  • 2021-10-15
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-11-19
  • 2021-05-17
相关资源
相似解决方案