是否可以使用PROPAGATION_NESTED postgres在@Transactional()中使用JPA?我得到了:
org.springframework.transaction.NestedTransactionNotSupportedException:
JpaDialect does not support savepoints - check your JPA provider's capabilities我试过:
@Bean
public PlatformTransactionManager transactionManager() {
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(entityManagerFactory()
.getObject());
transactionManager.setNestedTransactionAllowed(true);
return transactionManager;
}但没有成功。
发布于 2017-08-21 08:51:48
我假设您正在使用Hibernate。Hibernate不可能实现嵌套事务。

在下面的代码摘录中,spring设置savePointManager。但是在Hibernate中没有实现SavepointManager的类。
发布于 2021-03-23 06:41:19
savepointAllowed是真的,它意味着事务管理器允许嵌套事务。但是JpaDialect不支持保存点。
https://stackoverflow.com/questions/37927208
复制相似问题