I use @Transaction on method like this
@Transactional
public void savePerson(Person person){
...
}
then throw exception
org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException:
I use
@Transactional(readonly=true)
for other method that only fetch data like
public Person findPerson(Long personId){...}
What is wrong?
Aucun commentaire:
Enregistrer un commentaire