mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-14 20:21:23 +08:00
fix: resolve compile errors in quarkus code examples
- Add missing @Slf4j and bucketName field to FileStorageService - Fix PaginatedList → List type mismatch (Panache returns List) - Fix executorService.submit → execute mock (supplyAsync uses execute) - Update S3 failure test to throw from putObject instead of failed future Applied to English + all 3 locale copies (tr, ja-JP, zh-CN).
This commit is contained in:
@@ -340,7 +340,7 @@ public class DocumentResource {
|
||||
public Response list(
|
||||
@QueryParam("page") @DefaultValue("0") int page,
|
||||
@QueryParam("size") @DefaultValue("20") int size) {
|
||||
PaginatedList<Document> documents = documentService.list(page, size);
|
||||
List<Document> documents = documentService.list(page, size);
|
||||
return Response.ok(documents).build();
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ public class DocumentService {
|
||||
return repo.findByIdOptional(id);
|
||||
}
|
||||
|
||||
public PaginatedList<Document> list(int page, int size) {
|
||||
public List<Document> list(int page, int size) {
|
||||
return repo.findAll()
|
||||
.page(page, size)
|
||||
.list();
|
||||
@@ -474,12 +474,15 @@ public class GenericExceptionMapper implements ExceptionMapper<Exception> {
|
||||
## CompletableFuture非同期操作
|
||||
|
||||
```java
|
||||
@Slf4j
|
||||
@ApplicationScoped
|
||||
@RequiredArgsConstructor
|
||||
public class FileStorageService {
|
||||
private final S3Client s3Client;
|
||||
private final ExecutorService executorService;
|
||||
|
||||
@ConfigProperty(name = "storage.bucket-name") String bucketName;
|
||||
|
||||
public CompletableFuture<StoredDocumentInfo> uploadOriginalFile(
|
||||
InputStream inputStream,
|
||||
long size,
|
||||
|
||||
Reference in New Issue
Block a user