kotlin-springboot by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill kotlin-springboot你的目标是帮助我编写高质量、符合 Kotlin 语言习惯的 Spring Boot 应用程序。
pom.xml) 或 Gradle (build.gradle) 并配合 Kotlin 插件 (kotlin-maven-plugin 或 org.jetbrains.kotlin.jvm)。kotlin-jpa 插件,以便自动使实体类成为 open 类,而无需编写样板代码。spring-boot-starter-web、spring-boot-starter-data-jpa)。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
com.example.app.order、com.example.app.user),而不是按层。private val。在任何地方都优先使用 val 而不是 var,以促进不可变性。@Service、@Repository 和 @RestController 注解。application.yml,因为它具有良好的可读性和层次结构。@ConfigurationProperties 与 data class 结合使用,以创建不可变的、类型安全的配置对象。application-dev.yml、application-prod.yml) 来管理特定环境的配置。data class。这可以免费提供 equals()、hashCode()、toString() 和 copy() 方法,并促进不可变性。@Valid、@NotNull、@Size)的 Java Bean 验证 (JSR 380)。@ControllerAdvice 和 @ExceptionHandler 实现全局异常处理器,以提供一致的错误响应。@Service 类中。@Transactional。在 Kotlin 中,这可以应用于类级别或函数级别。open 的。强烈建议使用 kotlin-jpa 编译器插件来自动处理此问题。?)在类型级别明确定义哪些实体字段是可选的或必需的。JpaRepository 或 CrudRepository 来使用 Spring Data JPA 仓库。伴生对象记录器: 声明记录器的惯用方式是在伴生对象中。
companion object {
private val logger = LoggerFactory.getLogger(MyClass::class.java)
}
参数化日志记录: 使用参数化消息(logger.info("正在处理用户 {}...", userId))以提高性能和清晰度。
@WebMvcTest 或 @DataJpaTest,来测试应用程序的特定部分。suspend 函数: 对于非阻塞的异步代码,在控制器和服务中使用 suspend 函数。Spring Boot 对协程有很好的支持。coroutineScope 或 supervisorScope 来管理协程的生命周期。每周安装量
7.5K
代码仓库
GitHub 星标数
26.9K
首次出现
2026年2月25日
安全审计
安装于
codex7.4K
gemini-cli7.4K
opencode7.4K
github-copilot7.4K
cursor7.4K
kimi-cli7.4K
Your goal is to help me write high-quality, idiomatic Spring Boot applications using Kotlin.
pom.xml) or Gradle (build.gradle) with the Kotlin plugins (kotlin-maven-plugin or org.jetbrains.kotlin.jvm).kotlin-jpa plugin to automatically make entity classes open without boilerplate.spring-boot-starter-web, spring-boot-starter-data-jpa) as usual.com.example.app.order, com.example.app.user) rather than by layer.private val in the primary constructor. Prefer val over var everywhere to promote immutability.@Service, @Repository, and @RestController annotations just as you would in Java.application.yml for its readability and hierarchical structure.@ConfigurationProperties with data class to create immutable, type-safe configuration objects.application-dev.yml, application-prod.yml) to manage environment-specific configurations.data class for all DTOs. This provides equals(), hashCode(), toString(), and copy() for free and promotes immutability.@Valid, @NotNull, @Size) on your DTO data classes.@ControllerAdvice and for consistent error responses.@Service classes.@Transactional on service methods. In Kotlin, this can be applied to class or function level.open. It's highly recommended to use the kotlin-jpa compiler plugin to handle this automatically.?) to clearly define which entity fields are optional or required at the type level.JpaRepository or CrudRepository.Companion Object Logger: The idiomatic way to declare a logger is in a companion object.
companion object {
private val logger = LoggerFactory.getLogger(MyClass::class.java)
}
Parameterized Logging: Use parameterized messages (logger.info("Processing user {}...", userId)) for performance and clarity.
@WebMvcTest or @DataJpaTest to test specific parts of the application.suspend functions: For non-blocking asynchronous code, use suspend functions in your controllers and services. Spring Boot has excellent support for coroutines.coroutineScope or supervisorScope to manage the lifecycle of coroutines.Weekly Installs
7.5K
Repository
GitHub Stars
26.9K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex7.4K
gemini-cli7.4K
opencode7.4K
github-copilot7.4K
cursor7.4K
kimi-cli7.4K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
AI智能体长期记忆系统 - 精英级架构,融合6种方法,永不丢失上下文
1,200 周安装
AI新闻播客制作技能:实时新闻转对话式播客脚本与音频生成
1,200 周安装
Word文档处理器:DOCX创建、编辑、分析与修订痕迹处理全指南 | 自动化办公解决方案
1,200 周安装
React Router 框架模式指南:全栈开发、文件路由、数据加载与渲染策略
1,200 周安装
Nano Banana AI 图像生成工具:使用 Gemini 3 Pro 生成与编辑高分辨率图像
1,200 周安装
SVG Logo Designer - AI 驱动的专业矢量标识设计工具,生成可缩放品牌标识
1,200 周安装
@ExceptionHandler