How to set autocommit to false in spring jdbc template

前端 未结 7 1867
天命终不由人
天命终不由人 2020-12-08 21:01

Currently I\'m setting autocommit to false in spring through adding a property to a datasource bean id like below :

   

        
7条回答
  •  渐次进展
    2020-12-08 21:21

    I'm posting this because I was looking for it everywhere: I used configuration property in Spring boot to achieve setting the default autocommit mode with:

    spring.datasource.hikari.auto-commit: false
    

    Spring Boot 2.4.x Doc for Hikari

提交回复
热议问题