为所有的repositories添加自定义行为

    1. extends SimpleJpaRepository<T, ID> implements MyRepository<T, ID> {
    2. private final EntityManager entityManager;
    3. EntityManager entityManager) {
    4. super(entityInformation, entityManager);
    5. // Keep the EntityManager around to used from the newly introduced methods.
    6. public void sharedCustomMethod(ID id) {
    7. // implementation goes here
    8. }