mcpField
S
spring-boot-application

spring-boot-application

github.com/aj-geddesDevelopment373459 installsUpdated 34w ago
Repository

About spring-boot-application

A skill for building Spring Boot applications with conventional configuration, dependency injection, REST controllers, JPA persistence, service layers, and security. It is intended for developers implementing APIs and microservices with Spring Boot.

Key features

  1. 01Annotation-based configuration
  2. 02Dependency injection and service layers
  3. 03REST controllers and request handling
  4. 04JPA persistence and repositories
  5. 05Spring Security configuration

Use cases

  1. 01Building Spring Boot REST APIs
  2. 02Implementing JPA data persistence
  3. 03Structuring service-oriented applications
  4. 04Configuring security for Spring Boot services

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill spring-boot-application

After installing, type/spring-boot-applicationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
application-configuration.md
entity-models-with-jpa-annotations.md
repository-layer-with-spring-data-jpa.md
rest-controllers-with-requestresponse-handling.md
service-layer-with-business-logic.md
spring-boot-project-setup.md
spring-security-configuration.md
scripts/
security-checklist.sh

Details

From the project README

Spring Boot Application

Table of Contents

Overview

Develop production-ready Spring Boot applications with proper annotation-based configuration, dependency injection, REST controllers, JPA data persistence, service layers, and security implementation following Spring conventions.

When to Use

  • Building Spring Boot REST APIs
  • Implementing service-oriented architectures
  • Configuring data persistence with JPA
  • Managing dependency injection
  • Implementing Spring Security
  • Building microservices with Spring Boot

Quick Start

Minimal working example:

<!-- pom.xml -->
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>api-service</artifactId>
    <version>1.0.0</version>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.1.0</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Spring Boot Project SetupSpring Boot Project Setup
Entity Models with JPA AnnotationsEntity Models with JPA Annotations
Repository Layer with Spring Data JPARepository Layer with Spring Data JPA
Service Layer with Business LogicService Layer with Business Logic
REST Controllers with Request/Response HandlingREST Controllers with Request/Response Handling
Spring Security ConfigurationSpring Security Configuration
Application ConfigurationApplication Configuration

Best Practices

✅ DO
  • Use dependency injection for loose coupling
  • Implement service layer for business logic
  • Use repositories for data access
  • Leverage Spring Security for authentication
  • Use @Transactional for transaction management
  • Validate input in controllers
  • Return appropriate HTTP status codes
  • Use DTOs for request/response mapping
  • Implement proper exception handling
  • Use Spring's @Async for async operations
❌ DON'T
  • Put business logic in controllers
  • Access database directly in controllers
  • Store secrets in configuration files
  • Use eager loading for large relationships
  • Ignore transaction boundaries
  • Return database entities in API responses
  • Implement authentication in controllers
  • Use raw SQL without parameterized queries
  • Forget to validate user input

Comments

Markdown supported