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

스터디스프링님의 프로필 이미지
스터디스프링

작성한 질문수

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

JPA와 DB 설정, 동작확인

DB에 테이블이 생성되지 않습니다

작성

·

575

0

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

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

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

[질문 내용]
여기에 질문 내용을 남겨주세요.
Test자바 파일 실행시,
"C:\Program Files\Java\jdk-20\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.1\lib\idea_rt.jar=57983:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.1\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.1\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.1\plugins\junit\lib\junit5-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.1\plugins\junit\lib\junit-rt.jar;C:\Users\Me\Desktop\김씨꺼\jpashop\out\test\classes;C:\Users\Me\Desktop\김씨꺼\jpashop\out\production\classes;C:\Users\Me\Desktop\김씨꺼\jpashop\out\production\resources;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-data-jpa\3.1.1\f129ea070d7d7152c984189301dc751be45f9a38\spring-boot-starter-data-jpa-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-thymeleaf\3.1.1\69e351b19ee4fa37ff7cb851354498a880b5a937\spring-boot-starter-thymeleaf-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web\3.1.1\f2c2d9e35430e4b4a98ad91780bb9b2d1deec08\spring-boot-starter-web-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-devtools\3.1.1\fca82661c18f1ca18614d308523c0d404d3753b9\spring-boot-devtools-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\junit\junit\4.13.1\cdd00374f1fee76b11e2a9d127405aa3f6be5b6a\junit-4.13.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-test\3.1.1\6e69181686ec1c9af137f038ddf6cd1830a2af19\spring-boot-starter-test-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-aop\3.1.1\f72362878ded668b8c3a12f8465ced98ef3fb188\spring-boot-starter-aop-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-jdbc\3.1.1\8e6bdc511fc9ade17c09fcc20a0f6a44fa39a876\spring-boot-starter-jdbc-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.hibernate.orm\hibernate-core\6.2.5.Final\3c0d24dd2f66920aeeee666779ca7391f20bc69c\hibernate-core-6.2.5.Final.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\3.1.1\815665072b1cfa83aa3175228539e3e468db15e0\spring-data-jpa-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aspects\6.0.10\4a6a423ce6fdc474a327f7b7a7818dedc33c504f\spring-aspects-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter\3.1.1\cf74eeaef5a265c75dd89fea829391bf08efdb6c\spring-boot-starter-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.thymeleaf\thymeleaf-spring6\3.1.1.RELEASE\deb52ef921a4ac5132fedb7ebfc2bc1dad4382b3\thymeleaf-spring6-3.1.1.RELEASE.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-json\3.1.1\8dc99860536a6a858de6caaeb67f84d7af8a30a3\spring-boot-starter-json-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat\3.1.1\927f80fb9d8816209420223d1a1a09e730ea78e6\spring-boot-starter-tomcat-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc\6.0.10\af3f040747f4bfbcdb96140f8c9d252d3a6a4ef1\spring-webmvc-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\6.0.10\e61defa7908bf7a499f000dab8ef7691c2aa75c1\spring-web-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure\3.1.1\618ec717eef4ba2ff347c7713150aac8e73fe233\spring-boot-autoconfigure-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\3.1.1\f8f80c1453c8fe0e08a6235f983d8daf571d3e3\spring-boot-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest-core\2.2\3f2bd07716a31c395e2837254f37f21f0f0ab24b\hamcrest-core-2.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-test-autoconfigure\3.1.1\4d6b05666438577e2fa7a1cbad6f58956bee34d7\spring-boot-test-autoconfigure-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-test\3.1.1\8481164eedc07955e903cb4442dc23a868eecb8d\spring-boot-test-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.jayway.jsonpath\json-path\2.8.0\b4ab3b7a9e425655a0ca65487bbbd6d7ddb75160\json-path-2.8.0.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\jakarta.xml.bind\jakarta.xml.bind-api\4.0.0\bbb399208d288b15ec101fa4fcfc4bd77cedc97a\jakarta.xml.bind-api-4.0.0.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\net.minidev\json-smart\2.4.11\cc5888f14a5768f254b97bafe8b9fd29b31e872e\json-smart-2.4.11.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.assertj\assertj-core\3.24.2\ebbf338e33f893139459ce5df023115971c2786f\assertj-core-3.24.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest\2.2\1820c0968dba3a11a1b30669bb1f01978a91dedc\hamcrest-2.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter\5.9.3\72e840501e1550e9799c9a5cc9483d7d6b29e0ba\junit-jupiter-5.9.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.mockito\mockito-junit-jupiter\5.3.1\d6ac0f6d54addf02def4ba1213f73a15ae6c2308\mockito-junit-jupiter-5.3.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.mockito\mockito-core\5.3.1\7cac313592a29ae5e29c52c22b15c3ae5ab561b2\mockito-core-5.3.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.skyscreamer\jsonassert\1.5.1\6d842d0faf4cf6725c509a5e5347d319ee0431c3\jsonassert-1.5.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-test\6.0.10\8773ebcd0e6822e2e5a816752cbe2419d7b1b4b4\spring-test-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\6.0.10\889aa214b6607763ddeb6bd391d682cd71681b36\spring-core-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.xmlunit\xmlunit-core\2.9.1\e5833662d9a1279a37da3ef6f62a1da29fcd68c4\xmlunit-core-2.9.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\6.0.10\cc309a306fa759018b107dea9a208c758af0297\spring-aop-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.19\afbffb1210239fbba5cad73093c5b216d515838f\aspectjweaver-1.9.19.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\6.0.10\5179c98c5eba511cdd31852d1f74063aa17bf3da\spring-jdbc-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP\5.0.1\a74c7f0a37046846e88d54f7cb6ea6d565c65f9c\HikariCP-5.0.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\jakarta.persistence\jakarta.persistence-api\3.1.0\66901fa1c373c6aff65c13791cc11da72060a8d6\jakarta.persistence-api-3.1.0.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\2.0.1\51a520e3fae406abb84e2e1148e6746ce3f80a1a\jakarta.transaction-api-2.0.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\6.0.10\e2bd59f05c95647a274b7719d419cf8fde6f25a0\spring-context-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\6.0.10\321d8f382fad673d8b4d4047b4370176561c5a60\spring-orm-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\3.1.1\cfc10ccc41910b7b6e83cf27debaac73229572e0\spring-data-commons-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\6.0.10\459698d22aadc881afe425934cca79cc1f6bce91\spring-tx-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\6.0.10\8fc0684773cc1598edd810660f57d9e9c8ae6055\spring-beans-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-runtime\4.10.1\10839f875928f59c622d675091d51a43ea0dc5f7\antlr4-runtime-4.10.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\2.1.1\48b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.7\41eb7184ea9d556f23e18b5cb99cad1f8581fc00\slf4j-api-2.0.7.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging\3.1.1\53bb456e4bf8f751de5a6ce154707b052946fd43\spring-boot-starter-logging-3.1.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.33\2cd0a87ff7df953f810c344bdf2fe3340b954c69\snakeyaml-1.33.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.thymeleaf\thymeleaf\3.1.1.RELEASE\374a129dfa5e7d7f1a46eacc4d49e594ca0cf26f\thymeleaf-3.1.1.RELEASE.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\2.15.2\30d16ec2aef6d8094c5e2dce1d95034ca8b6cb42\jackson-datatype-jsr310-2.15.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-parameter-names\2.15.2\75f8d2788db20f6c587c7a19e94fb6248c314241\jackson-module-parameter-names-2.15.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\2.15.2\66a50e089cfd2f93896b9b6f7a734cea7bcf2f31\jackson-datatype-jdk8-2.15.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.15.2\9353b021f10c307c00328f52090de2bdb4b6ff9c\jackson-databind-2.15.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket\10.1.10\10604119402bcaa8490b638698ad177f8df4c50c\tomcat-embed-websocket-10.1.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\10.1.10\7423236b34aa78d6f36592b2aa294d7c8469f219\tomcat-embed-core-10.1.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\10.1.10\717033c0417fdc7e794b382c066b7e78f6029268\tomcat-embed-el-10.1.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\6.0.10\bd8c93e473e713fe9150a772487507a8e600d5f1\spring-expression-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation\1.11.1\9027a35892c7e08ea8affce87b3662b6ceca122c\micrometer-observation-1.11.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\jakarta.activation\jakarta.activation-api\2.1.2\640c0d5aff45dbff1e1a1bc09673ff3a02b1ba12\jakarta.activation-api-2.1.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\net.minidev\accessors-smart\2.4.11\245ceca7bdf3190fbb977045c852d5f3c8efece1\accessors-smart-2.4.11.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.14.5\28a424c0c4f362568e904d992c239c996cf7adc7\byte-buddy-1.14.5.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter-params\5.9.3\9e2a4bf6016a1975f408a73523392875cff7c26f\junit-jupiter-params-5.9.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter-api\5.9.3\815818ad6ffcc8d320d8fbdf3d748c753cf83201\junit-jupiter-api-5.9.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy-agent\1.14.5\20f4e9b9d0ffb953657bfa4b92c0cceb27907d58\byte-buddy-agent-1.14.5.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.vaadin.external.google\android-json\0.0.20131108.vaadin1\fa26d351fe62a6a17f5cda1287c1c6110dec413f\android-json-0.0.20131108.vaadin1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\6.0.10\cba44e98dab40a506c50978a0e5f11ceaa90b3ff\spring-jcl-6.0.10.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.4.8\f00ba91d993e4d14301b11968d3cacc3be7ef3e1\logback-classic-1.4.8.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.20.0\d37f81f8978e2672bc32c82712ab4b3f66624adc\log4j-to-slf4j-2.20.0.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.slf4j\jul-to-slf4j\2.0.7\a48f44aeaa8a5ddc347007298a28173ac1fbbd8b\jul-to-slf4j-2.0.7.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.attoparser\attoparser\2.0.6.RELEASE\8f603f22a18d4f7258f8860ccbb68b069f49904a\attoparser-2.0.6.RELEASE.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.unbescape\unbescape\1.1.6.RELEASE\7b90360afb2b860e09e8347112800d12c12b2a13\unbescape-1.1.6.RELEASE.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.15.2\4724a65ac8e8d156a24898d50fd5dbd3642870b8\jackson-annotations-2.15.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.15.2\a6fe1836469a69b3ff66037c324d75fc66ef137c\jackson-core-2.15.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons\1.11.1\45bc0f2aa4d6180f1a783f1930f307a4efbb12e8\micrometer-commons-1.11.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\9.3\8e6300ef51c1d801a7ed62d07cd221aca3a90640\asm-9.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.apiguardian\apiguardian-api\1.1.2\a231e0d844d2721b0fa1b238006d15c6ded6842a\apiguardian-api-1.1.2.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.junit.platform\junit-platform-commons\1.9.3\36b2e26a90c41603be7f0094bee80e3f8a2cd4d4\junit-platform-commons-1.9.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.opentest4j\opentest4j\1.2.0\28c11eb91f9b6d8e200631d46e20a7f407f2a046\opentest4j-1.2.0.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.4.8\3fba9c105e0efc5ffdcda701379687917d5286f7\logback-core-1.4.8.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.20.0\1fe6082e660daf07c689a89c94dc0f49c26b44bb\log4j-api-2.20.0.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.h2database\h2\2.1.214\d5c2005c9e3279201e12d4776c948578b16bf8b2\h2-2.1.214.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\4.0.3\93af25be25b2c92c83e0ce61cb8b3ed23568f316\jaxb-runtime-4.0.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.5.1.Final\a5c340a92c6efeaa0d495047ee9aab38a86bb107\jboss-logging-3.5.1.Final.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\6.0.6.Final\77a5f94b56d49508e0ee334751db5b78e5ccd50c\hibernate-commons-annotations-6.0.6.Final.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\io.smallrye\jandex\3.0.5\c548a4871b552292dbdd65409d3fda145c8925c1\jandex-3.0.5.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.5.1\3fe0bed568c62df5e89f4f174c101eab25345b6c\classmate-1.5.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\jakarta.inject\jakarta.inject-api\2.0.1\4c28afe1991a941d7702fe1362c365f0a8641d1e\jakarta.inject-api-2.0.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter-engine\5.9.3\355322b03bf39306a183162cd06626c206f0286b\junit-jupiter-engine-5.9.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.objenesis\objenesis\3.3\1049c09f1de4331e8193e579448d0916d75b7631\objenesis-3.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-core\4.0.3\e9093b4a82069a1d78ee9a3233ca387bca88861f\jaxb-core-4.0.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.junit.platform\junit-platform-engine\1.9.3\8616734a190f8d307376aeb7353dba0a2c037a09\junit-platform-engine-1.9.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.eclipse.angus\angus-activation\2.0.1\eaafaf4eb71b400e4136fc3a286f50e34a68ecb7\angus-activation-2.0.1.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\4.0.3\47b8fe31c6d1a3382203af919400527389e01e9c\txw2-4.0.3.jar;C:\Users\Me\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\4.1.2\18ec117c85f3ba0ac65409136afa8e42bc74e739\istack-commons-runtime-4.1.2.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 jpabook.jpashop.MemberRepositoryTest

