diff --git a/Dockerfile b/Dockerfile index 5edc02d..c5876da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ -FROM tomcat:9-jre8-alpine -RUN ["rm", "-fr", "/usr/local/tomcat/webapps/ROOT"] +FROM eclipse-temurin:8-jre-focal -ADD ./target/*.war /usr/local/tomcat/webapps/ROOT.war +COPY ./target/*.jar /work/app.jar +WORKDIR /work -EXPOSE 8080 \ No newline at end of file +EXPOSE 8080 + +ENTRYPOINT ["java","-jar","app.jar"] \ No newline at end of file diff --git a/README.md b/README.md index 320fb3f..4c408cc 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,7 @@ you can run it inside a docker container using the following instructions: 1. Create a folder named `rest-sdk-wrapper` 2. Copy the jar inside this folder -3. Create a file named `Dockerfile` or use [this one](Dockerfile) and paste in it the following content -```Dockerfile -FROM tomcat:9-jre8-alpine -RUN ["rm", "-fr", "/usr/local/tomcat/webapps/ROOT"] - -ADD ./target/*.war /usr/local/tomcat/webapps/ROOT.war - -EXPOSE 8080 -``` +3. Create a file named `Dockerfile` or use [this one](Dockerfile) 4. Run the following command to build the docker container `docker build -t paymentcomponents/rest-sdk-wrapper .` 5. Run the following command to run the docker container `docker run -p 8089:8080 -n rest-sdk-wrapper paymentcomponents/rest-sdk-wrapper` diff --git a/pom.xml b/pom.xml index 0623253..d32a164 100644 --- a/pom.xml +++ b/pom.xml @@ -10,17 +10,16 @@ com.paymentcomponents.libraries rest-sdk-wrapper - 1.7.5 + 1.8.0 rest-sdk-wrapper Wrapper for Payment Components Financial Messaging Libraries - war 1.8 - 21.27.0 - 21.7.0 + 21.27.1 + 21.8.0 21.6.0 - 3.5.1 + 3.6.0 @@ -35,11 +34,6 @@ org.springframework.boot spring-boot-starter-web - - org.springframework.boot - spring-boot-starter-tomcat - provided - org.springframework.boot spring-boot-starter-test @@ -91,12 +85,6 @@ - - org.reflections - reflections - 0.9.12 - - org.springdoc springdoc-openapi-ui diff --git a/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperApplication.java b/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperApplication.java index 1b7f177..1d6292c 100644 --- a/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperApplication.java +++ b/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperApplication.java @@ -2,16 +2,9 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; @SpringBootApplication -public class RestSdkWrapperApplication extends SpringBootServletInitializer { - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(RestSdkWrapperApplication.class); - } +public class RestSdkWrapperApplication { public static void main(String[] args) { SpringApplication.run(RestSdkWrapperApplication.class, args); diff --git a/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperConfiguration.java b/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperConfiguration.java index 1b8f75e..f13730d 100644 --- a/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperConfiguration.java +++ b/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/RestSdkWrapperConfiguration.java @@ -17,7 +17,7 @@ public OpenAPI openApiInfo() { .info(new Info() .title("Payment Components") .description("Financial Messaging APIs") - .version("1.1.0")); //should be the same as maven + .version("1.8.0")); //should be the same as maven } @Bean diff --git a/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/filter/RequestLogIdFilter.java b/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/filter/RequestLogIdFilter.java index 6919f40..72fd12f 100644 --- a/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/filter/RequestLogIdFilter.java +++ b/src/main/java/com/paymentcomponents/libraries/rest/sdk/wrapper/filter/RequestLogIdFilter.java @@ -10,7 +10,6 @@ import java.io.IOException; import java.util.UUID; -//@Component public class RequestLogIdFilter implements Filter { private final static Logger LOG = LoggerFactory.getLogger(RequestLogIdFilter.class);