mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-14 04:01:30 +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-security/ # Spring Boot security (NEW)
|
||||||
| |-- springboot-tdd/ # Spring Boot TDD (NEW)
|
| |-- springboot-tdd/ # Spring Boot TDD (NEW)
|
||||||
| |-- springboot-verification/ # Spring Boot verification (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)
|
| |-- configure-ecc/ # Interactive installation wizard (NEW)
|
||||||
| |-- security-scan/ # AgentShield security auditor integration (NEW)
|
| |-- security-scan/ # AgentShield security auditor integration (NEW)
|
||||||
| |-- java-coding-standards/ # Java coding standards (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.
|
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
|
- JAX-RS veya RESTEasy Reactive ile REST API'leri oluşturma
|
||||||
- Resource → service → repository katmanlarını yapılandırma
|
- 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
|
- Koşullu akış işleme uygulama
|
||||||
- GraalVM native derleme ile çalışma
|
- 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
|
```java
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -79,6 +89,7 @@ public class As2ProcessingService {
|
|||||||
|
|
||||||
this.eventService.createSuccessEvent(documentInfo, "PERSISTENCE_BLOB_EVENT_TYPE");
|
this.eventService.createSuccessEvent(documentInfo, "PERSISTENCE_BLOB_EVENT_TYPE");
|
||||||
|
|
||||||
|
String originalFileName = documentInfo.getOriginalFileName();
|
||||||
BusinessRulesPayload payload = this.documentJobService.createDocumentAndJobEntities(
|
BusinessRulesPayload payload = this.documentJobService.createDocumentAndJobEntities(
|
||||||
documentInfo, originalFileName, structureIdPartner,
|
documentInfo, originalFileName, structureIdPartner,
|
||||||
flowProfile, invoiceValidationResult.getDocumentHash());
|
flowProfile, invoiceValidationResult.getDocumentHash());
|
||||||
@@ -147,9 +158,10 @@ public class ProcessingService {
|
|||||||
</configuration>
|
</configuration>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Event Service Deseni
|
### Event Service Deseni
|
||||||
|
|
||||||
```java
|
```java
|
||||||
|
@Slf4j
|
||||||
@ApplicationScoped
|
@ApplicationScoped
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class EventService {
|
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.
|
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)
|
- Kimlik doğrulama ekleme (JWT, OIDC, Basic Auth)
|
||||||
- `@RolesAllowed` veya SecurityIdentity ile yetkilendirme uygulama
|
- `@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
|
- Bağımlılıkları CVE için tarama
|
||||||
- MicroProfile JWT veya SmallRye JWT ile çalışma
|
- 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
|
### 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.
|
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
|
- Yeni özellikler veya REST endpoint'leri
|
||||||
- Bug düzeltmeleri veya refactoring'ler
|
- Bug düzeltmeleri veya refactoring'ler
|
||||||
@@ -19,14 +19,16 @@ origin: ECC
|
|||||||
- CompletableFuture async işlemlerini doğrulama
|
- CompletableFuture async işlemlerini doğrulama
|
||||||
- LogContext yayılımını test etme
|
- LogContext yayılımını test etme
|
||||||
|
|
||||||
## İş Akışı
|
## How It Works
|
||||||
|
|
||||||
1. Önce testleri yazın (başarısız olmalılar)
|
1. Önce testleri yazın (başarısız olmalılar)
|
||||||
2. Geçmek için minimal kod uygulayın
|
2. Geçmek için minimal kod uygulayın
|
||||||
3. Testleri yeşil tutarken refactor edin
|
3. Testleri yeşil tutarken refactor edin
|
||||||
4. JaCoCo ile kapsamı zorlayın (%80+ hedef)
|
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:
|
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");
|
camelContext.getRouteController().startRoute("document-processing");
|
||||||
|
|
||||||
// Validator'ı exception fırlatacak şekilde mock'la
|
// Error event oluşturma hatasını gerçek EventService API'si üzerinden simüle et
|
||||||
when(eventService.validate(any())).thenThrow(new ValidationException("Invalid document"));
|
doThrow(new ValidationException("Invalid document"))
|
||||||
|
.when(eventService)
|
||||||
|
.createErrorEvent(any(), eq("VALIDATION_ERROR"), anyString());
|
||||||
|
|
||||||
// ACT
|
// ACT
|
||||||
producerTemplate.sendBody("direct:process-document", testPayload);
|
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.
|
Standards for readable, maintainable Java (17+) code in Spring Boot and Quarkus services.
|
||||||
|
|
||||||
## Framework Detection
|
## When to Use
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
- Writing or reviewing Java code in Spring Boot or Quarkus projects
|
- Writing or reviewing Java code in Spring Boot or Quarkus projects
|
||||||
- Enforcing naming, immutability, or exception handling conventions
|
- 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
|
- Structuring packages and project layout
|
||||||
- **[QUARKUS]**: Working with CDI scopes, Panache entities, or reactive pipelines
|
- **[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
|
## Core Principles
|
||||||
|
|
||||||
- Prefer clarity over cleverness
|
- Prefer clarity over cleverness
|
||||||
@@ -33,6 +35,12 @@ Before applying standards, determine the framework from the build file:
|
|||||||
- Consistent naming and package structure
|
- Consistent naming and package structure
|
||||||
- **[QUARKUS]**: Favor build-time over runtime processing; avoid runtime reflection where possible
|
- **[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
|
## Naming
|
||||||
|
|
||||||
```java
|
```java
|
||||||
|
|||||||
Reference in New Issue
Block a user