|
server.contextPath=/ |
|
debug=true |
|
|
|
# Spring data source needed for Spring boot to behave |
|
# Pre Spring Boot v2.0.0.M6 without below Spring Boot defaults to tomcat-jdbc connection pool included |
|
# in spring-boot-starter-jdbc and as compiled dependency under spring-boot-starter-data-jpa |
|
spring.datasource.type=com.zaxxer.hikari.HikariDataSource |
|
spring.datasource.url=jdbc:postgresql://localhost:5432/somedb |
|
spring.datasource.username=dbuser |
|
spring.datasource.password=dbpassword |
|
|
|
# Hikari will use the above plus the following to setup connection pooling |
|
spring.datasource.hikari.minimumIdle=5 |
|
spring.datasource.hikari.maximumPoolSize=20 |
|
spring.datasource.hikari.idleTimeout=30000 |
|
spring.datasource.hikari.poolName=SpringBootJPAHikariCP |
|
spring.datasource.hikari.maxLifetime=2000000 |
|
spring.datasource.hikari.connectionTimeout=30000 |
|
|
|
# Without below HikariCP uses deprecated com.zaxxer.hikari.hibernate.HikariConnectionProvider |
|
# Surprisingly enough below ConnectionProvider is in hibernate-hikaricp dependency and not hibernate-core |
|
# So you need to pull that dependency but, make sure to exclude it's transitive dependencies or you will end up |
|
# with different versions of hibernate-core |
|
spring.jpa.hibernate.connection.provider_class=org.hibernate.hikaricp.internal.HikariCPConnectionProvider |
|
|
|
# JPA specific configs |
|
spring.jpa.properties.hibernate.show_sql=true |
|
spring.jpa.properties.hibernate.format_sql=true |
|
spring.jpa.properties.hibernate.use_sql=true |
|
spring.jpa.properties.hibernate.id.new_generator_mappings=false |
|
spring.jpa.properties.hibernate.default_schema=littracker |
|
spring.jpa.properties.hibernate.search.autoregister_listeners=false |
|
spring.jpa.properties.hibernate.bytecode.use_reflection_optimizer=false |
|
|
|
# Enable logging |
|
logging.level.org.hibernate.SQL=DEBUG |
|
# Enable logging for HikariCP to verify that it is used |
|
logging.level.com.zaxxer.hikari.HikariConfig=DEBUG |
|
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE |
I cant figure out how to set the defaultRowFetchSize in the application.properties. Can you help with that? Thanks!
https://jdbc.postgresql.org/documentation/head/connect.html
defaultRowFetchSize = int
Determine the number of rows fetched in ResultSet by one fetch with trip to the database. Limiting the number of rows are fetch with each trip to the database allow avoids unnecessary memory consumption and as a consequence OutOfMemoryException.
The default is zero, meaning that in ResultSet will be fetch all rows at once. Negative number is not available.