← Back to Skills Marketplace
watermelon11

Java Spring Boot

by nacy · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
187
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install java-spring-boot
Description
Build production Spring Boot applications - REST APIs, Security, Data, Actuator
README (SKILL.md)

Java Spring Boot Skill

Build production-ready Spring Boot applications with modern best practices.

Overview

This skill covers Spring Boot development including REST APIs, security configuration, data access, actuator monitoring, and cloud integration. Follows Spring Boot 3.x patterns with emphasis on production readiness.

When to Use This Skill

Use when you need to:

  • Create REST APIs with Spring MVC/WebFlux
  • Configure Spring Security (OAuth2, JWT)
  • Set up database access with Spring Data
  • Enable monitoring with Actuator
  • Integrate with Spring Cloud

Topics Covered

Spring Boot Core

  • Auto-configuration and starters
  • Application properties and profiles
  • Bean lifecycle and configuration
  • DevTools and hot reload

REST API Development

  • @RestController and @RequestMapping
  • Request/response handling
  • Validation with Bean Validation
  • Exception handling with @ControllerAdvice

Spring Security

  • SecurityFilterChain configuration
  • OAuth2 and JWT authentication
  • Method security (@PreAuthorize)
  • CORS and CSRF configuration

Spring Data JPA

  • Repository pattern
  • Query methods and @Query
  • Pagination and sorting
  • Auditing and transactions

Actuator & Monitoring

  • Health checks and probes
  • Metrics with Micrometer
  • Custom endpoints
  • Prometheus integration

Quick Reference

// REST Controller
@RestController
@RequestMapping("/api/users")
@Validated
public class UserController {

    @GetMapping("/{id}")
    public ResponseEntity\x3CUser> getUser(@PathVariable Long id) {
        return userService.findById(id)
            .map(ResponseEntity::ok)
            .orElse(ResponseEntity.notFound().build());
    }

    @PostMapping
    public ResponseEntity\x3CUser> createUser(@Valid @RequestBody UserRequest request) {
        User user = userService.create(request);
        URI location = URI.create("/api/users/" + user.getId());
        return ResponseEntity.created(location).body(user);
    }
}

// Security Configuration
@Configuration
@EnableWebSecurity
public class SecurityConfig {

    @Bean
    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
        return http
            .csrf(csrf -> csrf.disable())
            .sessionManagement(s -> s.sessionCreationPolicy(STATELESS))
            .authorizeHttpRequests(auth -> auth
                .requestMatchers("/actuator/health/**").permitAll()
                .requestMatchers("/api/public/**").permitAll()
                .anyRequest().authenticated())
            .oauth2ResourceServer(oauth2 -> oauth2.jwt(Customizer.withDefaults()))
            .build();
    }
}

// Exception Handler
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(EntityNotFoundException.class)
    public ProblemDetail handleNotFound(EntityNotFoundException ex) {
        return ProblemDetail.forStatusAndDetail(NOT_FOUND, ex.getMessage());
    }
}

Configuration Templates

# application.yml
spring:
  application:
    name: ${APP_NAME:my-service}
  profiles:
    active: ${SPRING_PROFILES_ACTIVE:local}
  jpa:
    open-in-view: false
    properties:
      hibernate:
        jdbc.batch_size: 50

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus
  endpoint:
    health:
      probes:
        enabled: true

server:
  error:
    include-stacktrace: never

Common Patterns

Layer Architecture

Controller → Service → Repository → Database
     ↓           ↓          ↓
   DTOs      Entities    Entities

Validation Patterns

public record CreateUserRequest(
    @NotBlank @Size(max = 100) String name,
    @Email @NotBlank String email,
    @NotNull @Min(18) Integer age
) {}

Troubleshooting

Common Issues

Problem Cause Solution
Bean not found Missing @Component Add annotation or @Bean
Circular dependency Constructor injection Use @Lazy or refactor
401 Unauthorized Security config Check permitAll paths
Slow startup Heavy auto-config Exclude unused starters

Debug Properties

debug=true
logging.level.org.springframework.security=DEBUG
spring.jpa.show-sql=true

Debug Checklist

□ Check /actuator/conditions
□ Verify active profiles
□ Review security filter chain
□ Check bean definitions
□ Test health endpoints

Usage

Skill("java-spring-boot")

Related Skills

  • java-testing - Spring test patterns
  • java-jpa-hibernate - Data access
Usage Guidance
This skill appears coherent and light-weight: it provides docs, patterns, a config schema, and a local validation script. It does not ask for credentials or install external code. However, because it declares tooling permissions (Read, Write, Bash), an agent using the skill could read or modify files in your project workspace or run shell commands; only install/use it from authors you trust and avoid giving it access to sensitive directories. If you need stricter limits, ask for a version that omits Bash/write permissions or review/ sandbox its actions before allowing automated invocation.
Capability Analysis
Type: OpenClaw Skill Name: java-spring-boot Version: 1.0.0 The skill bundle is a standard development toolkit for Java Spring Boot. It contains legitimate code templates, configuration schemas, and a validation script (scripts/validate.py) that uses safe practices like yaml.safe_load. No indicators of data exfiltration, malicious execution, or prompt injection were found.
Capability Assessment
Purpose & Capability
Name/description (Spring Boot development) align with included files (detailed SKILL.md, guidance, patterns, config schema) and the small validation script. There are no unrelated credentials, binaries, or install steps.
Instruction Scope
SKILL.md is documentation and examples for building Spring Boot apps and does not instruct reading sensitive system paths or env vars. It does list allowed-tools including Read, Write, and Bash — reasonable for a coding/authoring skill but means an agent using this skill could read/write project files or run shell commands. The documentation example suggests analyzing the current implementation, which implies access to workspace files; this is expected but worth noting.
Install Mechanism
No install spec is present (instruction-only plus small scripts). No downloads or external installers — low installation risk.
Credentials
The skill requests no environment variables or credentials. The contained code and docs do not reference hidden secrets or unrelated services.
Persistence & Privilege
always is false and the skill does not request system-wide persistence or modify other skills. Autonomous invocation is allowed by default but not combined with any elevated privileges here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install java-spring-boot
  3. After installation, invoke the skill by name or use /java-spring-boot
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of java-spring-boot skill. - Build production-ready Spring Boot applications: REST APIs, Security, Data, Actuator. - Supports Spring Boot 3.x features and best practices. - Includes guides and code snippets for REST, Security, Data JPA, and Actuator integration. - Parameter validation for spring_version and module focus. - Troubleshooting section with common Spring Boot issues and debug tips.
Metadata
Slug java-spring-boot
Version 1.0.0
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is Java Spring Boot?

Build production Spring Boot applications - REST APIs, Security, Data, Actuator. It is an AI Agent Skill for Claude Code / OpenClaw, with 187 downloads so far.

How do I install Java Spring Boot?

Run "/install java-spring-boot" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Java Spring Boot free?

Yes, Java Spring Boot is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Java Spring Boot support?

Java Spring Boot is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Java Spring Boot?

It is built and maintained by nacy (@watermelon11); the current version is v1.0.0.

💬 Comments