• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

join fetch 까지 했는데 잘 안됩니다

20.08.31 17:43 작성 조회수 110

1

안녕하세요 선생님,

강의를 듣고 있는 중에 join fetch 가 안되서 여쭤봅니다

아래는 join fetch 가 실행되어야 할 부분인데 skip 하고 실행이 안되는 console  내용입니다.

2020-08-31 17:07:26.918  INFO 7360 --- [  restartedMain] p6spy                                    : #1598861246918 | took 0ms | statement | connection 12| url jdbc:mysql://localhost:3306/springboottest?serverTimezone=UTC&characterEncoding=UTF-8

update item set name=?, price=?, stock_quantity=?, author=?, isbn=? where item_id=?

update item set name='SPRING2 BOOK', price=40000, stock_quantity=296, author=NULL, isbn=NULL where item_id=10;

2020-08-31 17:07:26.918  INFO 7360 --- [  restartedMain] p6spy                                    : #1598861246918 | took 0ms | commit | connection 12| url jdbc:mysql://localhost:3306/springboottest?serverTimezone=UTC&characterEncoding=UTF-8

;

2020-08-31 17:07:27.114  INFO 7360 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'

2020-08-31 17:07:27.145  WARN 7360 --- [  restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

2020-08-31 17:07:27.344  INFO 7360 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''

설명하셨던 코드들 다 작성 잘 했는데 왜 join fetch 가 실행이 안되는지 모르겠습니다 

아래 제가 작성했던 코드를 깃허브로 첨부해드립니다

https://github.com/Kim8114/jpashops

선생님의 도움이 절실합니다 ㅠㅠㅠ

답변 2

·

답변을 작성해보세요.

1

양준호님의 프로필

양준호

질문자

2020.09.01

앗 해결됬습니다 감사합니다!

0

안녕하세요. 준호님^^!

도움을 드리고 싶은데, 정확히 어떤 API를 어떻게 실행했는데, 안되는지 알려주시겠어요?

그리고 올려주신 로그를 보면 스프링 부트가 단순히 뜨기만 한 것이고 아직 URL 호출을 안하신 것 같아요. 해당 API를 호출하고, 그 결과 로그도 함께 남겨주세요^^!