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

소니소니님의 프로필 이미지
소니소니

작성한 질문수

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

JPA와 DB 설정, 동작확인

기본키 매핑

작성

·

223

1

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.

1. 강의 내용과 관련된 질문을 남겨주세요.
2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.
(자주 하는 질문 링크: https://bit.ly/3fX6ygx)
3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.
(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)

질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.
=========================================
[질문 템플릿]
1. 강의 내용과 관련된 질문인가요? (예/아니오)
2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)
3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)

[질문 내용]
영한님께서는 @GeneratedValue의 속성값을 auto로 설정해서 h2 데이터베이스에 맞는 기본키전략, 즉 시퀀스 전략을 사용했습니다. 하지만 저는 Identity 전략으로 사용이 되는데 무슨 이유일까요? auto로 해도 Identity 전략, @GeneratedValue의 속성값을 시퀀스로 설정해도 Identity전략으로 됩니다.

 

답변 2

1

소니소니님의 프로필 이미지
소니소니
질문자

이런식으로 실행된 로그를 보면 sequence가 나오는데 실제 h2.db에는 그대로 identity 전략이 사용되네요 ㅠㅠ

 

 

 

image15:40:10.597 [main] DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class jpabook.jpashop.MemberRepositoryTest]

15:40:10.607 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]

15:40:10.621 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]

15:40:10.688 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [jpabook.jpashop.MemberRepositoryTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]

15:40:10.717 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [jpabook.jpashop.MemberRepositoryTest], using SpringBootContextLoader

15:40:10.725 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [jpabook.jpashop.MemberRepositoryTest]: class path resource [jpabook/jpashop/MemberRepositoryTest-context.xml] does not exist

15:40:10.726 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [jpabook.jpashop.MemberRepositoryTest]: class path resource [jpabook/jpashop/MemberRepositoryTestContext.groovy] does not exist

15:40:10.726 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [jpabook.jpashop.MemberRepositoryTest]: no resource found for suffixes {-context.xml, Context.groovy}.

15:40:10.727 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [jpabook.jpashop.MemberRepositoryTest]: MemberRepositoryTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.

15:40:10.824 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [jpabook.jpashop.MemberRepositoryTest]

15:40:10.948 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [C:\Users\hal8h\OneDrive\바탕 화면\새 폴더\jpashop\out\production\classes\jpabook\jpashop\JpashopApplication.class]

15:40:10.952 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration jpabook.jpashop.JpashopApplication for test class jpabook.jpashop.MemberRepositoryTest

15:40:11.193 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [jpabook.jpashop.MemberRepositoryTest]: using defaults.

15:40:11.195 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.event.ApplicationEventsTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener]

15:40:11.241 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@7c214cc0, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@5b67bb7e, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@609db546, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@20f5281c, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@56c4278e, org.springframework.test.context.support.DirtiesContextTestExecutionListener@301eda63, org.springframework.test.context.transaction.TransactionalTestExecutionListener@3d246ea3, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@341814d3, org.springframework.test.context.event.EventPublishingTestExecutionListener@4397ad89, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@59cba5a, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@1bd39d3c, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@6f19ac19, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@119cbf96, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@71329995, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@768fc0f2]

15:40:11.245 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.248 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.250 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.251 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.251 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.251 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.265 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.265 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.267 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.268 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.269 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.269 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.279 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@338c99c8 testClass = MemberRepositoryTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@21ba0741 testClass = MemberRepositoryTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@76ed1b7c, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@71c3b41, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@5f16132a, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@87a85e1, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@152aa092, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@368f2016], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true]], class annotated with @DirtiesContext [false] with mode [null].

15:40:11.286 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.MemberRepositoryTest]

15:40:11.286 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.MemberRepositoryTest]

. ____ _

/\\ / ___'_ __ (_)_ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/ ___)| |_)| | | | | || (_| | ) ) ) )

' |____| .__|_| |_|_| |_\__, | / / / /

=========|_|==============|___/=/_/_/_/

:: Spring Boot :: (v2.6.12)

2022-10-10 15:40:12.007 INFO 11752 --- [ main] jpabook.jpashop.MemberRepositoryTest : Starting MemberRepositoryTest using Java 11.0.15 on DESKTOP-71386SR with PID 11752 (started by hal8h in C:\Users\hal8h\OneDrive\바탕 화면\새 폴더\jpashop)

2022-10-10 15:40:12.008 INFO 11752 --- [ main] jpabook.jpashop.MemberRepositoryTest : No active profile set, falling back to 1 default profile: "default"

2022-10-10 15:40:12.985 INFO 11752 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.

2022-10-10 15:40:13.004 INFO 11752 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 9 ms. Found 0 JPA repository interfaces.

2022-10-10 15:40:13.965 INFO 11752 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]

2022-10-10 15:40:14.051 INFO 11752 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.11.Final

2022-10-10 15:40:14.325 INFO 11752 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}

2022-10-10 15:40:14.964 INFO 11752 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...

2022-10-10 15:40:15.061 INFO 11752 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.

2022-10-10 15:40:15.123 INFO 11752 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

2022-10-10 15:40:16.021 DEBUG 11752 --- [ main] org.hibernate.SQL :

drop table if exists member CASCADE

2022-10-10 15:40:16.028 INFO 11752 --- [ main] p6spy : #1665384016028 | took 2ms | statement | connection 1| url jdbc:h2:tcp://localhost/~/jpashop

