Since the additions and deletions to the data will change, so we have to carry out the transaction;
A. To increase the operating
layer mapper xml file code:
Test Method Test class code:
Must pay attention to, MyBatis transaction commit is off by default, we want to commit the transaction using sessin target commit method is called;
II. Update
layer mapper xml file code:
Test Method Test class codes: