是否可以使用 postgres 在JPA PROPAGATION_NESTED
中使用@Transactional()
?我得到了:
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;
}
但没有成功。