mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-10 18:23:12 +08:00
fix: address Quarkus PR review blockers
This commit is contained in:
@@ -530,10 +530,6 @@ everything-claude-code/
|
||||
| |-- springboot-security/ # Spring Boot security (NEW)
|
||||
| |-- springboot-tdd/ # Spring Boot TDD (NEW)
|
||||
| |-- springboot-verification/ # Spring Boot verification (NEW)
|
||||
| |-- quarkus-patterns/ # Quarkus REST, Panache, and messaging patterns (NEW)
|
||||
| |-- quarkus-security/ # Quarkus JWT/OIDC and RBAC security (NEW)
|
||||
| |-- quarkus-tdd/ # Quarkus testing with JUnit, REST Assured, and Dev Services (NEW)
|
||||
| |-- quarkus-verification/ # Quarkus build, test, security, and native verification (NEW)
|
||||
| |-- configure-ecc/ # Interactive installation wizard (NEW)
|
||||
| |-- security-scan/ # AgentShield security auditor integration (NEW)
|
||||
| |-- java-coding-standards/ # Java coding standards (NEW)
|
||||
|
||||
@@ -8,7 +8,7 @@ origin: ECC
|
||||
|
||||
Apache Camel ile bulut-native, event-driven servisler için Quarkus 3.x mimari ve API desenleri.
|
||||
|
||||
## Ne Zaman Aktif Edilir
|
||||
## When to Use
|
||||
|
||||
- JAX-RS veya RESTEasy Reactive ile REST API'leri oluşturma
|
||||
- Resource → service → repository katmanlarını yapılandırma
|
||||
@@ -21,7 +21,17 @@ Apache Camel ile bulut-native, event-driven servisler için Quarkus 3.x mimari v
|
||||
- Koşullu akış işleme uygulama
|
||||
- GraalVM native derleme ile çalışma
|
||||
|
||||
## Birden Fazla Bağımlılıklı Service Katmanı (Lombok)
|
||||
## How It Works
|
||||
|
||||
Quarkus servislerinde Resource -> service -> repository akışını CDI scope'ları,
|
||||
`@Transactional` sınırları, Panache/Hibernate veri erişimi ve Camel/RabbitMQ
|
||||
entegrasyonlarıyla birlikte uygulayın. Aşağıdaki örnekler event üretimi,
|
||||
dosya işleme, özel logging context ve async yayınlama için kopyalanabilir
|
||||
başlangıç noktaları sağlar.
|
||||
|
||||
## Examples
|
||||
|
||||
### Birden Fazla Bağımlılıklı Service Katmanı (Lombok)
|
||||
|
||||
```java
|
||||
@Slf4j
|
||||
@@ -79,6 +89,7 @@ public class As2ProcessingService {
|
||||
|
||||
this.eventService.createSuccessEvent(documentInfo, "PERSISTENCE_BLOB_EVENT_TYPE");
|
||||
|
||||
String originalFileName = documentInfo.getOriginalFileName();
|
||||
BusinessRulesPayload payload = this.documentJobService.createDocumentAndJobEntities(
|
||||
documentInfo, originalFileName, structureIdPartner,
|
||||
flowProfile, invoiceValidationResult.getDocumentHash());
|
||||
@@ -147,9 +158,10 @@ public class ProcessingService {
|
||||
</configuration>
|
||||
```
|
||||
|
||||
## Event Service Deseni
|
||||
### Event Service Deseni
|
||||
|
||||
```java
|
||||
@Slf4j
|
||||
@ApplicationScoped
|
||||
@RequiredArgsConstructor
|
||||
public class EventService {
|
||||
|
||||
@@ -8,7 +8,7 @@ origin: ECC
|
||||
|
||||
Kimlik doğrulama, yetkilendirme ve girdi doğrulama ile Quarkus uygulamalarını güvenli hale getirmek için en iyi uygulamalar.
|
||||
|
||||
## Ne Zaman Aktif Edilir
|
||||
## When to Use
|
||||
|
||||
- Kimlik doğrulama ekleme (JWT, OIDC, Basic Auth)
|
||||
- `@RolesAllowed` veya SecurityIdentity ile yetkilendirme uygulama
|
||||
@@ -19,7 +19,17 @@ Kimlik doğrulama, yetkilendirme ve girdi doğrulama ile Quarkus uygulamaların
|
||||
- Bağımlılıkları CVE için tarama
|
||||
- MicroProfile JWT veya SmallRye JWT ile çalışma
|
||||
|
||||
## Kimlik Doğrulama
|
||||
## How It Works
|
||||
|
||||
Quarkus güvenliğini katmanlı uygulayın: JWT/OIDC veya Basic Auth ile kimliği
|
||||
doğrulayın, `SecurityIdentity` ve `@RolesAllowed` ile yetki kararlarını
|
||||
merkezileştirin, Bean Validation ile girdileri sınırlandırın, CORS ve güvenlik
|
||||
başlıklarını açıkça yapılandırın, gizli bilgileri Vault veya ortam değişkenleri
|
||||
üzerinden yönetin.
|
||||
|
||||
## Examples
|
||||
|
||||
### Kimlik Doğrulama
|
||||
|
||||
### JWT Kimlik Doğrulama
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ origin: ECC
|
||||
|
||||
80%+ kapsam (unit + integration) ile Quarkus 3.x servisleri için TDD rehberi. Apache Camel ile event-driven mimariler için optimize edilmiştir.
|
||||
|
||||
## Ne Zaman Kullanılır
|
||||
## When to Use
|
||||
|
||||
- Yeni özellikler veya REST endpoint'leri
|
||||
- Bug düzeltmeleri veya refactoring'ler
|
||||
@@ -19,14 +19,16 @@ origin: ECC
|
||||
- CompletableFuture async işlemlerini doğrulama
|
||||
- LogContext yayılımını test etme
|
||||
|
||||
## İş Akışı
|
||||
## How It Works
|
||||
|
||||
1. Önce testleri yazın (başarısız olmalılar)
|
||||
2. Geçmek için minimal kod uygulayın
|
||||
3. Testleri yeşil tutarken refactor edin
|
||||
4. JaCoCo ile kapsamı zorlayın (%80+ hedef)
|
||||
|
||||
## @Nested Organizasyonlu Unit Testler
|
||||
## Examples
|
||||
|
||||
### @Nested Organizasyonlu Unit Testler
|
||||
|
||||
Kapsamlı ve okunabilir testler için bu yapılandırılmış yaklaşımı izleyin:
|
||||
|
||||
@@ -370,8 +372,10 @@ class BusinessRulesRouteTest {
|
||||
});
|
||||
camelContext.getRouteController().startRoute("document-processing");
|
||||
|
||||
// Validator'ı exception fırlatacak şekilde mock'la
|
||||
when(eventService.validate(any())).thenThrow(new ValidationException("Invalid document"));
|
||||
// Error event oluşturma hatasını gerçek EventService API'si üzerinden simüle et
|
||||
doThrow(new ValidationException("Invalid document"))
|
||||
.when(eventService)
|
||||
.createErrorEvent(any(), eq("VALIDATION_ERROR"), anyString());
|
||||
|
||||
// ACT
|
||||
producerTemplate.sendBody("direct:process-document", testPayload);
|
||||
|
||||
@@ -8,15 +8,7 @@ origin: ECC
|
||||
|
||||
Standards for readable, maintainable Java (17+) code in Spring Boot and Quarkus services.
|
||||
|
||||
## Framework Detection
|
||||
|
||||
Before applying standards, determine the framework from the build file:
|
||||
|
||||
- Build file contains `quarkus` → apply **[QUARKUS]** conventions
|
||||
- Build file contains `spring-boot` → apply **[SPRING]** conventions
|
||||
- Neither detected → apply shared conventions only
|
||||
|
||||
## When to Activate
|
||||
## When to Use
|
||||
|
||||
- Writing or reviewing Java code in Spring Boot or Quarkus projects
|
||||
- Enforcing naming, immutability, or exception handling conventions
|
||||
@@ -25,6 +17,16 @@ Before applying standards, determine the framework from the build file:
|
||||
- Structuring packages and project layout
|
||||
- **[QUARKUS]**: Working with CDI scopes, Panache entities, or reactive pipelines
|
||||
|
||||
## How It Works
|
||||
|
||||
### Framework Detection
|
||||
|
||||
Before applying standards, determine the framework from the build file:
|
||||
|
||||
- Build file contains `quarkus` → apply **[QUARKUS]** conventions
|
||||
- Build file contains `spring-boot` → apply **[SPRING]** conventions
|
||||
- Neither detected → apply shared conventions only
|
||||
|
||||
## Core Principles
|
||||
|
||||
- Prefer clarity over cleverness
|
||||
@@ -33,6 +35,12 @@ Before applying standards, determine the framework from the build file:
|
||||
- Consistent naming and package structure
|
||||
- **[QUARKUS]**: Favor build-time over runtime processing; avoid runtime reflection where possible
|
||||
|
||||
## Examples
|
||||
|
||||
The sections below show concrete Spring Boot, Quarkus, and shared Java examples
|
||||
for naming, immutability, dependency injection, reactive code, exceptions,
|
||||
project layout, logging, configuration, and tests.
|
||||
|
||||
## Naming
|
||||
|
||||
```java
|
||||
|
||||
Reference in New Issue
Block a user