java-springboot by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill java-springboot你的目标是帮助我遵循既定的最佳实践,编写高质量的 Spring Boot 应用程序。
pom.xml) 或 Gradle (build.gradle) 进行依赖管理。spring-boot-starter-web、spring-boot-starter-data-jpa)来简化依赖管理。com.example.app.order、com.example.app.user),而不是按层组织(例如 com.example.app.controller、com.example.app.service)。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
private final。@Component、@Service、@Repository 和 @Controller/@RestController 注解来定义 Bean。application.yml(或 application.properties)进行配置。YAML 因其可读性和层次结构通常更受青睐。@ConfigurationProperties 将配置绑定到强类型的 Java 对象。application-dev.yml、application-prod.yml)来管理特定环境的配置。@Valid、@NotNull、@Size)来验证请求负载。@ControllerAdvice 和 @ExceptionHandler 实现全局异常处理器,以提供一致的错误响应。@Service 类中。@Transactional 以声明式方式管理数据库事务。在必要的最细粒度级别应用它。JpaRepository 或 CrudRepository 来使用 Spring Data JPA 存储库进行标准数据库操作。@Query 或 JPA Criteria API。private static final Logger logger = LoggerFactory.getLogger(MyClass.class);logger.info("Processing user {}...", userId);)而不是字符串拼接,以提高性能。@SpringBootTest 进行加载 Spring 应用上下文的集成测试。@WebMvcTest(用于控制器)或 @DataJpaTest(用于存储库),来隔离测试应用程序的特定部分。每周安装量
9.6K
代码仓库
GitHub 星标数
27.0K
首次出现
2026年2月25日
安全审计
已安装于
codex9.4K
gemini-cli9.4K
opencode9.4K
github-copilot9.4K
cursor9.4K
kimi-cli9.3K
Your goal is to help me write high-quality Spring Boot applications by following established best practices.
pom.xml) or Gradle (build.gradle) for dependency management.spring-boot-starter-web, spring-boot-starter-data-jpa) to simplify dependency management.com.example.app.order, com.example.app.user) rather than by layer (e.g., com.example.app.controller, com.example.app.service).private final.@Component, @Service, @Repository, and @Controller/@RestController annotations appropriately to define beans.application.yml (or application.properties) for configuration. YAML is often preferred for its readability and hierarchical structure.@ConfigurationProperties to bind configuration to strongly-typed Java objects.application-dev.yml, application-prod.yml) to manage environment-specific configurations.@Valid, @NotNull, @Size) on DTOs to validate request payloads.@ControllerAdvice and @ExceptionHandler to provide consistent error responses.@Service classes.@Transactional on service methods to manage database transactions declaratively. Apply it at the most granular level necessary.JpaRepository or CrudRepository for standard database operations.@Query or the JPA Criteria API.private static final Logger logger = LoggerFactory.getLogger(MyClass.class);logger.info("Processing user {}...", userId);) instead of string concatenation to improve performance.@SpringBootTest for integration tests that load the Spring application context.@WebMvcTest (for controllers) or @DataJpaTest (for repositories) to test specific parts of the application in isolation.Weekly Installs
9.6K
Repository
GitHub Stars
27.0K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex9.4K
gemini-cli9.4K
opencode9.4K
github-copilot9.4K
cursor9.4K
kimi-cli9.3K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装