Commit on jdbcTemplate or DataSource
问题 I wanted to do commit and rollback using jdbcTemplate. My question is based on this thread How do I commit or rollback, should I do it on jdbcTemplate like jdbcTemplate.commit(); jdbcTemplate.rollback(); Or there are some other ways to achieve commit and rollback functionality using jdbcTemplate. 回答1: To call commit or rollback at will set the transactional boundaries programmatically and not declaratively. For that reason you have to get hold of the PlatformTransactionManager - inject it