I am using @Transactional with spring boot and jpa. But it is not working. Can somebody help out.
My inserts are in myDAO which is autowired in service class. Below code is method of service class which is implementing service interface
class MyService implements Service {
@Transactional(rollbackFor = RuntimeException.class)
public ResponseVO createOrder(params) {
myDAO.insertInTable1(param);
myDAO.insertInTable2(param);//I kept wrong table name in this query such that it throws exception
}
}