소개
게시글
질문&답변
2019.11.30
shell 을 사용할 때 질문 있습니다.
아 /bin/sh 에 있는것만 가능하군요. /usr/local/bin/ 에 등록된 외부 cli 명령어도 되는 줄 알았습니다. shell 을 사용하고 있었습니다.
- 0
- 3
- 158
질문&답변
2019.11.05
QuerydslJpaRepository가 depreacted 됬는데요
안녕하세요. 답변 감사드립니다. 예제에 있던 MyRepository 를 @NoRepositoryBean public interface MyRepository T , ID extends Serializable> extends JpaRepository T , ID > , QuerydslPredicateExecutor T > { boolean contains ( T entity) ; } 위와 같이 바꿨습니다. 그리고 이를 사용하는 SimpleMyRepository 에서 public class SimpleMyRepository T , ID extends Serializable> extends SimpleJpaRepository T , ID > implements MyRepository T , ID > { private EntityManager entityManager ; public SimpleMyRepository (JpaEntityInformation T , ?> entityInformation , EntityManager entityManager , EntityManager entityManager1) { super (entityInformation , entityManager) ; this . entityManager = entityManager1 ; } @Override public boolean contains ( T entity) { return entityManager .contains(entity) ; } } 위와 같이 바꾸려는데 JpaRepository는 구현체인 SimpleJpaRepository 가 있는 반면, QuerydslPredicateExecutor 은 구현체가 없어서 (사진) 위 함수들을 재정의 해줘야 하는것으로 보입니다. 구현체인 QuerydslJpaPredicateExecutor 를 SimpleMyRepository 에서 상속해야 할 것 같은데 하나만 상속이 되니 어떻게 해야 할지 잘 모르겠습니다.
- 0
- 3
- 315