Andre Soares
Andre Soares

Reputation: 79

How to disable autocommit Spring Boot?

I'm trying to disable autocommit, but I'm not lucky. I'm using the Spring Boot version 2.1.3.RELEASE

application.properties

spring.jpa.database=oracle
spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect
spring.jpa.generate-ddl=false
spring.jpa.open-in-view=true
spring.jpa.show-sql=false
spring.datasource.hikari.auto-commit=false

Upvotes: 7

Views: 30133

Answers (2)

Eric Colinet
Eric Colinet

Reputation: 11

With Spring Boot 3, the connection pool has been changed to HikariCP and the parameter is now : spring.datasource.hikari.auto-commit=false

Upvotes: -1

Sundararaj Govindasamy
Sundararaj Govindasamy

Reputation: 8495

Use

spring.datasource.auto-commit=false

This property (and some more too) were not documented.

Please refer below github issue for more undocumented properties.

https://github.com/spring-projects/spring-boot/issues/1829

Upvotes: 10

Related Questions