快速创建spring-boot项目
复制预先配置好的spring-boot模板项目
模板项目包括以下预配置:
- 基于
docker的MariaDB- 基于
docker的redis集群
克隆演示用途的仓库
demonstrationbashgit clone --depth 0 https://github.com/dexterleslie1/demonstration.git复制仓库中的
demo-spring-boot-scaffold项目bashcp -r demonstration/demo-spring-boot/demo-spring-boot-scaffold .
使用IntelliJ IDEA快速创建基于maven的spring-boot项目
- 打开
IntelliJ IDEA,点击“Create New Project”。 - 在左侧面板中选择
“Spring Initializr”。 - 输入你的
Group、Artifact、Version、选择你的spring-boot版本、选择项目类型为maven。 - 暂时不需要添加任何依赖,因为我们想创建一个空项目。
- 点击
“Next”和“Finish”来创建项目。 - 创建项目后运行
DemoSpringBootEmptyApplicationTests中的测试用例验证项目是否正常运行。