강의

멘토링

로드맵

Inflearn brand logo image

인프런 커뮤니티 질문&답변

박규봉 Park님의 프로필 이미지
박규봉 Park

작성한 질문수

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

엔티티 클래스 개발2

JpashopApplication 실행 후에 테이블 작성이 되지 않음

작성

·

337

0

안녕하십니까 선생님. 선생님 강의를 열심히 듣고 있는 사람입니다.

해당 강의의 JpashopApplication을 실행해도 영한 선생님의 강의 영상에서처럼 테이블을 작성하는 로그를 볼 수 없었습니다. 프로젝트를 새로 생성하고 몇번이고 똑같이 따라해봤는데 결과가 동일했습니다.

gradle 설정과 application.yml은 강의자료와 동일하게 복사 붙여넣기 했습니다.

os는 windows10이고 java11 환경입니다

아래는 로그 입니다.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.5.RELEASE)

2020-12-14 17:12:54.111  INFO 3588 --- [           main] jpabook.jpashop.JpashopApplication       : Starting JpashopApplication on DESKTOP-FM0CSRD with PID 3588 (C:\Users\bong\Desktop\maven\jpashop\out\production\classes started by Tmax in C:\Users\bong\Desktop\maven\jpashop)
2020-12-14 17:12:54.113  INFO 3588 --- [           main] jpabook.jpashop.JpashopApplication       : No active profile set, falling back to default profiles: default
2020-12-14 17:12:54.524  INFO 3588 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2020-12-14 17:12:54.540  INFO 3588 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 11ms. Found 0 JPA repository interfaces.
2020-12-14 17:12:54.835  INFO 3588 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2020-12-14 17:12:54.841  INFO 3588 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-12-14 17:12:54.841  INFO 3588 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.39]
2020-12-14 17:12:54.927  INFO 3588 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-12-14 17:12:54.927  INFO 3588 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 782 ms
2020-12-14 17:12:55.003  INFO 3588 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-12-14 17:12:55.027  INFO 3588 --- [         task-1] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-12-14 17:12:55.060  INFO 3588 --- [         task-1] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.22.Final
2020-12-14 17:12:55.064  WARN 3588 --- [           main] JpaBaseConfiguration$JpaWebConfiguration : 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-12-14 17:12:55.148  INFO 3588 --- [         task-1] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-12-14 17:12:55.217  WARN 3588 --- [           main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
2020-12-14 17:12:55.219  INFO 3588 --- [         task-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2020-12-14 17:12:55.250  INFO 3588 --- [         task-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2020-12-14 17:12:55.264  INFO 3588 --- [         task-1] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2020-12-14 17:12:55.292  INFO 3588 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2020-12-14 17:12:55.293  INFO 3588 --- [           main] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories…
2020-12-14 17:12:55.293  INFO 3588 --- [           main] DeferredRepositoryInitializationListener : Spring Data repositories initialized!
2020-12-14 17:12:55.301  INFO 3588 --- [           main] jpabook.jpashop.JpashopApplication       : Started JpashopApplication in 1.465 seconds (JVM running for 2.025)

답변 1

1

김영한님의 프로필 이미지
김영한
지식공유자

안녕하세요. 규봉님

스프링 부트가 최근에 업데이트 되면서, 좀 이슈가 있습니다.

JPA 관련 매핑이나 설정이 잘 안된 것인데요.

다음 코드를 넣고 실행하면, 아마 어떤 설정이 잘 안되어서 문제인지 나올꺼에요.

application.properties를 사용하신다면

spring.data.jpa.repositories.bootstrap-mode=default

application.yml을 사용하신다면(이걸 사용하실꺼에요)

spring:

  data:

    jpa:

      repositories:

        bootstrap-mode: default

감사합니다.

박규봉 Park님의 프로필 이미지
박규봉 Park

작성한 질문수

질문하기