create-spring-boot-java-project
Create Spring Boot Java Project Skeleton
By github · 9,511 installs
npx skills add github/awesome-copilot --skill create-spring-boot-java-project
Source repository · Upstream listing
Create Spring Boot Java project prompt
Please make sure you have the following software installed on your system:
Java 21
Docker
Docker Compose
If you need to custom the project name, please change the artifactId and the packageName in [download spring boot project template]( download spring boot project template)
If you need to update the Spring Boot version, please change the bootVersion in [download spring boot project template]( download spring boot project template)
Check Java version
Run following command in terminal and check the version of Java
Download Spring Boot project template
Run following command in terminal to download a Spring Boot project template
Unzip the downloaded file
Run following command in terminal to unzip the downloaded file
Remove the downloaded zip file
Run following command in terminal to delete the downloaded zip file
Change directory to the project root
Run following command in terminal to change directory to the project root
Add additional dependencies
Insert springdoc openapi starter webmvc ui and archunit junit5 dependency into pom.xml file
Add SpringDoc, Redis, JPA and MongoDB configurations
Insert SpringDoc configurations into application.properties file
Insert Redis configurations into application.properties file
Insert JPA configurations into application.properties file
Insert MongoDB configurations into application.properties file
Add docker compose.yaml with Redis, PostgreSQL and MongoDB services
Create docker compose.yaml at project root and add following services: redis:6 , postgresql:17 and mongo:8 .
redis service should have
password rootroot
mapping port 6379 to 6379
mounting volume ./redis data to /data
postgresql service should have
password rootroot
mapping port 5432 to 5432
mounting volume ./postgres data to /var/lib/postgresql/data
mongo service should have
initdb root username root
initdb root password rootroot
mapping port 27017 to 27017
mounting volume ./mongo data to /data/db
Add .gitignore file
Insert redis data , postgres data and mongo data directories in .gitignore file
Run Maven test command
Run maven clean test command to check if the project is working
Run Maven run command (Optional)
(Optional) docker compose up d to start the services, ./mvnw spring boot:run to run the Spring Boot project, docker compose rm sf to stop the services.
Let's do this step by step