You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/03/08 12:48:08 UTC
(causeway-app-simpleapp) 01/03: updates datasource-proxy, bumps to jdk 21
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-3692
in repository https://gitbox.apache.org/repos/asf/causeway-app-simpleapp.git
commit ba80265bb423d81a71fa681b9391a0402092f546
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Feb 22 14:37:23 2024 +0000
updates datasource-proxy, bumps to jdk 21
---
pom.xml | 17 +++++++++++-
webapp/pom.xml | 13 +++++----
webapp/src/main/resources/application.yml | 1 -
.../main/resources/config/application.properties | 31 +++++++++++++++++-----
4 files changed, 49 insertions(+), 13 deletions(-)
diff --git a/pom.xml b/pom.xml
index 72de249..350add2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,11 @@
<packaging>pom</packaging>
<properties>
- <java.version>11</java.version>
+ <java.version>21</java.version>
+
+ <datasource-proxy-spring-boot-starter.version>1.8.1</datasource-proxy-spring-boot-starter.version>
+ <sql-formatter.version>2.0.4</sql-formatter.version>
+
</properties>
<dependencyManagement>
@@ -51,6 +55,17 @@
<type>test-jar</type>
</dependency>
+ <dependency>
+ <groupId>com.github.gavlyukovskiy</groupId>
+ <artifactId>datasource-proxy-spring-boot-starter</artifactId>
+ <version>${datasource-proxy-spring-boot-starter.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.vertical-blank</groupId>
+ <artifactId>sql-formatter</artifactId>
+ <version>${sql-formatter.version}</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 9e67d66..7a674af 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -219,14 +219,17 @@
</dependency>
<dependency>
- <groupId>com.github.gavlyukovskiy</groupId>
- <artifactId>p6spy-spring-boot-starter</artifactId>
- <version>1.8.0</version>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-instrument</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-instrument</artifactId>
+ <groupId>com.github.gavlyukovskiy</groupId>
+ <artifactId>datasource-proxy-spring-boot-starter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.github.vertical-blank</groupId>
+ <artifactId>sql-formatter</artifactId>
</dependency>
</dependencies>
diff --git a/webapp/src/main/resources/application.yml b/webapp/src/main/resources/application.yml
index d775be6..1e6cbbb 100644
--- a/webapp/src/main/resources/application.yml
+++ b/webapp/src/main/resources/application.yml
@@ -8,7 +8,6 @@ causeway:
applib:
annotation:
action:
- explicit: true
command-publishing: all
execution-publishing: all
action-layout:
diff --git a/webapp/src/main/resources/config/application.properties b/webapp/src/main/resources/config/application.properties
index eb02764..814b357 100644
--- a/webapp/src/main/resources/config/application.properties
+++ b/webapp/src/main/resources/config/application.properties
@@ -36,14 +36,33 @@ eclipselink.jpa.upper-case-column-names=false
#causeway.testing.fixtures.initial-script = domainapp.webapp.application.fixture.scenarios.DomainAppDemo
-# Register P6LogFactory to log JDBC events
-decorator.datasource.p6spy.enable-logging=true
-# Use com.p6spy.engine.spy.appender.MultiLineFormat instead of com.p6spy.engine.spy.appender.SingleLineFormat
-decorator.datasource.p6spy.multiline=true
-# Use logging for default listeners [slf4j, sysout, file, custom]
-decorator.datasource.p6spy.logging=sysout
+# One of logging libraries (slf4j, jul, common, sysout)
+decorator.datasource.datasource-proxy.logging=slf4j
+
+decorator.datasource.datasource-proxy.query.enable-logging=true
+decorator.datasource.datasource-proxy.query.log-level=debug
+# Logger name to log all queries, default depends on chosen logging, e.g. net.ttddyy.dsproxy.listener.logging.SLF4JQueryLoggingListener
+decorator.datasource.datasource-proxy.query.logger-name=
+
+decorator.datasource.datasource-proxy.slow-query.enable-logging=true
+decorator.datasource.datasource-proxy.slow-query.log-level=warn
+decorator.datasource.datasource-proxy.slow-query.logger-name=
+# Number of seconds to consider query as slow and log it
+decorator.datasource.datasource-proxy.slow-query.threshold=300
+
+decorator.datasource.datasource-proxy.multiline=true
+
+# Formats the SQL for better readability. Uses Hibernate's formatter if present on the class path. If you opted in for a different JPA provider you need to add https://github.com/vertical-blank/sql-formatter as a runtime dependency to your app to enable this.
+# Mutually exclusive with json-format=true
+decorator.datasource.datasource-proxy.format-sql=false
+decorator.datasource.datasource-proxy.json-format=false
+
+# Enable Query Metrics
+decorator.datasource.datasource-proxy.count-query=false
+
+
#logging.level.org.springframework=DEBUG