drop table if exists member CASCADE

drop table if exists member CASCADE ;

2022-10-10 15:40:16.028 DEBUG 11752 --- [ main] org.hibernate.SQL :

drop sequence if exists hibernate_sequence

2022-10-10 15:40:16.029 INFO 11752 --- [ main] p6spy : #1665384016029 | took 1ms | statement | connection 1| url jdbc:h2:tcp://localhost/~/jpashop

drop sequence if exists hibernate_sequence

drop sequence if exists hibernate_sequence;

2022-10-10 15:40:16.032 DEBUG 11752 --- [ main] org.hibernate.SQL : create sequence hibernate_sequence start with 1 increment by 1

2022-10-10 15:40:16.034 INFO 11752 --- [ main] p6spy : #1665384016034 | took 0ms | statement | connection 2| url jdbc:h2:tcp://localhost/~/jpashop

create sequence hibernate_sequence start with 1 increment by 1

create sequence hibernate_sequence start with 1 increment by 1;

2022-10-10 15:40:16.034 DEBUG 11752 --- [ main] org.hibernate.SQL :

create table member (

id bigint not null,

username varchar(255),

primary key (id)

)

2022-10-10 15:40:16.035 INFO 11752 --- [ main] p6spy : #1665384016035 | took 0ms | statement | connection 2| url jdbc:h2:tcp://localhost/~/jpashop

create table member (

id bigint not null,

username varchar(255),

primary key (id)

)

create table member (

id bigint not null,

username varchar(255),

primary key (id)

);

2022-10-10 15:40:16.037 INFO 11752 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]

2022-10-10 15:40:16.050 INFO 11752 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'

2022-10-10 15:40:16.542 WARN 11752 --- [ 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

2022-10-10 15:40:17.060 INFO 11752 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]

2022-10-10 15:40:17.624 INFO 11752 --- [ main] jpabook.jpashop.MemberRepositoryTest : Started MemberRepositoryTest in 6.253 seconds (JVM running for 7.742)

2022-10-10 15:40:17.783 INFO 11752 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@338c99c8 testClass = MemberRepositoryTest, testInstance = jpabook.jpashop.MemberRepositoryTest@68f264bf, testMethod = testMember@MemberRepositoryTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@21ba0741 testClass = MemberRepositoryTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@76ed1b7c, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@71c3b41, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@5f16132a, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@87a85e1, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@152aa092, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@368f2016], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]]; transaction manager [org.springframework.orm.jpa.JpaTransactionManager@16890f00]; rollback [false]

2022-10-10 15:40:18.006 DEBUG 11752 --- [ main] org.hibernate.SQL :

call next value for hibernate_sequence

2022-10-10 15:40:18.026 INFO 11752 --- [ main] p6spy : #1665384018026 | took 11ms | statement | connection 3| url jdbc:h2:tcp://localhost/~/jpashop

call next value for hibernate_sequence

call next value for hibernate_sequence;

findMember == member: true

2022-10-10 15:40:18.327 DEBUG 11752 --- [ main] org.hibernate.SQL :

insert

into

member

(username, id)

values

(?, ?)

2022-10-10 15:40:18.338 INFO 11752 --- [ main] p6spy : #1665384018338 | took 1ms | statement | connection 3| url jdbc:h2:tcp://localhost/~/jpashop

insert into member (username, id) values (?, ?)

insert into member (username, id) values ('memberd', 1);

2022-10-10 15:40:18.350 INFO 11752 --- [ main] p6spy : #1665384018350 | took 1ms | commit | connection 3| url jdbc:h2:tcp://localhost/~/jpashop

;

2022-10-10 15:40:18.353 INFO 11752 --- [ main] o.s.t.c.transaction.TransactionContext : Committed transaction for test: [DefaultTestContext@338c99c8 testClass = MemberRepositoryTest, testInstance = jpabook.jpashop.MemberRepositoryTest@68f264bf, testMethod = testMember@MemberRepositoryTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@21ba0741 testClass = MemberRepositoryTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@76ed1b7c, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@71c3b41, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@5f16132a, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@87a85e1, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@152aa092, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@368f2016], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]]

2022-10-10 15:40:18.375 INFO 11752 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'

2022-10-10 15:40:18.379 INFO 11752 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...

2022-10-10 15:40:18.400 INFO 11752 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.

Process finished with exit code 0

왜 IDENTITY 전략이 실행된다고 생각하시는건지 알 수 있을까요?

제 생각에는 SEQUENCE가 제대로 동작한다고 생각이 되어서요

소니소니님의 프로필 이미지
소니소니
질문자

앗 죄송합니다. 시퀀스가 나왔는데 제가 못봤네요ㅠㅠ. 조교님 말씀대로 삭제하고 다시 생성하니까 잘 됩니다. 감사합니다!!

수강중 궁금한 사항은 언제든 질문 남겨주세요 :)

1

안녕하세요. hal8hal9님, 공식 서포터즈 OMG입니다.
.

Member 엔티티를 현재 코드로 둔 채,

jpashop DB를 완전히 지우고(jpashop.mv.db를 삭제해주세요),

application.yml에서 ddl-auto를 create로 한 후

다시 생성해서 확인해보시겠어요?


.
감사합니다.

jpashop.mv.db파일 위치는

윈도우: C/USERS/계정명/

을 참고해주세요

소니소니님의 프로필 이미지
소니소니

작성한 질문수

질문하기