23:14:14.131 [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.

23:14:14.250 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration jpabook.jpashop.JpashopApplication for test class jpabook.jpashop.MemberRepositoryTest

처럼 뜨고 DB에 MEMBER 테이블이 생성되지 않습니다. 무엇이 문제일까요

답변 1

0

 

안녕하세요. 스터디스프링님, 공식 서포터즈 OMG입니다.

강의에서 제공해드리는 yml과 올리신 yml파일을 비교했을 때

driver-class-name의 띄어쓰기,

jpa: 부분부터 2칸씩 띄어쓰기가 보이네요 ^^ datasource: 와 jpa: 는 동일한 위치에 있어야합니다 :)

image

강의에서 제공해드리는 yml파일(아래)을 사용해서 확인해보시겠어요?

 

spring: #띄어쓰기 없음
  datasource: #띄어쓰기 2칸
    url: jdbc:h2:tcp://localhost/~/jpashop #4칸
    username: sa
    password:
    driver-class-name: org.h2.Driver

  jpa: #띄어쓰기 2칸
    hibernate: #띄어쓰기 4칸
      ddl-auto: create #띄어쓰기 6칸
    properties: #띄어쓰기 4칸
      hibernate: #띄어쓰기 6칸
        # show_sql: true #띄어쓰기 8칸
        format_sql: true #띄어쓰기 8칸
logging.level: #띄어쓰기 없음
  org.hibernate.SQL: debug #띄어쓰기 2칸
  org.hibernate.type: trace #띄어쓰기 2칸

감사합니다.

수정했음에도 불구하고 MEMBER테이블에 생성되지 않습니다.
image이것은 MemberReposirotyTest.java를 실행한 결과창입니다. 영상에서 보듯, create 구문이 보이지 않습니다.
image

image

image

image

image

강의에서와 같이 @Rollback(false)를 추가해서 확인해보시겠어요? 롤백이 되지 않도록 설정을 하고 확인을 해봐야 알 것 같습니다 :)

스터디스프링님의 프로필 이미지
스터디스프링

작성한 질문수

질문하기