quarkus-expert
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesequarkus-expert
quarkus-expert
Keyword: quarkus | Platforms: gemini,claude,codex
High-Performance Quarkus Framework Expert Skill - Deep production-grade knowledge of the Quarkus ecosystem.
关键词:quarkus | 支持平台:gemini,claude,codex
高性能Quarkus框架专家技能 - 具备Quarkus生态系统的深度生产级知识。
Core Mandates
核心要求
- Build-Time First: Move processing to augmentation phase, minimize runtime classpath scanning
- Java 21+ Excellence: Leverage Virtual Threads () for blocking operations
@RunOnVirtualThread - Reactive Discipline: Use Mutiny (,
Uni) for non-blocking I/OMulti - Dependency Discipline: Always use Quarkus BOM for version management
- Constructor Injection: Mandate constructor injection over field injection
- 构建时优先: 将处理逻辑移至增强阶段,最大限度减少运行时类路径扫描
- Java 21+ 优势利用: 针对阻塞操作使用虚拟线程()
@RunOnVirtualThread - 响应式规范: 使用Mutiny(、
Uni)实现非阻塞I/OMulti - 依赖规范: 始终使用Quarkus BOM进行版本管理
- 构造函数注入: 要求使用构造函数注入而非字段注入
Architectural Patterns
架构模式
Persistence Strategy
持久化策略
- Imperative: Hibernate ORM with Panache (Active Record or Repository pattern)
- Reactive: Reactive SQL Clients (MySQL, PostgreSQL, Oracle)
- Dev Services: Zero-config databases and brokers during development
- 命令式: 搭配Panache的Hibernate ORM(活动记录或仓库模式)
- 响应式: 响应式SQL客户端(MySQL、PostgreSQL、Oracle)
- 开发服务: 开发过程中零配置的数据库和消息代理
Cloud-Native Observability
云原生可观测性
- OpenTelemetry (OTel): Standard for tracing and metrics
- Health Checks: Implement and
Livenessprobes using MicroProfile HealthReadiness
- OpenTelemetry (OTel): 链路追踪和指标的标准实现
- 健康检查: 使用MicroProfile Health实现和
Liveness探针Readiness
Security Architecture
安全架构
- Use Proactive Authentication and RBAC with
@RolesAllowed - Prefer OIDC/JWT for stateless microservices
- 使用主动认证和基于的RBAC
@RolesAllowed - 无状态微服务优先采用OIDC/JWT方案
Testing
测试
- Integration Testing: Use for full-stack tests
@QuarkusTest - Mocking: Utilize and
@InjectMock@InjectSpy - Parity: Use Testcontainers via Dev Services
- 集成测试: 使用实现全栈测试
@QuarkusTest - Mock模拟: 利用和
@InjectMock@InjectSpy - 环境一致性: 通过开发服务使用Testcontainers
Extension Development
扩展开发
- Build-Time (Deployment): Write methods for bean registration, bytecode generation
BuildStep - Runtime Init: Differentiate between and
STATIC_INITRUNTIME_INIT
- 构建时(部署阶段): 编写方法实现Bean注册、字节码生成
BuildStep - 运行时初始化: 区分和
STATIC_INITRUNTIME_INIT
Troubleshooting
故障排查
- ClassLoader Leaks: Monitor custom dynamic class loading
- ContextNotActiveException: Ensure CDI contexts propagate correctly with Mutiny
- Native Image Failures: Analyze reports and provide
reflection-config.json
- 类加载器泄漏: 监控自定义动态类加载行为
- ContextNotActiveException: 确保CDI上下文随Mutiny正确传播
- 原生镜像构建失败: 分析报告并提供
reflection-config.json
🌐 Knowledge Sources & Deep Dives
🌐 知识来源与深度资料
Directive: Useto read specific guides if the user's question involves a particular extension (e.g., Hibernate, Kafka, OIDC).web_fetch
- Mutiny Mastery: SmallRye Mutiny Documentation - Core reactive patterns.
- Persistence Guide: Hibernate ORM with Panache - Data access patterns.
- Messaging: Apache Kafka with Quarkus - Event-driven architecture.
- CDI/Arc: Contexts and Dependency Injection in Quarkus - Bean lifecycle and injection.
- Virtual Threads: Quarkus and Virtual Threads - Blocking I/O optimization.
使用说明: 如果用户的问题涉及特定扩展(例如Hibernate、Kafka、OIDC),使用工具读取对应指南。web_fetch
- Mutiny精通指南: SmallRye Mutiny Documentation - 核心响应式模式。
- 持久化指南: Hibernate ORM with Panache - 数据访问模式。
- 消息队列: Apache Kafka with Quarkus - 事件驱动架构。
- CDI/Arc: Contexts and Dependency Injection in Quarkus - Bean生命周期与注入。
- 虚拟线程: Quarkus and Virtual Threads - 阻塞I/O优化。
References
参考资料
Skill Interoperability
技能互操作性
The quarkus-expert ⚡ skill is a comprehensive framework built on:
- java-expert ☕: Core language and JVM features.
- vertx-expert 🌀: Reactive engine for non-blocking operations.
- graalvm-expert 🚀: Native Image generation and AOT optimization.
quarkus-expert ⚡ 技能是基于以下技术构建的综合框架:
- java-expert ☕: 核心语言与JVM特性。
- vertx-expert 🌀: 用于非阻塞操作的响应式引擎。
- graalvm-expert 🚀: 原生镜像生成与AOT优化。