Spring boot fallback

From makifbaysal/tasktrooper · View interactive version

Spring boot fallback is an AI agent skill from the GitHub repository makifbaysal/tasktrooper. Use when Java is chosen but Quarkus does not fit - build the service with Spring Boot using the same clean layering, only when a required library lacks a Quarkus extension or the repo already standardizes on Spring

How to use this skill

Skill file

Spring Boot Fallback

Overview

Quarkus is the default (see quarkus-service-architecture). Spring Boot is the fallback — reach for it only when Quarkus genuinely does not fit. The architecture is the same clean layering; only the annotations and container differ.

Core principle: Same layered design as Quarkus. Spring is a container choice, not a license to sprawl.

When Spring Boot instead of Quarkus

If none of these hold, use Quarkus.

Layer mapping (same responsibilities, Spring surface)

| Layer | Quarkus | Spring Boot |

|-------|---------|-------------|

| Resource/Controller | JAX-RS @Path | @RestController @RequestMapping |

| Service | @ApplicationScoped | @Service |

| Repository | Panache | JpaRepository (Spring Data) |

| Validation | @Valid + Bean Validation | @Valid + Bean Validation |

| Config | @ConfigProperty | @ConfigurationProperties / @Value |

| Transaction | @Transactional (service) | @Transactional (service) |

Patterns (identical discipline)

Worked Example

@RestController
@RequestMapping("/tasks")
class TaskController {
    private final TaskService service;
    TaskController(TaskService service) { this.service = service; }   // constructor injection

    @PostMapping
    ResponseEntity<TaskResponse> create(@Valid @RequestBody CreateTaskRequest req) {
        Task t = service.create(req.title());
        return ResponseEntity.status(201).body(TaskResponse.from(t));
    }
}

@Service
class TaskService {
    private final TaskRepository repo;
    TaskService(TaskRepository repo) { this.repo = repo; }

    @Transactional
    Task create(String title) {
        Task t = Task.create(title);   // domain enforces invariants
        return repo.save(t);
    }
}

Boot 4 notes

Common Mistakes

Red Flags

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.