java-controller

Standardize Java Controller layer design for consistent REST APIs.

36|10|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/jie023/trae-setting --skill java-controller
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-controller
Source: https://github.com/jie023/trae-setting/tree/main/skills/java-controller
Command: npx skills add https://github.com/jie023/trae-setting --skill java-controller

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes the Java Controller layer to ensure consistent RESTful APIs, reducing boilerplate and design drift across modules.

Core Features & Use Cases

  • Class naming conventions for controllers (e.g., AdminDepartmentController) and structured package organization.
  • Annotations and mapping guidelines including @RestController and @RequestMapping.
  • Dependency Injection and logging practices with SLF4J.
  • Parameter validation using JSR-380 (@Valid) and uniform response handling with a shared BaseRetuenDataVO.
  • Use cases: scaffolding new controllers, performing code reviews, and maintaining API design consistency.

Quick Start

Use this skill to scaffold a new AdminDepartmentController that follows the naming, annotation, DI, validation, and response conventions described above.

Frequently Asked Questions about java-controller

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize Java Controller naming conventions and package organization for REST APIs?

To standardize Java Controller design, apply consistent class naming conventions like AdminDepartmentController and maintain structured package organization across all modules. This ensures uniform RESTful API structures and reduces boilerplate code drift.

How do I enforce parameter validation in a Java REST Controller using @Valid?

Enforce parameter validation in a Java REST Controller by applying the JSR-380 @Valid annotation to request parameters. This ensures input data integrity before processing and integrates with a uniform BaseRetuenDataVO response structure for consistent error handling.

What is the best way to scaffold a new Java Controller that follows REST API design guidelines?

The best way to scaffold a new Java Controller is to apply standardized REST controller annotations, mapping patterns like @RestController and @RequestMapping, SLF4J logging, and a shared BaseRetuenDataVO response structure for consistent API design.

Does this Java Controller scaffold require specific dependency injection or logging frameworks?

The Java Controller scaffold standardizes dependency injection practices and integrates SLF4J for logging. It enforces these guidelines during scaffolding and code reviews to maintain consistent REST API design across various domain modules.

How do I maintain a uniform response structure across multiple Java REST Controllers?

Maintain a uniform response structure across Java REST Controllers by implementing a shared BaseRetuenDataVO object for all API endpoints. This standardizes the response payload and reduces design drift across different domain modules.

When should I use a standardized Java Controller scaffold for REST API code reviews?

Use a standardized Java Controller scaffold during REST API code reviews to verify consistent mapping patterns, @Valid parameter validation, SLF4J logging, and uniform BaseRetuenDataVO responses, preventing design drift across module controllers.