Spring Batch JpaTransactionManager will affect Spring Data JPA?

1.1k Views Asked by At

If I override and use JpaTransactionManager with Spring Batch will it affect Spring Data JPA? What is the difference between Spring Batch Transaction Manager vs Spring Data JPA? Is there any connection between them? And If I use the following transaction manager bean will it affect Spring Data JPA repositories and CRUD operations in any way I mean a bad way?

@Autowired
private DataSource dts;

@Bean
@Primary
@Override
public PlatformTransactionManager getTransactionManager() {
    JpaTransactionManager jpa = new JpaTransactionManager();
    jpa.setDataSource(dts);
    return jpa;
}
0

There are 0 best solutions below