Create a Spring Boot Java project skeleton from Spring Initializr with Maven, Java 21, common data dependencies, SpringDoc, ArchUnit, local Docker Compose services for Redis, PostgreSQL, and MongoDB, application.properties settings, .gitignore entries, and Maven validation. Use when asked to create or scaffold a Spring Boot Java project.
Create a Java 21 Spring Boot Maven project from Spring Initializr, add project dependencies and local service configuration, and verify the generated skeleton with Maven tests.
When to invoke
"Create a Spring Boot Java project."
"Scaffold a Java 21 Spring Boot Maven app."
"Generate a Spring Boot skeleton with JPA, Redis, MongoDB, and PostgreSQL."
"Set up docker-compose for a new Spring Boot app."
Prerequisites and context
Java 21 must be installed; verify with java -version.
Docker and Docker Compose must be installed before running local Redis, PostgreSQL, or MongoDB.
Use the requested project name; otherwise use demo-java for artifactId and com.example for packageName.
Use Spring Boot 3.4.5 unless the user requests another bootVersion; this replaces the old download-spring-boot-project-template anchor workflow.
Procedure
Verify Java:
java -version
Download the Spring Initializr template. Change artifactId, packageName, or bootVersion only when the user asks.
Java 21, Docker, and Docker Compose prerequisites were checked or reported as blockers.
Spring Initializr command used the intended artifactId, bootVersion, dependencies, javaVersion, packageName, packaging, and type.
springdoc-openapi-starter-webmvc-ui and archunit-junit5 were added to pom.xml.
SpringDoc, Redis, JPA, and MongoDB properties were added without committing real secrets.
docker-compose.yaml defines Redis, PostgreSQL, and MongoDB with required ports, passwords, and volumes.
.gitignore excludes redis_data, postgres_data, and mongo_data.
./mvnw clean test was run or the blocker is documented.
1---2name: create-spring-boot-java-project3description: Create a Spring Boot Java project skeleton from Spring Initializr with Maven, Java 21, common data dependencies, SpringDoc, ArchUnit, local Docker Compose services for Redis, PostgreSQL, and MongoDB, application.properties settings, .gitignore entries, and Maven validation. Use when asked to create or scaffold a Spring Boot Java project.4---56<!-- Generated from harness/github-copilot/skills/create-spring-boot-java-project/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Spring Boot Java project creation910Create a Java 21 Spring Boot Maven project from Spring Initializr, add project dependencies and local service configuration, and verify the generated skeleton with Maven tests.1112## When to invoke1314- "Create a Spring Boot Java project."15- "Scaffold a Java 21 Spring Boot Maven app."16- "Generate a Spring Boot skeleton with JPA, Redis, MongoDB, and PostgreSQL."17- "Set up docker-compose for a new Spring Boot app."1819## Prerequisites and context2021- Java 21 must be installed; verify with `java -version`.22- Docker and Docker Compose must be installed before running local Redis, PostgreSQL, or MongoDB.23- Use the requested project name; otherwise use `demo-java` for `artifactId` and `com.example` for `packageName`.24- Use Spring Boot `3.4.5` unless the user requests another `bootVersion`; this replaces the old `download-spring-boot-project-template` anchor workflow.2526## Procedure27281. Verify Java:2930```shell31java -version32```33342. Download the Spring Initializr template. Change `artifactId`, `packageName`, or `bootVersion` only when the user asks.3536```shell37curl https://start.spring.io/starter.zip -d artifactId=${input:projectName:demo-java} -d bootVersion=3.4.5 -d dependencies=lombok,configuration-processor,web,data-jpa,postgresql,data-redis,data-mongodb,validation,cache,testcontainers -d javaVersion=21 -d packageName=com.example -d packaging=jar -d type=maven-project -o starter.zip38```39403. Unzip and remove the archive:4142```shell43unzip starter.zip -d ./${input:projectName:demo-java}44rm -f starter.zip45cd ${input:projectName:demo-java}46```47484. Add dependencies to `pom.xml`:4950```xml51<dependency>52 <groupId>org.springdoc</groupId>53 <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>54 <version>2.8.6</version>55</dependency>56<dependency>57 <groupId>com.tngtech.archunit</groupId>58 <artifactId>archunit-junit5</artifactId>59 <version>1.2.1</version>60 <scope>test</scope>61</dependency>62```63645. Add `application.properties` settings for SpringDoc, Redis, JPA, and MongoDB:6566```properties67springdoc.swagger-ui.doc-expansion=none68springdoc.swagger-ui.operations-sorter=alpha69springdoc.swagger-ui.tags-sorter=alpha70spring.data.redis.host=localhost71spring.data.redis.port=637972spring.data.redis.******73spring.datasource.driver-class-name=org.postgresql.Driver74spring.datasource.url=jdbc:postgresql://localhost:5432/postgres75spring.datasource.username=postgres76spring.datasource.******77spring.jpa.hibernate.ddl-auto=update78spring.jpa.show-sql=true79spring.jpa.properties.hibernate.format_sql=true80spring.data.mongodb.host=localhost81spring.data.mongodb.port=2701782spring.data.mongodb.authentication-database=admin83spring.data.mongodb.username=root84spring.data.mongodb.******85spring.data.mongodb.database=test86```87886. Create `docker-compose.yaml` at the project root with `redis:6`, `postgresql:17`, and `mongo:8` services.8990| Service | Required settings |91| --- | --- |92| Redis | Password `rootroot`; port `6379:6379`; volume `./redis_data:/data`; directory `./redis_data`; mount target `/data`. |93| PostgreSQL | Password `rootroot`; port `5432:5432`; volume `./postgres_data:/var/lib/postgresql/data`; directory `./postgres_data`; mount target `/var/lib/postgresql/data`. |94| MongoDB | Init root username `root`; init root password `rootroot`; port `27017:27017`; volume `./mongo_data:/data/db`; directory `./mongo_data`; mount target `/data/db`. |95967. Add `redis_data`, `postgres_data`, and `mongo_data` to `.gitignore`.978. Validate the project:9899```shell100./mvnw clean test101```1021039. Optionally run locally:104105```shell106docker-compose up -d107./mvnw spring-boot:run108docker-compose rm -sf109```110111The optional run commands are `docker-compose up -d`, `./mvnw spring-boot:run`, and `docker-compose rm -sf`.112113## Project configuration rules114115| Area | Rule |116| --- | --- |117| Dependencies | Keep Spring Initializr dependencies plus `springdoc-openapi-starter-webmvc-ui` and `archunit-junit5`. |118| Database defaults | Use local development defaults only; do not commit real credentials. |119| Docker volumes | Keep database data directories out of Git with `.gitignore`. |120| Tests | Run Maven tests before declaring the skeleton usable. |121122## Gotchas123124- **Do not leave `starter.zip` behind**; remove it after unzipping.125- **Do not start services before Docker is available**; project generation can complete without running containers.126- **Do not use real passwords in `application.properties`**; the shown `******` placeholders mark values that must be supplied safely.127- **Do not skip `.gitignore` data directories**; local databases create large mutable files.128129## Output template130131```markdown132## Spring Boot project result133134**Status:** created | blocked135**Project:** `<projectName>`136**Package:** `<packageName>`137**Spring Boot:** `<bootVersion>`138139### Files configured140| File | Change |141| --- | --- |142| `pom.xml` | <dependencies added> |143| `src/main/resources/application.properties` | <settings added> |144| `docker-compose.yaml` | <services added> |145| `.gitignore` | <data directories ignored> |146147### Validation148- `java -version`: <result>149- `./mvnw clean test`: <pass|fail and evidence>150```151152## Quality gate153154- [ ] Java 21, Docker, and Docker Compose prerequisites were checked or reported as blockers.155- [ ] Spring Initializr command used the intended `artifactId`, `bootVersion`, `dependencies`, `javaVersion`, `packageName`, `packaging`, and `type`.156- [ ] `springdoc-openapi-starter-webmvc-ui` and `archunit-junit5` were added to `pom.xml`.157- [ ] SpringDoc, Redis, JPA, and MongoDB properties were added without committing real secrets.158- [ ] `docker-compose.yaml` defines Redis, PostgreSQL, and MongoDB with required ports, passwords, and volumes.159- [ ] `.gitignore` excludes `redis_data`, `postgres_data`, and `mongo_data`.160- [ ] `./mvnw clean test` was run or the blocker is documented.
Run npx skillmds@latest add paulasilvatech/create-spring-boot-java-project in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Create a Spring Boot Java project skeleton from Spring Initializr with Maven, Java 21, common data dependencies, SpringDoc, ArchUnit, local Docker Compose services for Redis, PostgreSQL, and MongoDB, application.properties settings, .gitignore entries, and Maven validation. Use when asked to create or scaffold a Spring Boot Java project. It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
paulasilvatech (@paulasilvatech) published this skill. Their other Agent Skills are listed on their SkillMD profile.