SuperAPI AI Directory

springboot-backend-conventions

Coding & development

View repository

Updated 10-16 08:49

About this skill

Spring Boot Backend Guidelines

Applicable Scenarios

  • Handle Spring Boot configuration and multi-environment management
  • Design bean wiring, conditional configuration, and dependency injection approaches
  • Adjust transactions, data access, exception handling, and monitoring capabilities
  • Determine whether a piece of backend implementation conforms to framework-layer best practices

Inapplicable Scenarios

  • Only determining which microservice a feature should belong to
  • Only Kotlin language style and code formatting issues
  • Only API contract design, not involving Spring Boot framework usage

Quick Guidance

  1. This skill focuses on Spring Boot framework practices in the BK-CI backend, and does not replace microservice layering, API design, or Kotlin language specifications.
  2. Spring Boot-related questions are best viewed in three parts:
    • Configuration management and bean wiring:reference/1-config-bean.md
    • Data access, transactions, and exception handling:reference/2-data-transaction-exception.md
    • Monitoring, logging, testing, and quality:reference/3-observability-testing-quality.md
  3. Prefer constructor injection, type-safe configuration, and clear lifecycle boundaries.
  4. Constraints that can be handled by the framework and infrastructure should not be manually reimplemented in business code.
  5. If the question has shifted to service ownership, also see backend-microservice-development; if it has shifted to microservice infrastructure capabilities, also see microservice-infrastructure。

High-Signal Rules

  • The focus of Spring Boot guidelines is stable wiring, clear boundaries, and operability
  • Framework capabilities such as configuration, transactions, exceptions, and monitoring often jointly determine system stability
  • Framework manuals are not suitable for residing permanently in rules; they are better suited as on-demand loaded skills

Key Pitfalls

  • Mixing Spring Boot framework practices and business layering guidelines into a single document
  • Only piling up features with annotations, without considering lifecycle, transaction boundaries, and runtime impact
  • Putting lengthy framework explanations into always rules, resulting in excessively high resident noise

Further Reading

  • Configuration management and bean wiring:reference/1-config-bean.md
  • Data access, transactions, and exception handling:reference/2-data-transaction-exception.md
  • Monitoring, logging, testing, and quality:reference/3-observability-testing-quality.md
  • If you are looking at microservice layering: also see backend-microservice-development
  • If you are looking at microservice infrastructure: also see microservice-infrastructure