SpringBoot:

SpringBoot开发项目非常方便,无需配置,开箱即用。可以用Intellij Idea快速新建 SpringBoot 项目。

具体过程:

  • 点击Intellij Idea左上角的 File--> New --> Spring Initializr

如果默认的starter url如果连不上,可以选择Custom,使用阿里巴巴的url: https://start.aliyun.com

Intellij Idea新建 SpringBoot 项目

  • 填写新建项目的设置:
    填写后就点击 Next,当然也可以直接用默认的设置。

Intellij Idea新建 SpringBoot 项目

  • 接下来就可以勾选需要的jar包了

注意,Web选项下的Spring Web必须勾选,否则无法启动 SpringBoot项目。
缺少Spring Web的包,SpringBoot启动时会自动退出,提示如下:

Disconnected from the target VM, address: '127.0.0.1:64311', transport: 'socket'
Process finished with exit code 0

最上面的选项,可以选择 SpringBoot的版本。如下:

Intellij Idea新建 SpringBoot 项目

  • 填写项目名称和路径
    写完了就点击 Finish。

Intellij Idea新建 SpringBoot 项目

  • 启动SpringBoot项目

Maven的依赖加载完了,就可以启动SpringBoot项目了。
启动成功提示如下:

Started Application in 2.184 seconds (JVM running for 3.412)

Intellij Idea新建 SpringBoot 项目

相关文章:

  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
  • 2021-04-08
  • 2021-06-16
  • 2021-09-11
  • 2021-10-18
  • 2021-07-26
猜你喜欢
  • 2021-07-03
  • 2021-12-04
  • 2021-08-19
  • 2021-06-22
相关资源
相似解决方案