From 99c6ceca0e7e42b0b2bc1df543b0e594bf339718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Ra=C4=8Dansk=C3=BD?= Date: Thu, 2 May 2024 12:45:42 +0200 Subject: [PATCH] Fix #1480: Improve WildFly documentation and configuration (#1486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix #1480: Improve WildFly documentation and configuration Co-authored-by: Jan Pešek --- docs/Admin-Deploying-Wildfly.md | 2 +- docs/Deploying-Wildfly.md | 19 ++++++------------- .../src/main/resources/application.properties | 4 +++- .../WEB-INF/jboss-deployment-structure.xml | 2 +- powerauth-java-server/pom.xml | 13 ------------- .../src/main/resources/application.properties | 5 ++++- .../WEB-INF/jboss-deployment-structure.xml | 12 +----------- 7 files changed, 16 insertions(+), 41 deletions(-) diff --git a/docs/Admin-Deploying-Wildfly.md b/docs/Admin-Deploying-Wildfly.md index 99978632b..f60a1f6b9 100644 --- a/docs/Admin-Deploying-Wildfly.md +++ b/docs/Admin-Deploying-Wildfly.md @@ -6,7 +6,7 @@ PowerAuth Admin contains the following configuration in `jboss-deployment-struct ```xml - + diff --git a/docs/Deploying-Wildfly.md b/docs/Deploying-Wildfly.md index 0dd363c03..54b1bf88e 100644 --- a/docs/Deploying-Wildfly.md +++ b/docs/Deploying-Wildfly.md @@ -6,22 +6,13 @@ PowerAuth server contains the following configuration in `jboss-deployment-struc ```xml - + - - - - - - - - - @@ -93,12 +84,14 @@ The `application-ext.properties` file is used to override default configuration ``` # Database Configuration - Oracle -spring.datasource.url=jdbc:oracle:thin:@//[host]:[port]/[servicename] -spring.datasource.username=powerauth -spring.datasource.password=powerauth +spring.datasource.jndi-name=java:/jdbc/powerauth # Application Service Configuration powerauth.service.applicationEnvironment=TEST ``` +Mind that you should specify `spring.datasource.jndi-name` to use the application server datasource (its declaration is out of the scope of this guideline). +When configure `spring.datasource.url`, the hikari connection pool is used. +Spring Boot running on WildFly or JBoos initializes [JtaTransactionManager](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/jta/JtaTransactionManager.html). + PowerAuth Server Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`. \ No newline at end of file diff --git a/powerauth-admin/src/main/resources/application.properties b/powerauth-admin/src/main/resources/application.properties index b999e5431..b2827a759 100644 --- a/powerauth-admin/src/main/resources/application.properties +++ b/powerauth-admin/src/main/resources/application.properties @@ -57,4 +57,6 @@ management.tracing.sampling.probability=1.0 #management.endpoint.prometheus.enabled=true #management.prometheus.metrics.export.enabled=true -spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration +spring.autoconfigure.exclude=\ + org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration,\ + org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration diff --git a/powerauth-admin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/powerauth-admin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index 4513547c0..349b515d4 100644 --- a/powerauth-admin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/powerauth-admin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,5 +1,5 @@ - + diff --git a/powerauth-java-server/pom.xml b/powerauth-java-server/pom.xml index 9855c04e6..9bd125bdf 100644 --- a/powerauth-java-server/pom.xml +++ b/powerauth-java-server/pom.xml @@ -235,19 +235,6 @@ - - org.apache.maven.plugins - maven-war-plugin - - - - src/main/webapp/WEB-INF - WEB-INF - true - - - - diff --git a/powerauth-java-server/src/main/resources/application.properties b/powerauth-java-server/src/main/resources/application.properties index 7808da73b..5bf2f2b7d 100644 --- a/powerauth-java-server/src/main/resources/application.properties +++ b/powerauth-java-server/src/main/resources/application.properties @@ -128,4 +128,7 @@ management.tracing.sampling.probability=1.0 #management.endpoint.metrics.enabled=true #management.endpoints.web.exposure.include=health, prometheus #management.endpoint.prometheus.enabled=true -#management.prometheus.metrics.export.enabled=true \ No newline at end of file +#management.prometheus.metrics.export.enabled=true + +spring.autoconfigure.exclude=\ + org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration diff --git a/powerauth-java-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/powerauth-java-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index 257fdc663..94e7545a9 100644 --- a/powerauth-java-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/powerauth-java-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,20 +1,10 @@ - - + - - - - - - - - -