From a personal development perspective, Spring Data JPA is better because it is faster to develop.

But from the perspective of the team, we want better maintainability, and Spring Data JPA is less, or it has higher requirements for later-stage people.

It’s easy to do this:

Monitoring system found a slow query, operation and maintenance to the SQL development group, we check.

At this point, it is very likely that no one will respond, saying that there is no SQL.

Then o&M locates a library, finds the user of the library and asks him to look at it.

He may also take SQL global search, found or search.

If the person does not have a strong sense of responsibility, he or she may say that he or she did not find the SQL. If the person is responsible and familiar with Spring Data JPA, he or she should start to analyze where the SQL may be and then find the corresponding implementation place to modify it.

This is a real scenario where The Spring Data JPA is prone to high maintenance costs when the team is at war.

P.S. WHEN I was developing my own indie product, I liked to use it because I was too familiar with it to have this scenario. So choose decisively, but if the team fight, I will choose MyBatis.

So what do you think? See you in the comments section!

Welcome to pay attention to my public account: Program monkey DD, get the exclusive arrangement of learning resources, daily dry goods and welfare gifts.