how to use spring boot mybatis xml configuration operating on table record?

I have a role,permission and role-permission ,these three tables . how to save and update,delete these three tables record in a best way ,using spring boot mybatis xml configuration. Any help and instruction will be very helpful! thank you!

I just change to using sprig boot mybatis xml from JPA interface, unfamiliar with xml configuration.

how could I save a record to role table and using the roleId to save a record to role-permission table in one transaction?