Index of every page on this site: llms.txt
All skills
github avatar

/create-spring-boot-java-project

@f10fdb8 official
by githubgithub/awesome-copilot41k stars
5,399
Run it yourself

Create a new Spring Boot Java project (Maven or Gradle) from start.spring.io with sensible defaults for configuration, PostgreSQL, logging, security, testing and Docker. Use when asked to scaffold, bootstrap or generate a Spring Boot application. Detects existing project versions and never upgrades implicitly.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/create-spring-boot-java-project

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesdatabase.md

≈878 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Database (PostgreSQL)

Defaults: PostgreSQL (image postgres:18-alpine, see versions.md), Spring Data JPA, Hibernate, HikariCP. Dependencies: data-jpa, postgresql, docker-compose, testcontainers.

Configuration

spring.datasource.url=${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/mydb}
spring.datasource.username=${SPRING_DATASOURCE_USERNAME:user}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD:password}

spring.jpa.hibernate.ddl-auto=update
spring.jpa.open-in-view=false
spring.jpa.show-sql=false

The driver class is detected from the URL; do not set it. The defaults above are for local development only: production credentials come from the environment (see configuration.md).

Schema management (ddl-auto)

Follow the schema management rule of the java-hibernate-jpa skill (prototype/local, production with Flyway/Liquibase, or externally managed). The table and setup below apply it to Spring Boot.

Value Behaviour Use for
update Adds missing tables/columns, never drops Local development / prototypes
validate Fails at startup if schema and entities differ Production
create / create-drop Recreates schema at startup (and drops at shutdown) Throw-away tests
none Hibernate does nothing Schema managed elsewhere

Hibernate's update is convenient but cannot rename, drop or migrate data. For production schema evolution, Flyway or Liquibase are optional but recommended: add the starter: on Boot 4 spring-boot-starter-flyway plus org.flywaydb:flyway-database-postgresql (or spring-boot-starter-liquibase), because Boot 4 auto-configuration lives in the starter; on Boot 3 add org.flywaydb:flyway-core plus flyway-database-postgresql (or liquibase-core) directly. Put migrations in src/main/resources/db/migration (V1__init.sql), and set ddl-auto=validate. Add them when the user wants versioned migrations or the app is headed to production.

Entities

Keep entities annotated precisely (@Table, @Column(length=..., nullable=...), @Index) so generated or validated DDL is accurate. Use GenerationType.IDENTITY or a sequence, Instant for timestamps, and avoid exposing entities in the API (use DTOs/records).

Local development: Docker Compose

With spring-boot-docker-compose, Spring Boot starts compose.yaml automatically and wires the datasource (no URL needed):

services:
  postgres:
    image: postgres:18-alpine
    environment:
      POSTGRES_DB: mydb
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
    ports:
      - "5432"
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "user", "-d", "mydb"]
      interval: 10s
      timeout: 5s
      retries: 5

Tests

Use Testcontainers with @ServiceConnection; see the spring-boot-testing skill (references/testcontainers-jdbc.md). Pin the image tag; never latest. start.spring.io generates postgres:latest in compose.yaml and TestcontainersConfiguration: replace both with postgres:18-alpine (verified).

Performance and production

  • HikariCP is the default pool; tune spring.datasource.hikari.maximum-pool-size and connection-timeout.
  • Avoid N+1 queries: JOIN FETCH or @EntityGraph; use DTO projections for read models.
  • Keep open-in-view=false and @Transactional on services.
  • Index foreign keys and filtered/sorted columns; check plans with EXPLAIN ANALYZE.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1d5 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    This skill scaffolds a Spring Boot project using official and well-known industry services with strong security best practices, including non-root Docker images and secure secret management instructions.

  • Socket1d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

  • Runlayer8mo

    1/1 file flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
  • spring-boot
  • java
  • maven
  • postgres
  • redis
  • mongodb
  • docker
  • scaffold

README badge

README badge for github/awesome-copilot/create-spring-boot-java-project

Scaffolds a Spring Boot 3.4.5 Maven project with Java 21, preconfigured with PostgreSQL, Redis, MongoDB, and Docker Compose services. Includes SpringDoc OpenAPI for API documentation and ArchUnit for architecture testing, with default credentials and port mappings ready to use.

Generated from the current SKILL.md.

What Java version does this skill require?
Java 21. The skill generates a Spring Boot 3.4.5 project configured for Java 21.
Can I customize the project name and Spring Boot version?
Yes. You can modify the `artifactId`, `packageName`, and `bootVersion` parameters in the download command before running it.
What databases and services are included?
The skill sets up PostgreSQL, Redis, and MongoDB via docker-compose, along with SpringDoc OpenAPI for API documentation and ArchUnit for architecture testing.
Do I need Docker installed?
Yes. The skill requires both Docker and Docker Compose to run the included database services (Redis, PostgreSQL, MongoDB).

Generated from the current SKILL.md. These answers refresh after source changes.