묻고 답해요
141만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
@ResponseBody를 붙여주는 이유가 궁금합니다.
@ResponseStatus(HttpStatus.OK) @ResponseBody @GetMapping("/response-body-json-v2") public HelloData responseBodyJsonV2() { HelloData helloData = new HelloData(); helloData.setUsername("userA"); helloData.setAge(20); return helloData; } 위에 코드에서는 객체를 리턴하는데 기본값, String이 아니라 뷰 리졸버가 작동하지 않을거 같습니다. 그런데 @ResponseBody를 붙여주는 이유가 궁금합니다.
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
@RequestBody의 동작과정이 궁금합니다..!
@RequestBody의 동작과정이 궁금합니다..!HttpEntity를 통해 요청을 받아와서 거기서 .getBody()를 통해 갖고오는게 맞을까요?내부과정을 직접 확인하고 싶은데.. 어떻게 확인해야할지도 알려주시면 감사하겠습니다
-
해결됨토비의 스프링 부트 - 이해와 원리
테스트에서의 @Transactional 사용에 대해 질문이 있습니다.
안녕하세요 토비 선생님!강의 너무 재밌게 잘 듣고 있습니다. 이제 몇개 남지 않아서 많이 아쉽네요. 다름이 아니라 테스트 코드 작성시 `@Transactional` 어노테이션의 사용에 대해 질문이 있습니다. 저는 롤백테스트 작성을 위해 @Transactional 을 애용해왔는데요,,얼마전 업무를 보다가 이상하게 테스트 코드는 잘만 통과를 하는데 같은 코드가 서버에 띄웠을때는 의도대로 동작을 안하더라고요. 한참을 씨름하다 알고보니 엔티티를 변경하고 JPA 변경감지로 변경하도록 의도한 코드인데 트랜잭션 경계 밖에서 변경을 하고 있었더라고요.이후로는 찾아보니 테스트 코드에서 @Transactional을 사용하지 말라는 이야기가 많아 안쓰려고 노력을 해보는데 테스트 후 전부 롤백시키는게 만만치가 않더라고요. @AfterEach로 리포지터리를 다 불러와서 하나씩 돌려놓는것도 일이고..개인적으로는 @Transactional 대신에 단순히 전체 테스트에 대해 DB 롤백을 해주는 어노테이션이 별개로 있었으면 더 좋지 않았을까 하는 아쉬움도 있더라고요.스프링에서 굳이 서로 다른 용도의 기능을 하나의 어노테이션으로 공유하는 이유가 있을까요? 트랜잭션 경계라는 점에서는 공통점이 있다지만 각각의 기능으로 분리되었어도 되지 않았을까요?AfterEach 넣어서 리포지터리 하나하나 불러와 일일히 초기화 해 주는 대신 @Transactional 만큼 코드가 깔끔해지면서 테스트코드에 @Transactional을 쓰면 생기게 되는 문제를 해결하는 방법이 있을까요? 혹은 사실 알고보면 테스트에 @Transactional을 쓰는게 좋은건데 제가 잘못 오해하고 있었을까요? 요즘 테스트 코드를 작성할때마다 고민이 많았는데 제가 한동안 검색한 결과로는 쉽게 결론을 내기가 힘들었습니다.더 나은 코드작성에 꼭 도움이 필요해서 실례를 무릅쓰고 질문글을 올려봅니다.감사합니다.
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
offset 과 limit 값을 서버쪽으로 보내는 방식
안녕하세요강의에서는 페이징에 필요한 offset과 limit 값을 @RequestParam을 통해서 넘겨주는 것을 보았습니다. 그런데, 저는 현재 @RequestBody OrderSearchDto를 파라미터로 받아와 내부 필드인 멤버명이나 주문 상태를 검색조건으로 활용하고 있었습니다.이런 경우에는 그냥 @RequestParam을 사용하지 않고, DTO에 offset과 limit 필드를 추가해서 검색과 페이징에 필요한 데이터를 OrderSearchDto 안에 한번에 받는것은 어떤지 궁금합니다.보통 실무에서는 페이징에 필요한 값은 @RequestParam으로 받는 편인가요? 아니면 저의 발상처럼 OrderSearchDto 같은 DTO를 통해 @RequestBody로 받기도 하나요? 일반적인 관점에서 best practice가 따로 있는지 궁금합니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
testdb 궁금증.
저는 testdb 라고 안뜨고url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|이렇게 나오는데, 같은 맥락인가요? --전체 콘솔--/Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=54927:/Applications/IntelliJ IDEA CE.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA CE.app/Contents/plugins/junit/lib/junit5-rt.jar:/Applications/IntelliJ IDEA CE.app/Contents/plugins/junit/lib/junit-rt.jar:/Users/hyoozo/Documents/study/jpashop/out/test/classes:/Users/hyoozo/Documents/study/jpashop/out/test/resources:/Users/hyoozo/Documents/study/jpashop/out/production/classes:/Users/hyoozo/Documents/study/jpashop/out/production/resources:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-data-jpa/3.0.2/fc0dbe82effb33d3d89b4cf2ec6b7968ad2af558/spring-boot-starter-data-jpa-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-thymeleaf/3.0.2/e79481a7c3984941b9f9c73271867e4fcb4c0cc5/spring-boot-starter-thymeleaf-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/3.0.2/3f6a2cb4cb11bac3611f5a95e234589eb190dd29/spring-boot-starter-web-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-devtools/3.0.2/8e74cf503d8f8b66960ecf3780446c5750866aa6/spring-boot-devtools-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.github.gavlyukovskiy/p6spy-spring-boot-starter/1.5.6/495579c7fb01b005f19ec4d5188245c66de0937b/p6spy-spring-boot-starter-1.5.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.22/9c08ea24c6eb714e2d6170e8122c069a0ba9aacf/lombok-1.18.22.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.testng/testng/7.1.0/b0bcea778fb2899aeb4014c558babea8833d180a/testng-7.1.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-test/3.0.2/167ec01ebb1d4d5f955aa25e027fe25336116925/spring-boot-starter-test-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.vintage/junit-vintage-engine/5.9.2/53421816bde124a564a64ba005dcc0c8e66a9722/junit-vintage-engine-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-aop/3.0.2/cfb3ff6a7f8d47c9703f140387f39a837b81ab52/spring-boot-starter-aop-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-jdbc/3.0.2/662285456edce14301de88fc0ab4937643a51b50/spring-boot-starter-jdbc-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.hibernate.orm/hibernate-core/6.1.6.Final/e2ff7dfc50d16377da7bedbf48a0a2e9db30ac66/hibernate-core-6.1.6.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-jpa/3.0.1/96f4ea7c780b6c902f83f4fd3c98dffe3ac5fbec/spring-data-jpa-3.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aspects/6.0.4/5baf7a2260278ca9748be9dd8278d6519ff2da00/spring-aspects-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/3.0.2/a9426629b5a83ad64fbe4e1d24081cccf4cdab14/spring-boot-starter-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.thymeleaf/thymeleaf-spring6/3.1.1.RELEASE/deb52ef921a4ac5132fedb7ebfc2bc1dad4382b3/thymeleaf-spring6-3.1.1.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/3.0.2/11b9a2903af9014696d2576605bb73e8bca6ee19/spring-boot-starter-json-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/3.0.2/4d50f0cdcb4b8f74221ae823dd77c18290473045/spring-boot-starter-tomcat-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/6.0.4/84ee8a9107480c92186ef8216ba0e1dca6ee1665/spring-webmvc-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/6.0.4/de18e3e75a0e56534d9df5978bd2f43f950e1b4a/spring-web-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/3.0.2/42ad589ec930e05a2ed702a4940955ff97b16a8c/spring-boot-autoconfigure-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/3.0.2/69d2e0a07f7df180a4aacdc47c47a3db656857dc/spring-boot-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.github.gavlyukovskiy/datasource-decorator-spring-boot-autoconfigure/1.5.6/cac386fe9df77870133594f054ee32e5d08ab93d/datasource-decorator-spring-boot-autoconfigure-1.5.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/p6spy/p6spy/3.8.2/52299d9a1ec2bc2fb8b1a21cc12dfc1a7c033caf/p6spy-3.8.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.72/6375e521c1e11d6563d4f25a07ce124ccf8cd171/jcommander-1.72.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.google.inject/guice/4.1.0/faf9ee8ac09eafd1128091426dd367a8c0085d55/guice-4.1.0-no_aop.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.33/2cd0a87ff7df953f810c344bdf2fe3340b954c69/snakeyaml-1.33.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter/5.9.2/26c586fbe0ebd81b48c9f11f0d998124248697ae/junit-jupiter-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test-autoconfigure/3.0.2/54b535d617cd5dce97b520f6224ef10a76b4a32a/spring-boot-test-autoconfigure-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test/3.0.2/b014e6596a04ce4aa374ca3cd6361489afab8680/spring-boot-test-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.jayway.jsonpath/json-path/2.7.0/f9d7d9659f2694e61142046ff8a216c047f263e8/json-path-2.7.0.jar:/Users/hyoozo/.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:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.assertj/assertj-core/3.23.1/d2bb60570f5b3d7ffa8f8000118c9c07b86eca93/assertj-core-3.23.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest/2.2/1820c0968dba3a11a1b30669bb1f01978a91dedc/hamcrest-2.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-junit-jupiter/4.8.1/e393aa62eca2244a535b03842843f2f199343d1f/mockito-junit-jupiter-4.8.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/4.8.1/d8eb9dec8747d08645347bb8c69088ac83197975/mockito-core-4.8.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.skyscreamer/jsonassert/1.5.1/6d842d0faf4cf6725c509a5e5347d319ee0431c3/jsonassert-1.5.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-test/6.0.4/e8a07171dc49379f7091fdafd62d71c0ca5333a0/spring-test-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/6.0.4/8e24ad493887023cf5fac93541c72516f8ed9f6a/spring-core-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.xmlunit/xmlunit-core/2.9.1/e5833662d9a1279a37da3ef6f62a1da29fcd68c4/xmlunit-core-2.9.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.9.2/40aeef2be7b04f96bb91e8b054affc28b7c7c935/junit-platform-engine-1.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/junit/junit/4.13.2/8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12/junit-4.13.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.1.2/a231e0d844d2721b0fa1b238006d15c6ded6842a/apiguardian-api-1.1.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/6.0.4/c47b65c09a5a6fc41293b6aa981fcbe24a3adcd0/spring-aop-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.aspectj/aspectjweaver/1.9.19/afbffb1210239fbba5cad73093c5b216d515838f/aspectjweaver-1.9.19.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jdbc/6.0.4/97304a02dec542762c19a7b39e1124f1714f7be9/spring-jdbc-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.zaxxer/HikariCP/5.0.1/a74c7f0a37046846e88d54f7cb6ea6d565c65f9c/HikariCP-5.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.persistence/jakarta.persistence-api/3.1.0/66901fa1c373c6aff65c13791cc11da72060a8d6/jakarta.persistence-api-3.1.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.transaction/jakarta.transaction-api/2.0.1/51a520e3fae406abb84e2e1148e6746ce3f80a1a/jakarta.transaction-api-2.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/6.0.4/4fffcbb7eb4f1e9f1a4c9d3ca60098f7c063fc05/spring-context-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-orm/6.0.4/c9958d0879bdc05f7221c0b49d90a1b8825da540/spring-orm-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/3.0.1/a748e9d73fe23bec3a8604c68da74446a887d59/spring-data-commons-3.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/6.0.4/f8a50c2547179328a5f2202591d6341e3cbf1708/spring-tx-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/6.0.4/7d903607ecfcdefccd0d48aea8724632479b3e83/spring-beans-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.annotation/jakarta.annotation-api/2.1.1/48b9bda22b091b1f48b13af03fe36db3be6e1ae3/jakarta.annotation-api-2.1.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/2.0.6/88c40d8b4f33326f19a7d3c0aaf2c7e8721d4953/slf4j-api-2.0.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/3.0.2/1c5c71058a0297534d5c5f33a5d125bbbdb6a390/spring-boot-starter-logging-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.thymeleaf/thymeleaf/3.1.1.RELEASE/374a129dfa5e7d7f1a46eacc4d49e594ca0cf26f/thymeleaf-3.1.1.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.1/f24e8cb1437e05149b7a3049ebd6700f42e664b1/jackson-datatype-jsr310-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-parameter-names/2.14.1/2e05a86dba3d4b05074b6a313c4d5b7ff844c8dd/jackson-module-parameter-names-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.14.1/da194197d187bf24a8699514344ebf0abd7c342a/jackson-datatype-jdk8-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.14.1/268524b9056cae1211b9f1f52560ef19347f4d17/jackson-databind-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.5/14529cbd593571dc9029272ddc9166b5ef113fc2/tomcat-embed-websocket-10.1.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/10.1.5/21417d3ef8189e2af05aae0a765ad9204d7211b5/tomcat-embed-core-10.1.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/10.1.5/c125df13af42a0fc0cd342370449b1276181e2a1/tomcat-embed-el-10.1.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/6.0.4/a908e6d3c46fcd6b58221d8427bbaf284bbbee0c/spring-expression-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-observation/1.10.3/32cc59dc8b5f00fba9fa88b7139898b0f7905db7/micrometer-observation-1.10.3.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/aopalliance/aopalliance/1.0/235ba8b489512805ac13a8f9ea77a1ca5ebe3e8/aopalliance-1.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/19.0/6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9/guava-19.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-params/5.9.2/bc2765afb7b85b583c710dd259a11c6b8c39e912/junit-jupiter-params-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.9.2/fed843581520eac594bc36bb4b0f55e7b947dda9/junit-jupiter-api-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.minidev/json-smart/2.4.8/7c62f5f72ab05eb54d40e2abf0360a2fe9ea477f/json-smart-2.4.8.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.activation/jakarta.activation-api/2.1.1/88c774ab863a21fb2fc4219af95379fafe499a31/jakarta.activation-api-2.1.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.12.22/984e536b4f3fb668b21f15b90c1e8704292d4bdd/byte-buddy-1.12.22.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.12.22/9c4127080df12304336ca90c2ef3f8b7d72915c1/byte-buddy-agent-1.12.22.jar:/Users/hyoozo/.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:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/6.0.4/2d6523d00fc40cdb2c2f409113447940d2c872b5/spring-jcl-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.9.2/6f9f8621d8230cd38aa42e58ccbc0c00569131ce/junit-platform-commons-1.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.2.0/28c11eb91f9b6d8e200631d46e20a7f407f2a046/opentest4j-1.2.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.4.5/28e7dc0b208d6c3f15beefd73976e064b4ecfa9b/logback-classic-1.4.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.19.0/30f4812e43172ecca5041da2cb6b965cc4777c19/log4j-to-slf4j-2.19.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/2.0.6/c4d348977a83a0bfcf42fd6fd1fee6e7904f1a0c/jul-to-slf4j-2.0.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.attoparser/attoparser/2.0.6.RELEASE/8f603f22a18d4f7258f8860ccbb68b069f49904a/attoparser-2.0.6.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.unbescape/unbescape/1.1.6.RELEASE/7b90360afb2b860e09e8347112800d12c12b2a13/unbescape-1.1.6.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.14.1/2a6ad504d591a7903ffdec76b5b7252819a2d162/jackson-annotations-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.14.1/7a07bc535ccf0b7f6929c4d0f2ab9b294ef7c4a3/jackson-core-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-commons/1.10.3/334080a1a6b849d09d3ef96d7b243fc3c16b2e5a/micrometer-commons-1.10.3.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.minidev/accessors-smart/2.4.8/6e1bee5a530caba91893604d6ab41d0edcecca9a/accessors-smart-2.4.8.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.4.5/e9bb2ea70f84401314da4300343b0a246c8954da/logback-core-1.4.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.19.0/ea1b37f38c327596b216542bc636cfdc0b8036fa/log4j-api-2.19.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.1/a99500cf6eea30535eeac6be73899d048f8d12a8/asm-9.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.h2database/h2/2.1.214/d5c2005c9e3279201e12d4776c948578b16bf8b2/h2-2.1.214.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/4.0.1/7abfa1ee788a8f090dc598c45876ef068731e72b/jaxb-runtime-4.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.5.0.Final/c19307cc11f28f5e2679347e633a3294d865334d/jboss-logging-3.5.0.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/6.0.2.Final/fa5a14ef3d2e5c3c99b53a4bef756a3268d69187/hibernate-commons-annotations-6.0.2.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.jboss/jandex/2.4.2.Final/1e1c385990b258ff1a24c801e84aebbacf70eb39/jandex-2.4.2.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.5.1/3fe0bed568c62df5e89f4f174c101eab25345b6c/classmate-1.5.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.inject/jakarta.inject-api/2.0.0/46fc8560b6fd17b78396d88f39c1a730457671f0/jakarta.inject-api-2.0.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.antlr/antlr4-runtime/4.10.1/10839f875928f59c622d675091d51a43ea0dc5f7/antlr4-runtime-4.10.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-engine/5.9.2/572f7a553b53f83ee59cc045ce1c3772864ab76c/junit-jupiter-engine-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/3.2/7fadf57620c8b8abdf7519533e5527367cb51f09/objenesis-3.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-core/4.0.1/b4707bb31dfcf54ae424b930741f0cd62d672af9/jaxb-core-4.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.eclipse.angus/angus-activation/1.0.0/f0ceddd49f92109fbfad9125e958f5bfd3f2aa1/angus-activation-1.0.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/txw2/4.0.1/797720dfe2e15504f6014fb82eb873051a653c75/txw2-4.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.sun.istack/istack-commons-runtime/4.1.1/9b3769c76235bc283b060da4fae2318c6d53f07e/istack-commons-runtime-4.1.1.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 jpabook.jpashop.service.MemberServiceTest01:50:34.324 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [MemberServiceTest]: using SpringBootContextLoader01:50:34.335 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [jpabook.jpashop.service.MemberServiceTest]: no resource found for suffixes {-context.xml, Context.groovy}.01:50:34.343 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [jpabook.jpashop.service.MemberServiceTest]: MemberServiceTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.01:50:34.451 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using ContextCustomizers for test class [MemberServiceTest]: [DisableObservabilityContextCustomizer, PropertyMappingContextCustomizer, Customizer, ExcludeFilterContextCustomizer, DuplicateJsonObjectContextCustomizer, MockitoContextCustomizer, TestRestTemplateContextCustomizer]01:50:35.064 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [/Users/hyoozo/Documents/study/jpashop/out/production/classes/jpabook/jpashop/JpashopApplication.class]01:50:35.067 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration jpabook.jpashop.JpashopApplication for test class jpabook.jpashop.service.MemberServiceTest01:50:35.509 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners for test class [MemberServiceTest]: [ServletTestExecutionListener, DirtiesContextBeforeModesTestExecutionListener, ApplicationEventsTestExecutionListener, MockitoTestExecutionListener, DependencyInjectionTestExecutionListener, DirtiesContextTestExecutionListener, TransactionalTestExecutionListener, SqlScriptsTestExecutionListener, EventPublishingTestExecutionListener, RestDocsTestExecutionListener, MockRestServiceServerResetTestExecutionListener, MockMvcPrintOnlyOnFailureTestExecutionListener, WebDriverTestExecutionListener, MockWebServiceServerTestExecutionListener, ResetMocksTestExecutionListener]01:50:35.516 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest]01:50:35.522 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest]01:50:35.529 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest]01:50:35.530 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest]01:50:35.530 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest]01:50:35.530 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest]01:50:35.555 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest]01:50:35.558 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest]01:50:35.560 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest]01:50:35.561 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest]01:50:35.562 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest]01:50:35.562 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest]01:50:35.571 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: class [MemberServiceTest], class annotated with @DirtiesContext [false] with mode [null]01:50:35.573 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest]01:50:35.574 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] . ____ _ /\\ / ___'_ __ (_)_ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.0.2)2023-02-21T01:50:37.029+09:00 INFO 19303 --- [ main] j.jpashop.service.MemberServiceTest : Starting MemberServiceTest using Java 17.0.5 with PID 19303 (started by hyoozo in /Users/hyoozo/Documents/study/jpashop)2023-02-21T01:50:37.037+09:00 INFO 19303 --- [ main] j.jpashop.service.MemberServiceTest : No active profile set, falling back to 1 default profile: "default"2023-02-21T01:50:38.911+09:00 INFO 19303 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.2023-02-21T01:50:39.024+09:00 INFO 19303 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 44 ms. Found 0 JPA repository interfaces.2023-02-21T01:50:40.264+09:00 INFO 19303 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...2023-02-21T01:50:40.752+09:00 INFO 19303 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37 user=SA2023-02-21T01:50:40.754+09:00 INFO 19303 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.2023-02-21T01:50:40.845+09:00 INFO 19303 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]2023-02-21T01:50:40.970+09:00 INFO 19303 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.6.Final2023-02-21T01:50:41.440+09:00 WARN 19303 --- [ main] org.hibernate.orm.deprecation : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead2023-02-21T01:50:41.773+09:00 INFO 19303 --- [ main] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect2023-02-21T01:50:42.396+09:00 INFO 19303 --- [ main] p6spy : 1676911842396|16|statement|connection 2|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select from INFORMATION_SCHEMA.SEQUENCES|select from INFORMATION_SCHEMA.SEQUENCES2023-02-21T01:50:43.895+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists category cascade 2023-02-21T01:50:43.897+09:00 INFO 19303 --- [ main] p6spy : 1676911843897|1|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category cascade |drop table if exists category cascade 2023-02-21T01:50:43.898+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists category_item cascade 2023-02-21T01:50:43.899+09:00 INFO 19303 --- [ main] p6spy : 1676911843899|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category_item cascade |drop table if exists category_item cascade 2023-02-21T01:50:43.899+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists delivery cascade 2023-02-21T01:50:43.899+09:00 INFO 19303 --- [ main] p6spy : 1676911843899|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists delivery cascade |drop table if exists delivery cascade 2023-02-21T01:50:43.900+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists item cascade 2023-02-21T01:50:43.901+09:00 INFO 19303 --- [ main] p6spy : 1676911843900|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists item cascade |drop table if exists item cascade 2023-02-21T01:50:43.901+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists member cascade 2023-02-21T01:50:43.902+09:00 INFO 19303 --- [ main] p6spy : 1676911843902|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists member cascade |drop table if exists member cascade 2023-02-21T01:50:43.902+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists order_item cascade 2023-02-21T01:50:43.902+09:00 INFO 19303 --- [ main] p6spy : 1676911843902|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists order_item cascade |drop table if exists order_item cascade 2023-02-21T01:50:43.903+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists orders cascade 2023-02-21T01:50:43.903+09:00 INFO 19303 --- [ main] p6spy : 1676911843903|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists orders cascade |drop table if exists orders cascade 2023-02-21T01:50:43.904+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists category_seq2023-02-21T01:50:43.905+09:00 INFO 19303 --- [ main] p6spy : 1676911843905|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists category_seq|drop sequence if exists category_seq2023-02-21T01:50:43.905+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists delivery_seq2023-02-21T01:50:43.906+09:00 INFO 19303 --- [ main] p6spy : 1676911843906|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists delivery_seq|drop sequence if exists delivery_seq2023-02-21T01:50:43.907+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists item_seq2023-02-21T01:50:43.907+09:00 INFO 19303 --- [ main] p6spy : 1676911843907|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists item_seq|drop sequence if exists item_seq2023-02-21T01:50:43.908+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists member_seq2023-02-21T01:50:43.908+09:00 INFO 19303 --- [ main] p6spy : 1676911843908|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists member_seq|drop sequence if exists member_seq2023-02-21T01:50:43.909+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists order_item_seq2023-02-21T01:50:43.910+09:00 INFO 19303 --- [ main] p6spy : 1676911843910|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists order_item_seq|drop sequence if exists order_item_seq2023-02-21T01:50:43.910+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists orders_seq2023-02-21T01:50:43.911+09:00 INFO 19303 --- [ main] p6spy : 1676911843911|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists orders_seq|drop sequence if exists orders_seq2023-02-21T01:50:43.921+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence category_seq start with 1 increment by 502023-02-21T01:50:43.924+09:00 INFO 19303 --- [ main] p6spy : 1676911843923|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence category_seq start with 1 increment by 50|create sequence category_seq start with 1 increment by 502023-02-21T01:50:43.924+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence delivery_seq start with 1 increment by 502023-02-21T01:50:43.925+09:00 INFO 19303 --- [ main] p6spy : 1676911843925|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence delivery_seq start with 1 increment by 50|create sequence delivery_seq start with 1 increment by 502023-02-21T01:50:43.925+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence item_seq start with 1 increment by 502023-02-21T01:50:43.926+09:00 INFO 19303 --- [ main] p6spy : 1676911843926|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence item_seq start with 1 increment by 50|create sequence item_seq start with 1 increment by 502023-02-21T01:50:43.926+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence member_seq start with 1 increment by 502023-02-21T01:50:43.927+09:00 INFO 19303 --- [ main] p6spy : 1676911843926|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence member_seq start with 1 increment by 50|create sequence member_seq start with 1 increment by 502023-02-21T01:50:43.927+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence order_item_seq start with 1 increment by 502023-02-21T01:50:43.928+09:00 INFO 19303 --- [ main] p6spy : 1676911843928|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence order_item_seq start with 1 increment by 50|create sequence order_item_seq start with 1 increment by 502023-02-21T01:50:43.930+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence orders_seq start with 1 increment by 502023-02-21T01:50:43.933+09:00 INFO 19303 --- [ main] p6spy : 1676911843933|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence orders_seq start with 1 increment by 50|create sequence orders_seq start with 1 increment by 502023-02-21T01:50:43.937+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table category (category_id bigint not null, name varchar(255), parent_id bigint, primary key (category_id))2023-02-21T01:50:43.946+09:00 INFO 19303 --- [ main] p6spy : 1676911843946|8|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table category (category_id bigint not null, name varchar(255), parent_id bigint, primary key (category_id))|create table category (category_id bigint not null, name varchar(255), parent_id bigint, primary key (category_id))2023-02-21T01:50:43.947+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table category_item (category_id bigint not null, item_id bigint not null)2023-02-21T01:50:43.949+09:00 INFO 19303 --- [ main] p6spy : 1676911843949|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table category_item (category_id bigint not null, item_id bigint not null)|create table category_item (category_id bigint not null, item_id bigint not null)2023-02-21T01:50:43.949+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table delivery (delivery_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), status varchar(255), primary key (delivery_id))2023-02-21T01:50:43.954+09:00 INFO 19303 --- [ main] p6spy : 1676911843953|4|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table delivery (delivery_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), status varchar(255), primary key (delivery_id))|create table delivery (delivery_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), status varchar(255), primary key (delivery_id))2023-02-21T01:50:43.954+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table item (dtype varchar(31) not null, item_id bigint not null, name varchar(255), price integer not null, stock_quantity integer not null, artist varchar(255), etc varchar(255), author varchar(255), isbn varchar(255), actor varchar(255), director varchar(255), primary key (item_id))2023-02-21T01:50:43.957+09:00 INFO 19303 --- [ main] p6spy : 1676911843957|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table item (dtype varchar(31) not null, item_id bigint not null, name varchar(255), price integer not null, stock_quantity integer not null, artist varchar(255), etc varchar(255), author varchar(255), isbn varchar(255), actor varchar(255), director varchar(255), primary key (item_id))|create table item (dtype varchar(31) not null, item_id bigint not null, name varchar(255), price integer not null, stock_quantity integer not null, artist varchar(255), etc varchar(255), author varchar(255), isbn varchar(255), actor varchar(255), director varchar(255), primary key (item_id))2023-02-21T01:50:43.957+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table member (member_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), name varchar(255), primary key (member_id))2023-02-21T01:50:43.960+09:00 INFO 19303 --- [ main] p6spy : 1676911843959|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table member (member_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), name varchar(255), primary key (member_id))|create table member (member_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), name varchar(255), primary key (member_id))2023-02-21T01:50:43.960+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table order_item (order_item_id bigint not null, count integer not null, order_price integer not null, item_id bigint, order_id bigint, primary key (order_item_id))2023-02-21T01:50:43.962+09:00 INFO 19303 --- [ main] p6spy : 1676911843962|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table order_item (order_item_id bigint not null, count integer not null, order_price integer not null, item_id bigint, order_id bigint, primary key (order_item_id))|create table order_item (order_item_id bigint not null, count integer not null, order_price integer not null, item_id bigint, order_id bigint, primary key (order_item_id))2023-02-21T01:50:43.962+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table orders (order_id bigint not null, order_date timestamp(6), status varchar(255), delivery_id bigint, member_id bigint, primary key (order_id))2023-02-21T01:50:43.964+09:00 INFO 19303 --- [ main] p6spy : 1676911843964|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table orders (order_id bigint not null, order_date timestamp(6), status varchar(255), delivery_id bigint, member_id bigint, primary key (order_id))|create table orders (order_id bigint not null, order_date timestamp(6), status varchar(255), delivery_id bigint, member_id bigint, primary key (order_id))2023-02-21T01:50:43.965+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists category add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category2023-02-21T01:50:43.986+09:00 INFO 19303 --- [ main] p6spy : 1676911843986|20|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists category add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category|alter table if exists category add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category2023-02-21T01:50:43.986+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists category_item add constraint FKu8b4lwqutcdq3363gf6mlujq foreign key (item_id) references item2023-02-21T01:50:43.989+09:00 INFO 19303 --- [ main] p6spy : 1676911843989|3|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists category_item add constraint FKu8b4lwqutcdq3363gf6mlujq foreign key (item_id) references item|alter table if exists category_item add constraint FKu8b4lwqutcdq3363gf6mlujq foreign key (item_id) references item2023-02-21T01:50:43.990+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists category_item add constraint FKcq2n0opf5shyh84ex1fhukcbh foreign key (category_id) references category2023-02-21T01:50:43.992+09:00 INFO 19303 --- [ main] p6spy : 1676911843992|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists category_item add constraint FKcq2n0opf5shyh84ex1fhukcbh foreign key (category_id) references category|alter table if exists category_item add constraint FKcq2n0opf5shyh84ex1fhukcbh foreign key (category_id) references category2023-02-21T01:50:43.992+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists order_item add constraint FKija6hjjiit8dprnmvtvgdp6ru foreign key (item_id) references item2023-02-21T01:50:43.995+09:00 INFO 19303 --- [ main] p6spy : 1676911843994|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists order_item add constraint FKija6hjjiit8dprnmvtvgdp6ru foreign key (item_id) references item|alter table if exists order_item add constraint FKija6hjjiit8dprnmvtvgdp6ru foreign key (item_id) references item2023-02-21T01:50:43.995+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists order_item add constraint FKt4dc2r9nbvbujrljv3e23iibt foreign key (order_id) references orders2023-02-21T01:50:43.997+09:00 INFO 19303 --- [ main] p6spy : 1676911843997|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists order_item add constraint FKt4dc2r9nbvbujrljv3e23iibt foreign key (order_id) references orders|alter table if exists order_item add constraint FKt4dc2r9nbvbujrljv3e23iibt foreign key (order_id) references orders2023-02-21T01:50:43.998+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists orders add constraint FKtkrur7wg4d8ax0pwgo0vmy20c foreign key (delivery_id) references delivery2023-02-21T01:50:44.000+09:00 INFO 19303 --- [ main] p6spy : 1676911844000|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists orders add constraint FKtkrur7wg4d8ax0pwgo0vmy20c foreign key (delivery_id) references delivery|alter table if exists orders add constraint FKtkrur7wg4d8ax0pwgo0vmy20c foreign key (delivery_id) references delivery2023-02-21T01:50:44.000+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists orders add constraint FKpktxwhj3x9m4gth5ff6bkqgeb foreign key (member_id) references member2023-02-21T01:50:44.005+09:00 INFO 19303 --- [ main] p6spy : 1676911844005|4|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists orders add constraint FKpktxwhj3x9m4gth5ff6bkqgeb foreign key (member_id) references member|alter table if exists orders add constraint FKpktxwhj3x9m4gth5ff6bkqgeb foreign key (member_id) references member2023-02-21T01:50:44.009+09:00 INFO 19303 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]2023-02-21T01:50:44.026+09:00 INFO 19303 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'2023-02-21T01:50:44.445+09:00 WARN 19303 --- [ 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 warning2023-02-21T01:50:44.884+09:00 INFO 19303 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]2023-02-21T01:50:45.303+09:00 INFO 19303 --- [ main] j.jpashop.service.MemberServiceTest : Started MemberServiceTest in 9.615 seconds (process running for 13.008)2023-02-21T01:50:46.493+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?2023-02-21T01:50:46.504+09:00 INFO 19303 --- [ main] p6spy : 1676911846504|0|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name='kim'2023-02-21T01:50:46.529+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select next value for member_seq2023-02-21T01:50:46.539+09:00 INFO 19303 --- [ main] p6spy : 1676911846539|2|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select next value for member_seq|select next value for member_seq2023-02-21T01:50:46.611+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?)2023-02-21T01:50:46.614+09:00 INFO 19303 --- [ main] p6spy : 1676911846614|1|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?)|insert into member (city, street, zipcode, name, member_id) values (NULL, NULL, NULL, 'kim', 1)2023-02-21T01:50:46.624+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?2023-02-21T01:50:46.626+09:00 INFO 19303 --- [ main] p6spy : 1676911846625|0|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name='kim'2023-02-21T01:50:46.650+09:00 INFO 19303 --- [ main] p6spy : 1676911846649|1|rollback|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37||2023-02-21T01:50:46.673+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?2023-02-21T01:50:46.675+09:00 INFO 19303 --- [ main] p6spy : 1676911846675|0|statement|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name='kim'2023-02-21T01:50:46.676+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select next value for member_seq2023-02-21T01:50:46.676+09:00 INFO 19303 --- [ main] p6spy : 1676911846676|0|statement|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select next value for member_seq|select next value for member_seq2023-02-21T01:50:46.696+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?)2023-02-21T01:50:46.697+09:00 INFO 19303 --- [ main] p6spy : 1676911846697|0|statement|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?)|insert into member (city, street, zipcode, name, member_id) values (NULL, NULL, NULL, 'kim', 2)2023-02-21T01:50:46.699+09:00 INFO 19303 --- [ main] p6spy : 1676911846699|0|commit|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37||2023-02-21T01:50:46.726+09:00 INFO 19303 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'2023-02-21T01:50:46.729+09:00 INFO 19303 --- [ionShutdownHook] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'2023-02-21T01:50:46.730+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists category cascade 2023-02-21T01:50:46.745+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846745|13|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category cascade |drop table if exists category cascade 2023-02-21T01:50:46.745+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists category_item cascade 2023-02-21T01:50:46.752+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846752|7|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category_item cascade |drop table if exists category_item cascade 2023-02-21T01:50:46.753+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists delivery cascade 2023-02-21T01:50:46.759+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846759|5|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists delivery cascade |drop table if exists delivery cascade 2023-02-21T01:50:46.759+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists item cascade 2023-02-21T01:50:46.761+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846760|1|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists item cascade |drop table if exists item cascade 2023-02-21T01:50:46.761+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists member cascade 2023-02-21T01:50:46.764+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846764|2|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists member cascade |drop table if exists member cascade 2023-02-21T01:50:46.764+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists order_item cascade 2023-02-21T01:50:46.769+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846769|4|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists order_item cascade |drop table if exists order_item cascade 2023-02-21T01:50:46.769+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists orders cascade 2023-02-21T01:50:46.771+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846771|1|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists orders cascade |drop table if exists orders cascade 2023-02-21T01:50:46.772+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists category_seq2023-02-21T01:50:46.773+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846773|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists category_seq|drop sequence if exists category_seq2023-02-21T01:50:46.773+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists delivery_seq2023-02-21T01:50:46.774+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846774|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists delivery_seq|drop sequence if exists delivery_seq2023-02-21T01:50:46.774+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists item_seq2023-02-21T01:50:46.775+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846775|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists item_seq|drop sequence if exists item_seq2023-02-21T01:50:46.775+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists member_seq2023-02-21T01:50:46.776+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846776|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists member_seq|drop sequence if exists member_seq2023-02-21T01:50:46.776+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists order_item_seq2023-02-21T01:50:46.777+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846777|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists order_item_seq|drop sequence if exists order_item_seq2023-02-21T01:50:46.777+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists orders_seq2023-02-21T01:50:46.778+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846778|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists orders_seq|drop sequence if exists orders_seq2023-02-21T01:50:46.783+09:00 INFO 19303 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...2023-02-21T01:50:46.788+09:00 INFO 19303 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.Process finished with exit code 0
-
미해결스프링 핵심 원리 - 기본편
@Autowired 오류입니다
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]먼저, 항상 좋은 강의 감사드립니다!@Autowired에서 빨간줄이 뜨고Autowired members must be defined in valid Spring bean (@Component|@Service|...) 라는 문구가 뜨게됩니다 어떻게 해결해야 하나요?
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
서블릿 흐름 질문입니다.
전반적으로 제가 이해한 내용이 맞는지 궁금해서 질문드립니다.서블릿이라는 것이 검은색 박스안에 있는 것을 다 해주니까 우리는 초록색 박스의 비즈니스 로직에 집중해서 개발을 하고 개발된 것을 war로 빌드해서 was(톰캣)에 배포를 하고 톰캣을 구동을 합니다.그 후 클라이언트가 서버로 요청을 보내면 was 안의 서블릿 컨테이너가 request, responce 객체를 만들어서 서블릿에 넘겨주고 이 객체들을 가지고 서블릿이 비즈니스 로직을 타서 클라이언트가 요청한 리소스를 반환해준다.제가 이해한 흐름이 맞을까요?
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
http://localhost:8080/basic/hello-form.html 로 hello-form.html 정적 콘텐츠 접근 시 404 에러
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]서블릿 부분에서 webapp-basic 폴더를 만들고 basic 내에 hello-form.html을 복붙하고 해당 링크로 접근하려고 하면 404 에러가 뜹니다.. 패키지도 Application이 최상위 경로인데 왜 이러는지 모르겠습니다..webapp 내 indexl.html을 비롯한 정적 html에 접근하는 것 외에는 다른 접근은 다 잘 됩니다. 보시다시피 강의와 다르게 webapp에 파란 점도 없는데 이게 문제인 건가요?
-
해결됨스프링 핵심 원리 - 기본편
@Configutation 질문
ApplicationContext로 class를 등록하고 등록된 빈들을 조회해보니 싱글톤이 보장되는 것을 확인했습니다.근데 @Configuration을 사용하지 않고 @Bean만 사용하면 주입받는 객체들이 싱글톤을 유지하지 않게되는데@Configuration이 주입관계있는 빈들까지 싱글톤을 보장해주는 것 맞나요..?
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
10분 18초에 getTotalPrice() 함수에서 질문이 있습니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]getTotalPrice() 메서드가 OrderItem 클래스 안에 있으니까 orderPrice 변수와 count변수를 직접 건들수 있는데 왜 orderPrice*count가 아닌 getOrderPrice()* getCount()를 쓰는지 궁금합니다..
-
해결됨자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
controller 3단분리에 대해 질문이 있습니다.
강의를 보면 controller에서 작업을 마무리하고, 이후에 코드를 정리하면서 controller, service, repository로 3단 분리를 하시는데,실제로 처음부터 3단 분리를 하면서 코드를 짜려니까 머리 속에 로직이 잘 정리가 안되더라고요.처음부터 역할에 맞게 분리를 하며 코딩을 하시는지, 아니면 처음에는 머리 속의 로직을 그대로 쭉 코딩하신 후에 나중에 정리를 하시는 편이신지 궁금합니다.
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
@Controller, @RequestMapping 질문드립니다.
안녕하세요. @Controller, @RequestMapping의 로직에 대해 제가 이해한바가 맞는지 질문드립니다. 다른 분들이 올리신 질문도 다 참고해보고 구글링도 해봤는데 궁금증이 풀리지않아 비슷한 내용의 질문을 드려서 죄송합니다..@Controller, @RequestMapping을 사용해서 애플리케이션을 실행하는 과정에서,서버가 실행되면, @Controller에 의해 핸들러(컨트롤러)로 등록된다.요청이 들어오면, 핸들러 매핑이 핸들러를 찾고 핸들러 어댑터가 핸들러를 실행해야 하는데, 먼저 스프링 내부에 등록되어 있는 RequestMappingHandlerMapping이 핸들러를 조회한다. @RequestMapping을 사용했기때문에 애노테이션 기반 컨트롤러를 조회할수 있는 Requestmappinghandlermapping이 핸들러를 조회하는데, 이때 @Controller로 등록된 핸들러중에 @RequestMapping에 담긴 논리url을 통해 클라이언트가 전송한 url과 매핑을해서 해당되는 핸들러를 조회한다. 그리고 이 조회한 핸들러를 처리할수 있는 어댑터인RequestMappingHandlerAdapter가 핸들러를 호출(process()를 호출)한다. 이렇게 이해하면 될까요?
-
해결됨실무 환경 그대로 주문게시판 만들기 웹개발 기초 마스터
시퀀스 질문
시퀀스에서 Cycle을 사용하면 중복키 관리는 안하게 되는건가요?
-
미해결스프링 핵심 원리 - 기본편
생성자 주입으로 변경했을 때 Provider 생성할때 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.단위 테스트로 할 때 필드 주입이 좋지 않다고 하셔서 생성자 주입으로 변경 후 돌려봤을 때 Provider를 적용하기 전에 ObjectProvider<PrototypeBean> 으로 했을 때는 테스트가 성공했지만 Provider로 할때는 다음과 같은 에러가 나서 왜 발생했는지 질문드립니다org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'singletonWithPrototype.ClientBean': Unsatisfied dependency expressed through constructor parameter 1: No qualifying bean of type 'javax.inject.Provider<hello.core.scope.SingletonWithPrototype$PrototypeBean>' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}아래는 전체 코드 입니다.package hello.core.scope; import jakarta.annotation.PostConstruct; import jakarta.annotation.PreDestroy; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Scope; import javax.inject.Provider; import static org.assertj.core.api.Assertions.assertThat; public class SingletonWithPrototype { @Test void prototypeFind() { AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(PrototypeBean.class); PrototypeBean prototypeBean1 = ac.getBean(PrototypeBean.class); prototypeBean1.addCount(); assertThat(prototypeBean1.getCount()).isEqualTo(1); PrototypeBean prototypeBean2 = ac.getBean(PrototypeBean.class); prototypeBean2.addCount(); assertThat(prototypeBean2.getCount()).isEqualTo(1); } @Test void singletonClientUsePrototype() { AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(ClientBean.class, PrototypeBean.class); ClientBean clientBean1 = ac.getBean(ClientBean.class); int count1 = clientBean1.logic(); assertThat(count1).isEqualTo(1); ClientBean clientBean2 = ac.getBean(ClientBean.class); int count2 = clientBean2.logic(); assertThat(count2).isEqualTo(1); } @Scope("singleton") static class ClientBean { private final PrototypeBean prototypeBean; //생성시점에 주입되어서 계속 같은 거 사용. private final Provider<PrototypeBean> prototypeBeanProvider; @Autowired //생성자 하나니까 @Autowired 생략해도 되긴 함 public ClientBean(PrototypeBean prototypeBean, Provider<PrototypeBean> prototypeBeanProvider) { this.prototypeBean = prototypeBean; this.prototypeBeanProvider = prototypeBeanProvider; } public int logic() { PrototypeBean prototypeBean = prototypeBeanProvider.get(); prototypeBean.addCount(); return prototypeBean.getCount(); } } @Scope("prototype") static class PrototypeBean { private int count = 0; public void addCount() { count++; } public int getCount() { return count; } @PostConstruct public void init() { System.out.println("PrototypeBean.init " + this); } @PreDestroy public void destroy() { System.out.println("PrototypeBean.destroy"); } } }
-
해결됨자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
mysql 비밀번호 재설정
https://goodteacher.tistory.com/291 위 블로그를 참고해서 비밀번호를 초기화했는데mysql -u root -p Enter password: ************ ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)위와 같이 나옵니다. 위 에러 메시지는 비밀번호를 잘못입력했을 때 나오는 걸로 아는데저 한영 잘못친 것도 없고 numlock도 풀려있어서 제대로 잘 입력했는데 왜 그럴까요ㅠ mysql --version 해보면 mysql ver8.0.27 로 잘 나옵니다
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
싱글톤 질문 드립니다.
강의 교재의 "스프링은 스프링 컨테이너에 스프링 빈을 등록할 때, 기본으로 싱글톤으로 등록한다(유일하게 하나만 등록해서 공유한다) 따라서 같은 스프링 빈이면 모두 같은 인스턴스다." 이 문장에서 같은 스프링 빈이면 모두 같은 인스턴스라는 말이 하나의 인스턴스로 자원을 공유한다는 의미 같은데 어떤 경우에 싱글톤을 사용해 자원을 공유하는지 궁금합니다.
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
레포지토리 인터페이스 질문 드립니다.
강의에서 데이터 베이스를 아직 정하지 못해 인터페이스로 추상화 한다고 설명해 주셨는데 인터페이스 말고 추상 클래스를 사용하면 안되나요? 그리고 만약 데이터 베이스를 정했어도 추상화 할 때 인터페이스를 써야 하는지 궁금합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
TEST오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요 회원가입에서 오류가 떠요aused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springDataJpaMemberRepository' defined in com.example.hello_spring.repository.SpringDataJpaMemberRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Could not create query for public abstract void com.example.hello_spring.repository.MemberRepository.clearStore(); Reason: Failed to create query for method public abstract void com.example.hello_spring.repository.MemberRepository.clearStore(); No property 'clearStore' found for type 'Member'이런식으로 뭐가 정의되있다는데 뭐죠 ㅠㅠ
-
미해결스프링 DB 2편 - 데이터 접근 활용 기술
public, private 트랜잭션
안녕하세요! 고급편을 듣고 DB2 편을 듣고잇습니다. 여전히 뭔가 이해가 안가서요. 고급원리에도 질문을 하긴했지만 명확하지않았어요. 답변에 DB 2편을 보라고 하셨는데.. ㅠㅠ 이해잘안되네요. 죄송합니다. 궁금한게 뭐냐면,@Tansactional public void externalMethod() { this.internalMethod(); // logic } private void internalMethod() { // logic }여기서 internalMethod는 당연히 트랜잭션이 안탄다고 생각을 했어요. 이유는 우선 DI로 주입이 CGBLIB 프록시가 주입이 되는 것이고 이제 여기서 어노테이션을 보고 프록시 적용을 한다음.프록시 externalMethod 를 불러서 트랜잭션이 탔고internalMethod는 targetMethod 기에 프록시를 안탄다고 생각했거든요?근데 잘타네요.. 이해가 잘안갑니다.. ㅠㅠㅠ--[수정]아 이게.. 프록시 -> 타겟으로 가니까 어떻게보면 당연히 트랜잭션이 먹히는게 맞네요..반대가 안먹히는거고.. 맞죠? ㅠ
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
hasText 부분 질문있습니다.
=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]여기에 질문 내용을 남겨주세요.아래 코드에서 orderStatus 부분은 널로 체크하고 memberName 부분은 hasText로 체크한 이유가 있을까요??orderSearch.getMemberName() != null이런식으로 체크하면 안되는지 궁금합니다. if (orderSearch.getOrderStatus() != null) { query = query.setParameter("status", orderSearch.getOrderStatus()); } if (StringUtils.hasText(orderSearch.getMemberName())) { query = query.setParameter("name", orderSearch.ge tMemberName()); }