How to set autocommit to false in spring jdbc template

前端 未结 7 1740
天命终不由人
天命终不由人 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:15

    In some case you could just add @Transactional in the method, e.g. After some batch insert, execute commit at last.

提交回复
热议问题