diff --git a/src/main/resources/application-postgresdb.properties b/src/main/resources/application-postgresdb.properties index c08fa6f..304a054 100644 --- a/src/main/resources/application-postgresdb.properties +++ b/src/main/resources/application-postgresdb.properties @@ -9,8 +9,21 @@ spring.datasource.url=jdbc:tc:pgvector/pgvector:pg16:///ecommerce spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect spring.jpa.hibernate.ddl-auto=none spring.sql.init.data-locations=classpath:postgresdb-schema-with-data.sql + +# Turn on statistics +spring.jpa.properties.hibernate.generate_statistics=true +logging.level.org.hibernate.stat=debug + +# Show all queries +spring.jpa.show-sql=true spring.jpa.properties.hibernate.show_sql=true +# Don't enable formatting on PROD +spring.jpa.properties.hibernate.format_sql=true + +#Show parameters of SQL logging.level.org.hibernate.orm.jdbc.bind=trace +logging.level.org.hibernate.type=debug + ## Disable liquibase as it contains MySQL schema files spring.liquibase.enabled=false \ No newline at end of file diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index 96077e9..198bb7d 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -9,8 +9,21 @@ spring.datasource.url=jdbc:tc:mysql:latest:///ecommerce spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect spring.jpa.hibernate.ddl-auto=none spring.sql.init.data-locations=classpath:test-dataset.sql + + +# Turn on statistics +spring.jpa.properties.hibernate.generate_statistics=true +logging.level.org.hibernate.stat=debug + +# Show all queries +spring.jpa.show-sql=true spring.jpa.properties.hibernate.show_sql=true +# Don't enable formatting on PROD +spring.jpa.properties.hibernate.format_sql=true + +#Show parameters of SQL logging.level.org.hibernate.orm.jdbc.bind=trace +logging.level.org.hibernate.type=debug spring.datasource.hikari.connectionTimeout=30000 spring.datasource.hikari.maxLifetime=1800000