chore: update
This commit is contained in:
+15
-10
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
<artifactId>file-service</artifactId>
|
||||
|
||||
<properties>
|
||||
<quarkus.container-image.registry>vps.demonkernel.io.vn</quarkus.container-image.registry>
|
||||
<quarkus.container-image.registry
|
||||
>vps.demonkernel.io.vn</quarkus.container-image.registry>
|
||||
<quarkus.container-image.group>foodsurf</quarkus.container-image.group>
|
||||
<quarkus.container-image.name>file-service</quarkus.container-image.name>
|
||||
<quarkus.container-image.name
|
||||
>file-service</quarkus.container-image.name>
|
||||
|
||||
<python.image.full.name>
|
||||
${quarkus.container-image.registry}/${quarkus.container-image.group}/${quarkus.container-image.name}</python.image.full.name>
|
||||
@@ -46,13 +48,16 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>docker</executable>
|
||||
<workingDirectory>${project.basedir}/python</workingDirectory>
|
||||
<workingDirectory
|
||||
>${project.basedir}/python</workingDirectory>
|
||||
<arguments>
|
||||
<argument>build</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${python.image.full.name}:${parent.version}</argument>
|
||||
<argument
|
||||
>${python.image.full.name}:${parent.version}</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${python.image.full.name}:latest</argument>
|
||||
<argument
|
||||
>${python.image.full.name}:latest</argument>
|
||||
<argument>.</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
@@ -77,4 +82,4 @@
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -151,8 +151,8 @@
|
||||
<configuration>
|
||||
<argLine>@{argLine}</argLine>
|
||||
<systemPropertyVariables>
|
||||
<native.image.path>
|
||||
${project.build.directory}/${project.build.finalName}-runner</native.image.path>
|
||||
<native.image.path
|
||||
>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
|
||||
<java.util.logging.manager
|
||||
>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
||||
<maven.home>${maven.home}</maven.home>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.drinkool.controller;
|
||||
|
||||
import com.drinkool.lib.dtos.UploadFile;
|
||||
import com.drinkool.services.FileService;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
import jakarta.inject.Inject;
|
||||
@@ -9,7 +8,9 @@ import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import java.io.File;
|
||||
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
||||
import org.jboss.resteasy.reactive.RestForm;
|
||||
|
||||
@Path("/api/file")
|
||||
public class FileController {
|
||||
@@ -19,8 +20,8 @@ public class FileController {
|
||||
FileService fileService;
|
||||
|
||||
@POST
|
||||
public Uni<Response> upload(UploadFile input) {
|
||||
return fileService.upload(input);
|
||||
public Uni<Response> upload(@RestForm File file) {
|
||||
return fileService.upload(file);
|
||||
}
|
||||
|
||||
@GET
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
package com.drinkool.services;
|
||||
|
||||
import com.drinkool.lib.dtos.UploadFile;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import java.io.File;
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
import org.jboss.resteasy.reactive.RestForm;
|
||||
|
||||
@RegisterRestClient(configKey = "file")
|
||||
@Path("/")
|
||||
public interface FileService {
|
||||
@POST
|
||||
Uni<Response> upload(UploadFile input);
|
||||
Uni<Response> upload(@RestForm File file);
|
||||
|
||||
@GET
|
||||
@Path("/{name}")
|
||||
Uni<Response> get(@PathParam("name") String name);
|
||||
@GET
|
||||
@Path("/{name}")
|
||||
Uni<Response> get(@PathParam("name") String name);
|
||||
}
|
||||
|
||||
+1
-1
@@ -66,4 +66,4 @@ spec:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storage: 10Gi
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package com.drinkool.lib.dtos;
|
||||
|
||||
import io.vertx.ext.web.FileUpload;
|
||||
|
||||
public class UploadFile {
|
||||
|
||||
public FileUpload file;
|
||||
}
|
||||
Reference in New Issue
Block a user