Skip to content
Skills Library
Programming · Building & coding

spring-boot

/spring-boot

Expert Spring Boot assistance covering Java enterprise microservices, auto-configuration, Spring Data JPA, Spring Security, actuator observability, and REST controllers. Use when building production-grade enterprise Java backends, configuring Spring Boot applications, or tuning JVM performance.

Licence
MIT
Last repository change
01.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Expert Spring Boot assistance covering Java enterprise microservices, auto-configuration, Spring Data JPA, Spring Security, actuator observability, and REST controllers. Use when building production-grade enterprise Java backends, configuring Spring Boot applications, or tuning JVM performance.

Original author description

Expert Spring Boot assistance covering Java enterprise microservices, auto-configuration, Spring Data JPA, Spring Security, actuator observability, and REST controllers. Use when building production-grade enterprise Java backends, configuring Spring Boot applications, or tuning JVM performance.

How it works

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Original SKILL.md headings · 153 lines, 375 words
SKILL.md preview
---
name: spring-boot
description: Expert Spring Boot assistance covering Java enterprise microservices, auto-configuration, Spring Data JPA, Spring Security, actuator observability, and REST controllers. Use when building production-grade enterprise Java backends, configuring Spring Boot applications, or tuning JVM performance.
---

# Spring Boot

Java framework for building production-ready microservices.

## When to Use

- Enterprise Java applications
- Microservices architecture
- REST APIs with Java/Kotlin
- Cloud-native applications

## Quick Start

```java
@RestController
@RequestMapping("/api/users")
public class UserController {
    private final UserService userService;

    public UserController(UserService userService) {
        this.userService = userService;
    }

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

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

## Core Concepts

### Dependency Injection

```java
@Service
@Transactional(readOnly = true)
public class UserService {
    private final UserRepository repository;
    private final PasswordEncoder passwordEncoder;

    public UserService(UserRepository repository, PasswordEncoder passwordEncoder) {
        this.repository = repository;
        this.passwordEncoder = passwordEncoder;
    }

    @Transactional
    public User create(CreateUserRequest request) {
        User user = new User();
        user.setEmail(request.email());
        user.setPassword(passwordEncoder.encode(request.password()));
        return repository.save(user);
    }

    public Optional<User> findById(Long id) {
        return repository.findById(id);
    }
}
```

### Spring Data JPA

```java
@Entity
@Table(name = "users")
public class User {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(nullable = false, unique = true)
    private String email;

    @OneToMany(mappedBy = "author", cascade = CascadeType.ALL)
    private List<Post> posts = new ArrayList<>();
}

public interface UserRepository extends JpaRepository<User, Long> {
    Optional<User> findByEmail(String email);

    @Query("SELECT u FROM User u WHERE u.active = true")
    List<User> findActiveUsers();
}
```

## Common Patterns

### Centralized Global Exception Handling

**Problem**: Unhandled exceptions leaking internal stack traces and creating inconsistent HTTP error responses.

**Solution**:

```java
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(ResourceNotFoundException.class)
    public ResponseEntity<ErrorResponse> handleNotFound(ResourceNotFoundException ex) {
        return ResponseEntity.status(404)
            .body(new ErrorResponse(ex.getMessage()));
    }

    @ExceptionHandler(MethodArgumentNotValidException.class)
    public ResponseEntity<ErrorResponse> handleValidation(MethodArgumentNotValidException ex) {
        Map<String, String> errors = ex.getBindingResult().getFieldErrors().stream()
            .collect(Collectors.toMap(
                FieldError::getField,
                FieldError::getDefaultMessage
            ));
        return ResponseEntity.badRequest().body(new ErrorResponse("Validation failed", errors));
    }
}
```

## Best Practices

**Do**:

- Use constructor injection
- Use Spring Data repositories
- Implement proper error handling
- Use profiles for environments

**Don't**:

- Use field injection (@Autowired on fields)
- Expose entities directly
- Skip validation annotations
- Hardcode configuration

## Troubleshooting

| Error               | Cause                | Solution                       |
| ------------------- | -------------------- | ------------------------------ |
| Bean not found      | Missing @Component   | Add stereotype annotation      |
| Circular dependency | Constructor circular | Use setter or @Lazy            |
| N+1 queries         | Missing fetch join   | Use @EntityGraph or JOIN FETCH |

## References

- [Spring Boot Documentation](https://spring.io/projects/spring-boot)
- [Baeldung Spring](https://www.baeldung.com/spring-boot)

Versions

RepositoryScoreLicence
This page · G1Joshi/Agent-Skills100MIT
ericrisco/rsc-harness100MIT
TerminalSkills/skills100Apache-2.0
piomin/claude-ai-spring-boot100Apache-2.0
jasbir125/claude-ai-spring-boot100MIT
nimadorostkar/Claude-Skills-collection100MIT
claude-dev-suite/claude-dev-suite95MIT
yvssdheeraj/opencode-engineering-harness90MIT

Database snapshot: 13.11.2026 · package version 2691ef310cbe (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90java-spring-boot-expert
    Use when building Spring Boot 3.x applications, microservices, or reactive Java applications. Invoke for Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud integration.
  • 100spring-boot-engineer
    Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA repositories, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices, or reactive Java…
  • 100spring-boot-engineer
    Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA or MyBatis-Plus data access, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices,…
  • 100spring-boot-engineer
    Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA repositories, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices, or reactive Java…
  • 100spring-boot-idioms
    Spring Boot 3.x framework patterns: constructor-based DI, Spring Data JPA, REST controllers with RFC 7807 error handling, Actuator observability, and slice testing. Use when building or maintaining Spring Boot microservices. Pair with java-idioms.
  • 100java-spring-boot-web
    Use this skill when building enterprise-grade RESTful microservices using Spring Boot, Spring Data JPA, and dependency injection.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.