Spring Boot Service taste — промпт для ChatGPT: что делает
Промпт Spring Boot Service taste для ChatGPT задаёт стандарты проектирования бэкенда на Java.
CC0-1.0 ★ 178 201 обновлён 2026-10-24
Открыть на GitHubЧто делает Spring Boot Service taste
Этот промпт задаёт набор правил для бэкенд-разработки на Java с использованием актуальных версий Spring Boot и LTS-версий Java, а также виртуальных потоков для операций ввода-вывода. Промпт организует структуру пакетов по бизнес-доменам, требует инъекцию зависимостей через конструкторы с финальными полями и конфигурацию через типизированные записи @ConfigurationProperties. Конфиденциальные данные выносятся в переменные окружения, запросы валидируются аннотациями Bean Validation, а ошибки возвращаются в формате ProblemDetail.
Шаблон предписывает обрабатывать исключения в едином классе @RestControllerAdvice и использовать миграции схемы базы данных через Flyway или Liquibase. Интеграционные тесты запускаются в Testcontainers против реальных баз данных, а сборка контейнеров выполняется через Buildpacks или послойные JAR-файлы от имени непривилегированного пользователя.
Какие задачи решает
- проектировать структуру пакетов по фичам
- настраивать типизированные конфигурации через записи
- валидировать входящие запросы аннотациями
- управлять миграциями схемы базы данных
- запускать интеграционные тесты в Testcontainers
Примеры запросов агенту
- Примени промпт Spring Boot Service taste для проектирования бэкенд-архитектуры на Java
- Настрой структуру сервиса на Spring Boot по правилам Spring Boot Service taste
- Примени стандарты Spring Boot Service taste к этому репозиторию
Как установить Spring Boot Service taste
Как использовать
Вставьте текст в начало диалога или в инструкции проекта
Вручную: положить файлы
.claude/commands/prompts.csv.mdВопросы о Spring Boot Service taste
Как установить Spring Boot Service taste в Claude Code?
Установите промпт, добавив файл .claude/commands/prompts.csv.md в проект.
Что делает Spring Boot Service taste?
Промпт задаёт архитектурные правила и стандарты для бэкенд-разработки на Spring Boot и Java.
Какие технологии задействованы в требованиях?
Используются Spring Boot, Java, Flyway, Liquibase, Testcontainers и Micrometer.
Исходный текст
prompts.csv · CC0-1.0
# Spring Boot Service taste of a pragmatic Java backend engineer - Start on the latest Spring Boot release with a current Java LTS version, and enable virtual threads where blocking I/O dominates. Confidence: 0.80 - Organize packages by feature such as orders or billing rather than by layer like controllers, services and repositories. Confidence: 0.85 - Use constructor injection with final fields everywhere and never field injection with @Autowired. Confidence: 0.95 - Bind configuration to typed, validated @ConfigurationProperties records instead of scattered @Value strings. Confidence: 0.90 - Keep secrets out of application.yml and read them from environment variables or a secrets manager. Confidence: 0.95 - Use Java records for request and response DTOs and keep JPA entities out of controller signatures. Confidence: 0.90 - Validate requests with Bean Validation annotations and @Valid, and return ProblemDetail responses for every error. Confidence: 0.85 - Handle exceptions in one @RestControllerAdvice class instead of try/catch blocks in each controller. Confidence: 0.85 - Put @Transactional on service methods, keep transactions short, and never call remote services inside one. Confidence: 0.90 - Turn off open-in-view and fetch associations explicitly with fetch joins or entity graphs to avoid N+1 queries. Confidence: 0.90 - Manage schema changes with Flyway or Liquibase migrations and keep Hibernate ddl-auto set to validate or none. Confidence: 0.95 - Call other HTTP services through RestClient or declarative HTTP interfaces with explicit connect and read timeouts. Confidence: 0.85 - Wrap unreliable dependencies in retries with backoff and circuit breakers, and make retried operations idempotent. Confidence: 0.80 - Log in structured JSON with correlation IDs from tracing, and never log tokens, passwords or full request bodies. Confidence: 0.90 - Expose only health, info and metrics Actuator endpoints publicly, and secure or disable the rest. Confidence: 0.90 - Export metrics and traces with Micrometer and OpenTelemetry instead of custom timing code. Confidence: 0.80 - Secure endpoints with Spring Security as an OAuth2 resource server and method-level authorization for sensitive actions. Confidence: 0.85 - Write fast slice tests with @WebMvcTest and @DataJpaTest, and keep full @SpringBootTest runs for a few key flows. Confidence: 0.80 - Run integration tests against real databases and brokers in Testcontainers rather than H2 or embedded fakes. Confidence: 0.90 - Generate the OpenAPI spec from code with springdoc and publish it with every build. Confidence: 0.70 - Build container images with Buildpacks or layered jars and run them as a non-root user with memory limits set. Confidence: 0.80 - Keep dependency versions managed by the Spring Boot BOM and let a bot like Renovate open upgrade pull requests. Confidence: 0.80
© f · CC0-1.0 · f/prompts.chat