Spring application doesn't appear to be persisting data

后端 未结 6 2046
甜味超标
甜味超标 2021-01-20 13:07

I\'m trying to write something into my database but it\'s not working despite it reporting \"Successfully completed request\". After the success everything seems to work fin

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-20 13:58

    When using annotation-driven transactions, you should put @Transactional annotation before your methods which are working with database. It could be either your DAO or Service methods. I can see that you have put @Transactional on top of PaymentServiceImpl but that is not the right place for that annotation.

提交回复
热议问题