如何禁用自动提交 Spring Boot? [英] How to disable autocommit Spring Boot?
本文介绍了如何禁用自动提交 Spring Boot?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试禁用自动提交,但我不走运.我使用的是 Spring Boot 版本 2.1.3.RELEASE
I'm trying to disable autocommit, but I'm not lucky. I'm using the Spring Boot version 2.1.3.RELEASE
application.properties
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
推荐答案
使用
spring.datasource.auto-commit=false
此属性(以及更多属性)未记录.
This property (and some more too) were not documented.
有关更多未记录的属性,请参阅下面的 github 问题.
Please refer below github issue for more undocumented properties.
https://github.com/spring-projects/spring-boot/问题/1829
这篇关于如何禁用自动提交 Spring Boot?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文