묻고 답해요
141만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
API서버에서 일반 컨트롤러의 역할을 잘 모르곘습니다!
백엔드에서 api를 개발하고 프론트엔드에게 제공하면 @RestController가 아닌 일반 @Controller는 단순히 클라이언트에게 html파일만 건네주는 용도쓰면 되는건가요??
-
해결됨스프링 DB 1편 - 데이터 접근 핵심 원리
h2 처음 사용시 몇 가지 의문점
1. h2 사용시 왜 처음 외에는 jdbc:h2:tcp://localhost/~/test 로 접속해야하나요? 그냥 넘어가도 되는 부분이기도 하지만 계속 궁금해서요. 만약 그렇게 하지 않으면 무슨 문제가 생기나요? 2. 그리고 jdbc:h2:~/test 이게 파일로 접근하는 방식이라고 하셨는데요. 이 부분이 잘 이해가 안 갑니다. 예를 들어서 MySQL같은걸 사용하면 데몬서버에 JDBC를 사용하는 클라이언트가 요청을 보내면, MySQL의 엔진과 스토리지 엔진이 돌아가면서 DB에 데이터도 저장하고 읽기도 한다고 알고 있거든요. h2가 아무리 경량이라고 하더라도 DB라면 데몬 프로그램으로 어딘가 떠서 돌아가고 있고, 거기에 H2 콘솔이 JDBC를 사용해서 TCP로 요청을 보내고 응답을 받으며 작업을 해야할 것 같은데... 파일로 접근한다는 개념은 무엇인지 잘 모르겠습니다.
-
미해결스프링 핵심 원리 - 기본편
@Scope 관련 질문이 있습니다.
안녕하세요! 항상 좋은 답변 달아주셔서 감사합니다. 한 가지 궁금한 점이 있어 글을 적게 되었습니다. 1. A라는 클래스에 Request Scope를 사용하게 될 경우, 각 HTTP 요청마다 다른 A 클래스가 생성되서 오는 것을 확인했습니다. 이 때, 각 쓰레드별로 다른 Request Scope 빈을 사용하는 것으로 확인이 되었고, @PreDestory 메서드까지 처리되는 것을 확인했습니다. 정리해보면 요청이 올 때마다 새로운 Request 스코프빈이 만들어져서 스프링 컨텍스트에서 관리된다는 것으로 이해를 할 수 있을 것 같습니다! 그럼 요청 10개가 오면, 동시에 10개의 쓰레드가 활동하면서 동일한 빈을 만들고, 스프링 컨테이너에 저장되어있는 것으로 보입니다! 이 때, 각 쓰레드는 어떻게 자기가 처음에 배정받았던 Request Scope 빈을 스프링 컨테이너에서 받아오는지 궁금합니다. 그리고 각 Request Scope 빈은 동일한 타입의 다른 이름으로 저장이 되는 걸까요? 2. Set Proxy 모드로 Request 객체를 만들었습니다 .이 때, Controller 클래스에 @RequiredArgusConstruct를 이용해서 @Controller 클래스가 스프링 빈으로 등록될 때, RequestScope 빈을 DI 받도록 설정했습니다. 이 때, Http 요청을 동시에 10개를 하게 되면 각 쓰레드마다 다른 프록시 객체를 가지는 것을 확인했습니다. 그런데 이 RequestScope는 이미 Controller 빈이 등록될 때, 정해진 빈인데 어떻게 각 쓰레드가 요청할 때 마다 쓰레드별로 다른 빈을 반환해주게 되는 것인가요? 너무 궁금합니다 항상 좋은 답변 주셔서 감사합니다. 좋은 하루 되세요.
-
미해결스프링부트 시큐리티 & JWT 강의
20초가량에 csrf 를 disable 한 이유가 뭔가요?
이전 수업을 들었으면 알 거라고 하는데 어디에 나와있을까요? 1강에서도 그냥 말없이 disable만 하셔서 질문 남겼는데 여기서도 그냥 넘어가서 제가 빼먹은 부분이 있나 싶어서요
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
stream이 아닌 querydsl transform을 이용하는 방법에대한 문의
안녕하세요 8:30초대 강의를 보면 1:N관계의 list형태를 mapping하기 위해 flats .stream ~ .collect ~ 형태를 이용하고 있는데요 실무에서도 비슷한 사례가있어, 처음에 강사님처럼 어플리케이션단에 코드를 짰다가, 코드가 너무 복잡해져서 QueryDsl에서 transform + GroupBy.list를 이용하는식으로 변경해봤는데요. (아래 예시참조) from(Entity) // 1:N 관계의 List<Object> 를 추출, key : Entity.Id .transform( groupBy(Entity.Id) .list( Projections.fields(Example.class, Entity.Id, list( Projections.fields(Detail.class, Detail.id Detail.name ) ).as("DetailList") ) ) ) 문제는 구글링을 해보니, 해당 방식이 쿼리결과를 memory에서 리스트형태로 만들어내는것이라고 하더라구요. 예전에 강사님의 강의에서 '컬렉션 fetch join은 페이징을 이용할 수 없다'는 내용을 설명해주실 때, 해당 동작이 메모리에서 일어나기때문에 OOM이 발생할 수 있다 라고 말씀해주셨는데 이와 마찬가지로 transform , Groupby.list를 이용하는 것 역시 문제가 발생할까봐 우려스럽네요 아래 두가지 질문에 답변 부탁드립니다. Q1) 강사님의 application단에서 짜는 방식이 나을지 아니면 querydsl단에서 transform & Groupby.list를 이용하는게 나을지 고민되는데 두가지 방법중 무엇을 선택하는게 좋을까요? 후자의 경우 OOM이 발생하지는 않을지도 궁금합니다.. Q2) memory에서 작업하는게 위험한 이유가 뭔가요? 강사님처럼 application단에서 로직을 수행하는것도 memory에서 동작하는것 아닌가요? 친절하고 유익한 강의 늘 감사드립니다. 답변 부탁드립니다!
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
실행안됨
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 실행버튼이 나타나지 않습니다ㅜㅜ 다른 분들 질문을 읽어보고 설정을 하는데 저는 java로 나타나지 않고 jdk로 나타나는데 이것때문일까요? 자바11을 제대로 설치 했는데 왜 저렇게 나오는지 모르겠습니다.. build.gradle을 project로 계속 열어봐도 안되네용
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
itemService.saveItem(book) 질문 드립니다!
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용] 안녕하세요 강사님! 다름이 아니고 Book book = new Book(); book.setName(form.getName()); book.setPrice(form.getPrice()); book.setAuthor(form.getAuthor()); book.setIsbn(form.getIsbn()); book.setStockQuantity(form.getStockQuantity()); itemService.saveItem(book); itemService.saveItem(book) 호출을 했는데 Insert 시 어떻게 Book 객체의 멤버를 읽어서 사용하는지 아니면 애초에 1차캐시에 해당 참조값만 관리되어서 업캐스팅과 관계없이 내부에 있는 멤버에 접근이 가능한건지 궁금해서 질문드립니다!
-
미해결스프링부트 시큐리티 & JWT 강의
08:08 시점에 csrf disable 한 이유가 뭔가요?
08:08 시점에 csrf disable 한 이유가 뭔가요? csrf가 기본적으로 켜져 있는건 알겠는데 굳이 disable한 이유가 있나요?
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
주문내역을 들어갈 때 에러가 났습니다.
QueryDSL 마지막 강의를 듣고 주문내역을 들어가는 부분에서 에러가 났습니다. 아래와 같이 에러가 났습니다. https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8-JPA-API%EA%B0%9C%EB%B0%9C-%EC%84%B1%EB%8A%A5%EC%B5%9C%EC%A0%81%ED%99%94/lecture/24342?tab=community&volume=0.70&quality=1080&speed=1.25&q=486752 이 부분을 참고하였는데 해결을 못하였습니다... Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Apr 14 00:00:05 KST 2022 There was an unexpected error (type=Internal Server Error, status=500). An error happened during template parsing (template: "class path resource [templates/order/orderList.html]") org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/order/orderList.html]") at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:241) at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parseStandalone(AbstractMarkupTemplateParser.java:100) at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:666) at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:366) at org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:190) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1401) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1145) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1084) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "item.member.name" (template: "order/orderList" - line 34, col 21) at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:393) at org.attoparser.MarkupParser.parse(MarkupParser.java:257) at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:230) ... 48 more Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "item.member.name" (template: "order/orderList" - line 34, col 21) at org.thymeleaf.spring5.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:292) at org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:166) at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:66) at org.thymeleaf.standard.expression.Expression.execute(Expression.java:109) at org.thymeleaf.standard.expression.Expression.execute(Expression.java:138) at org.thymeleaf.standard.processor.AbstractStandardExpressionAttributeTagProcessor.doProcess(AbstractStandardExpressionAttributeTagProcessor.java:144) at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74) at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1314) at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) at org.thymeleaf.engine.Model.process(Model.java:282) at org.thymeleaf.engine.Model.process(Model.java:290) at org.thymeleaf.engine.IteratedGatheringModelProcessable.processIterationModel(IteratedGatheringModelProcessable.java:367) at org.thymeleaf.engine.IteratedGatheringModelProcessable.process(IteratedGatheringModelProcessable.java:221) at org.thymeleaf.engine.ProcessorTemplateHandler.handleCloseElement(ProcessorTemplateHandler.java:1640) at org.thymeleaf.engine.TemplateHandlerAdapterMarkupHandler.handleCloseElementEnd(TemplateHandlerAdapterMarkupHandler.java:388) at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler$InlineMarkupAdapterPreProcessorHandler.handleCloseElementEnd(InlinedOutputExpressionMarkupHandler.java:322) at org.thymeleaf.standard.inline.OutputExpressionInlinePreProcessorHandler.handleCloseElementEnd(OutputExpressionInlinePreProcessorHandler.java:220) at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler.handleCloseElementEnd(InlinedOutputExpressionMarkupHandler.java:164) at org.attoparser.HtmlElement.handleCloseElementEnd(HtmlElement.java:169) at org.attoparser.HtmlMarkupHandler.handleCloseElementEnd(HtmlMarkupHandler.java:412) at org.attoparser.MarkupEventProcessorHandler.handleCloseElementEnd(MarkupEventProcessorHandler.java:473) at org.attoparser.ParsingElementMarkupUtil.parseCloseElement(ParsingElementMarkupUtil.java:201) at org.attoparser.MarkupParser.parseBuffer(MarkupParser.java:725) at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:301) ... 50 more Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1021E: A problem occurred whilst attempting to access the property 'name': 'Unable to access property 'name' through getter method' at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:209) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104) at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51) at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:406) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:92) at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:112) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:338) at org.thymeleaf.spring5.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:265) ... 75 more Caused by: org.springframework.expression.AccessException: Unable to access property 'name' through getter method at org.springframework.expression.spel.support.ReflectivePropertyAccessor$OptimalPropertyAccessor.read(ReflectivePropertyAccessor.java:708) at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:204) ... 82 more Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.expression.spel.support.ReflectivePropertyAccessor$OptimalPropertyAccessor.read(ReflectivePropertyAccessor.java:704) ... 83 more Caused by: org.hibernate.LazyInitializationException: could not initialize proxy [jpabook.jpashop.domain.Member#1] - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:176) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:322) at org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor.intercept(ByteBuddyInterceptor.java:45) at org.hibernate.proxy.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:95) at jpabook.jpashop.domain.Member$HibernateProxy$rzzDK9hn.getName(Unknown Source) ... 88 more MemberService Interface입니다. memberService 입니다. OrderService 입니다. 따로 추가작업이 필요할까요??,,
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
검증 로직 Entity는 어떻게 사용하면 좋을까요?
안녕하세요. 스프링 1,2편 듣고 JPA학습중에 Entity를 만들고 2편에서 배운 검증 로직을 대입해 보려고 하는데 막히는 부분이 있어서 질문드립니다. Entity를 강의에서 Setter를 지양하라고 해서 builer를 사용했는데 검증로직파트 보고 검증로직을 적용하려고 하니 View에서 DTO로 값을 받아 Entity.builder()에 넣지 않고 HttpServletRequest로 request.getParameter로 넣어서 따라해 봐도 적용이 안 되네요.. 생각해 본 방법은 mvc2편처럼 DTO로 그냥 받아와서 builder에 request가 아닌 DTO값을 받아 넣기..정도인데 따로 JPA, builder 검증하는 힌트가 있을까요?.. 강의 보고 따라할 때는 무난하다 했는데 조금만 변형해서 적용하려고 하면 어렵네요..
-
미해결스프링 핵심 원리 - 기본편
uuid가 안찍힙니다 ㅠㅠ
안녕하세요 김영한 선생님, 스태프님들!! 너무 쉬운 이야기 일 수도 있는데.. create 이 후 uuid가 안찍혀서 메시지 남깁니다!! [아래와 같이 오류 발생] [2992c07d-caf8-4a90-bb4d-c7a16165a064] request scope bean create: hello.core.common.MyLogger@373901b7 [null][http://localhost:8080/log-demo][controller test] [null][http://localhost:8080/log-demo][service id = testID] [null] request scope bean close: hello.core.common.MyLogger@373901b7 [MyLogger] package hello.core.common; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import java.util.UUID; @Component @Scope(value = "request") public class MyLogger { private String uuid; private String requestURL; public void setRequestURL(String requestURL) { this.requestURL = requestURL; } public void log(String message) { System.out.println("[" + uuid + "]" + "[" + requestURL + "]" + "[" + message + "]"); } @PostConstruct public void init() { String uuid = UUID.randomUUID().toString(); System.out.println("[" + uuid + "] request scope bean create: " + this); } @PreDestroy public void close() { System.out.println("[" + uuid + "] request scope bean close: " + this); } } [LogDemoController] package hello.core.web; import hello.core.common.MyLogger; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.ObjectProvider; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; @Controller @RequiredArgsConstructor public class LogDemoController { private final LogDemoService logDemoService; private final ObjectProvider<MyLogger> myLoggerProvider; @RequestMapping("log-demo") @ResponseBody public String logDemo(HttpServletRequest request) { String requestURL = request.getRequestURL().toString(); MyLogger myLogger = myLoggerProvider.getObject(); myLogger.setRequestURL(requestURL); myLogger.log("controller test"); logDemoService.logic("testID"); return "OK"; } } [LogDemoService] package hello.core.web; import hello.core.common.MyLogger; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.ObjectProvider; import org.springframework.stereotype.Service; @Service @RequiredArgsConstructor public class LogDemoService { private final ObjectProvider<MyLogger> myLoggerProvider; public void logic(String id) { MyLogger myLogger = myLoggerProvider.getObject(); myLogger.log("service id = " + id); } } 어떤게 문제일까요...ㅠ* 추가적으로 이런 오류도 못잡는 상황인데,, 강의 보기 보단 자바문법이 부족한 것 같아요... 파이썬 공부하고, 자바는 훌훌 넘겨보면서 봐서, 부족한데... 어떤 부분을 보면 좀 보강하고, 강의를 보는데 이해할 수 있을까요.. 바쁘실텐데 이런 오류 메시지나 남기고... 면목없습니다 달아주실 답변에 미리 감사합니다!
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
톰캣포트 8080을 바꿀수 있을까요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 강의에서는 Tomcat 포트를 8080으로 설정하셨는데다른 프로젝트 여러개를 만들어놓으니까 서로 충돌이 발생하는데포트번호를 바꾸는 방법이 있을까요?
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
서블릿 컨테이너, was가 헷갈립니다.
안녕하세요 강의 잘 듣고 있습니다. 그런데 WAS,서블릿 컨테이너, 서블릿 객체가 헷갈려서 질문드립니다. 강의 중, 서블릿 컨테이너는 톰캣처럼 서블릿을 지원하는 WAS라고 하셨습니다. 더불어, 다른 학생의 질문에 대한 영한님의 답변 중 "request 객체를 만들어서 서블릿에 넘겨주는 것은 서블릿 컨테이너의 역할입니다. response도 마찬가지로 서블릿 컨테이너가 합니다. 그리고 서블릿 컨테이너가 서블릿을 호출해주는 것이지요." 라고 하셨습니다. 그런데 그림에서는 request,response 객체를 생성하고 서블릿 객체를 호출하는 "웹 애플리케이션 서버(WAS)"와 서블릿 객체를 생성하고 관리하는 "서블릿 컨테이너"로 나뉘어져 있네요. 그림에서 "WAS"와 "서블릿 컨테이너"가 사실 같은 큰 서블릿 컨테이너인데 역할에 따라 구분해놓으신건가요??
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
DTO 조회 방식 질문있습니다!
안녕하세요! 강의 너무 잘 듣고 있습니다! 강의를 듣다가 DTO 조회 방식에 대해 헷갈리는 부분이 있어 질문드립니다. DTO 조회 방식은 엔티티가 아니기 때문에 지연로딩이나 페치 조인을 사용할 수 없다고 알고있습니다. 그럼 DTO 조회 방식은 단순히 DB에서 데이터를 가져와서 DTO의 필드에 값을 채워주는 방식이고, 이 때, 엔티티에는 값을 따로 할당하지 않는건가요?? 그렇다면 영속성 컨텍스트에도 DB에서 조회한 데이터가 들어가지 않나요?
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
@InitBinder를 넣으면 해당 컨트롤러에 검증기가 작동한다고 했는데
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]안녕하세요. @InitBinder를 넣으면 해당 컨트롤러에서는 어떤 메소드가 실행되도 검증기가 작동한다고 하셨는데 그 중에서 @Validated를 선언한 값만 검증을 수행하나요? 그러면 Controller 윗 줄에 @InitBinder 코드를 적어도 @Validated가 적힌 Item이 없다면 작동을 안하는거로 이해하면 될까요? 감사합니다.
-
미해결스프링 핵심 원리 - 고급편
private method 포함한 Controller @Aspect로 AOP 적용했을때의 의문점
안녕하세요. Controller에 AOP를 적용하는 과정에서 궁금한점이 있어 질문을 올립니다. 보통 handler method 는 private 으로 지정하진 않겠지만, 만일 private으로 지정해도 handler는 정상 동작하는 것으로 알고 있고 정상 동작도 확인하였습니다. 그런데, @Aspect 이용해서 해당 Controller의 Proxy를 빈으로 등록시켰을때 문제가 발생합니다. 우선, 첫번째 예상했던 것은 CGLIB는 상속을 이용하기에 private메서드는 상속을 못해서 handler가 정상동작하지 못할 것 같았습니다. 하지만 결과는 정상동작하는 것을 보았습니다. 어떻게 정상동작이 수행가능 한걸까요? 혹시, private handler의 경우는 바로 target메서드를 찾아 실행시키나 해서 stack trace를 봐보면 Enhancer객체에서 실행되는 것을 볼 수 있습니다. 물론, 이처럼 간단한 handler라면, 정상적으로 응답이 오지만 만일 해당 handler가 의존성주입된 객체를 사용하려고 한다면 Enhancer 객체는 상태를 갖지않는 proxy객체라 NullPointerException이 발생합니다. 의문점을 정리해보자면, `private handler는 어떻게 Enhancer객체에서 수행할 수 있을까? ` 입니다. 한번 reflection은 private메서드도 수행가능하기에 상속한 슈퍼클래스의 private 메서드를 이용해 정상 동작한다. 로 가정하고 생각해봤습니다. 그러면 또 꼬리의문이 드는데 슈퍼클래스의 private메서드를 이용한다면, 실제 target 메서드이므로 DI된 객체가 null이 되는 것이 의문 입니다.
-
미해결실전! 스프링 데이터 JPA
LazyLoading 시 가져오는 객체에 대해 질문이있습니다!
[질문 내용]안녕하세요 영한님 JPA 를 공부하다가 LazyLoading 관련해서 의문점이 생겨 질문남깁니다. 연관관계에서의 LazyLoading 은 실제 entity를 가져오는것이 아닌 프록시객체의 target이 entity와 연결되어있는것으로 알고있습니다. 그래서 Team(1) <-> Member(n) 의 관계라고 가정했을때 Member 에서의 @ManyToOne 관계에서의 LazyLoading 으로 객체를 가져오게 되면 Team은 `Team$HibernateProxy$95RMKfgq@13875` 이런 형식으로 프록시 객체를 갖고있는것을 확인했습니다. 다만 Team에서 @OneToMany 관계의 Member를 LazyLoading 호출하게되면 List<Member> 의 형식이 PersistentBag 의 객체형식을 가지고있는것까지는 이해했는데 컬렉션 내의 객체는 제가 생각했던 `Member$HibernateProxy$95RMKfgq@13875` 와 같은 프록시 객체의 형태가 아닌 `Member@13867` 과 같은 실제 객체를 가지고 있는것으로 확인했습니다. 이와 관련해서 PersistenceCollection 이나 StatefulPersistenceContext 클래스의 관련된 문서를 찾아봤지만 답을 찾지못해 여쭤봅니다ㅠㅜ 추가로 entityManagerFactory getPersistenceUnitUtil().isLoaded 메소드를 이용해서 List 객체를 조회했을땐 false 로 확인했습니다. 다만 디버그모드로 봤을때는 ManyToOne 과 다르게 실제객체형태로 보이네요ㅠㅜ 디버그모드로 확인시 값을조회해야해서 의도치않게 추가쿼리가 발생되는것은 인지하고있지만 이 케이스는 이해가 되질 않네요 ㅎㅎ
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
JpaMemberRepository 이후 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]"C:\Program Files\Java\jdk-12\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3\lib\idea_rt.jar=8216:C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\tjfgh\.m2\repository\org\junit\platform\junit-platform-launcher\1.8.2\junit-platform-launcher-1.8.2.jar;C:\Users\tjfgh\.m2\repository\org\junit\platform\junit-platform-engine\1.8.2\junit-platform-engine-1.8.2.jar;C:\Users\tjfgh\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\tjfgh\.m2\repository\org\junit\platform\junit-platform-commons\1.8.2\junit-platform-commons-1.8.2.jar;C:\Users\tjfgh\.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3\plugins\junit\lib\junit5-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3\plugins\junit\lib\junit-rt.jar;C:\Users\tjfgh\Desktop\spring\hello-spring\out\test\classes;C:\Users\tjfgh\Desktop\spring\hello-spring\out\production\classes;C:\Users\tjfgh\Desktop\spring\hello-spring\out\production\resources;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-thymeleaf\2.6.5\6cff5a773aeac16ee05e9471070eb916c496cff\spring-boot-starter-thymeleaf-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web\2.6.5\2fe510ed31c08e65265451a407607fe53666df0a\spring-boot-starter-web-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-data-jpa\2.6.5\8021867a0f7369de293dd15f6141aff375f8f736\spring-boot-starter-data-jpa-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-test\2.6.5\652bfc7d538aa666ff98f39a41282363ce85c163\spring-boot-starter-test-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter\2.6.5\26a7cd427b33d44d1166097ad31cd49880efe695\spring-boot-starter-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.thymeleaf\thymeleaf-spring5\3.0.15.RELEASE\7170e1bcd1588d38c139f7048ebcc262676441c3\thymeleaf-spring5-3.0.15.RELEASE.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.thymeleaf.extras\thymeleaf-extras-java8time\3.0.4.RELEASE\36e7175ddce36c486fff4578b5af7bb32f54f5df\thymeleaf-extras-java8time-3.0.4.RELEASE.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-json\2.6.5\aadda8a6dd94ba4c281877ebde276b8e7c6a9700\spring-boot-starter-json-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat\2.6.5\912894b73814637c077cde8a06312e3abde3382f\spring-boot-starter-tomcat-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc\5.3.17\d62bd1ef6a9aee74557bd59fb96030fd52cf2fc1\spring-webmvc-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\5.3.17\66fdc6bbaba2fd7242046131895353d9669a19ad\spring-web-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-aop\2.6.5\51278e3bde343e53e4ebd7bab3083cfc5af565cb\spring-boot-starter-aop-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-jdbc\2.6.5\6117f80dec65b70ee4fdd631d5fe28c4832de80e\spring-boot-starter-jdbc-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\1.3.3\c4179d48720a1e87202115fbed6089bdc4195405\jakarta.transaction-api-1.3.3.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\jakarta.persistence\jakarta.persistence-api\2.2.3\8f6ea5daedc614f07a3654a455660145286f024e\jakarta.persistence-api-2.2.3.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-core\5.6.7.Final\c62626c463b75530acb4f2fb2ae3ca85d80cfa06\hibernate-core-5.6.7.Final.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\2.6.3\7fbfafa3b27c8f2e315fe489c2f0699a24f32082\spring-data-jpa-2.6.3.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aspects\5.3.17\ce487f928ee644955f4c94148e42dd1471566b0f\spring-aspects-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-test-autoconfigure\2.6.5\53d80474bbc4e7584e17d93fc058cd2faeb97ea7\spring-boot-test-autoconfigure-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-test\2.6.5\21dcc8b330b7787cd306fbea8b9f4659db7c889f\spring-boot-test-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.jayway.jsonpath\json-path\2.6.0\67f565b424f7903a12d4f5b9361b11462ecacdac\json-path-2.6.0.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\jakarta.xml.bind\jakarta.xml.bind-api\2.3.3\48e3b9cfc10752fba3521d6511f4165bea951801\jakarta.xml.bind-api-2.3.3.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.assertj\assertj-core\3.21.0\27a14d6d22c4e3d58f799fb2a5ca8eaf53e6942a\assertj-core-3.21.0.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest\2.2\1820c0968dba3a11a1b30669bb1f01978a91dedc\hamcrest-2.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter\5.8.2\5a817b1e63f1217e5c586090c45e681281f097ad\junit-jupiter-5.8.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.mockito\mockito-junit-jupiter\4.0.0\b76de25bd6e5d8f7924d0536729c0076e37e9396\mockito-junit-jupiter-4.0.0.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.mockito\mockito-core\4.0.0\f5195e0c4a45716bbd2d1d29173adbd148acce3a\mockito-core-4.0.0.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.skyscreamer\jsonassert\1.5.0\6c9d5fe2f59da598d9aefc1cfc6528ff3cf32df3\jsonassert-1.5.0.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-test\5.3.17\49705efaf6243481a0a12a3e4c8722c58f054a36\spring-test-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\5.3.17\e709af88b40e1b3df193df3460faef44da41fd51\spring-core-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.xmlunit\xmlunit-core\2.8.4\35be57989ca80eefa03161b211630e319a8f36c6\xmlunit-core-2.8.4.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure\2.6.5\c7b562cfde36709581afdcfac128979a83e8fe7d\spring-boot-autoconfigure-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\2.6.5\7a93e397b7af3300a9692e6be82fe7410092841c\spring-boot-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging\2.6.5\70d21bfd3993dea813c68b29d623853a069a0af1\spring-boot-starter-logging-2.6.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\1.3.5\59eb84ee0d616332ff44aba065f3888cf002cd2d\jakarta.annotation-api-1.3.5.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.29\6d0cdafb2010f1297e574656551d7145240f6e25\snakeyaml-1.29.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.thymeleaf\thymeleaf\3.0.15.RELEASE\13e3296a03d8a597b734d832ed8656139bf9cdd8\thymeleaf-3.0.15.RELEASE.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.36\6c62681a2f655b49963a5983b8b0950a6120ae14\slf4j-api-1.7.36.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\2.13.2\cddd9380efd4b81ea01e98be8fbdc9765a81793b\jackson-datatype-jsr310-2.13.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-parameter-names\2.13.2\c406ec37f89125d1003093d5b96d216dc967153c\jackson-module-parameter-names-2.13.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\2.13.2\95f59cf63c3aadc1549578254af839a9c42ae84f\jackson-datatype-jdk8-2.13.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.13.2\926e48c451166a291f1ce6c6276d9abbefa7c00f\jackson-databind-2.13.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket\9.0.60\a88262a55ae2c4b5404149a48122523688be341a\tomcat-embed-websocket-9.0.60.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\9.0.60\e14045220243804544ddb168cb532f4640a220c\tomcat-embed-core-9.0.60.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\9.0.60\46dad1a278f348ca73466e0b73132bf4c4892c06\tomcat-embed-el-9.0.60.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\5.3.17\756201e2e2488fc164ae15b2e561f96960162577\spring-context-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\5.3.17\31746d5387cfec075a5ec01adb407d6658dd59e\spring-expression-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\5.3.17\b7aaf5dd40a64b3419ff779746fcaf7bea92d29d\spring-aop-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\5.3.17\3d9c415cb47c96a81b1267665f513e4676af53b4\spring-beans-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.7\158f5c255cd3e4408e795b79f7c3fbae9b53b7ca\aspectjweaver-1.9.7.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\5.3.17\383ae54b7171f34952ff5f19c5eadf4f579271cd\spring-jdbc-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP\4.0.3\107cbdf0db6780a065f895ae9d8fbf3bb0e1c21f\HikariCP-4.0.3.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\2.3.6\1e6cd0e5d9f9919c8c8824fb4d310b09a978a60e\jaxb-runtime-2.3.6.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\5.1.2.Final\e59ffdbc6ad09eeb33507b39ffcf287679a498c8\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.4.3.Final\c4bd7e12a745c0e7f6cf98c45cdcdf482fd827ea\jboss-logging-3.4.3.Final.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.11.22\8b4c7fa5562a09da1c2a9ab0873cb51f5034d83f\byte-buddy-1.11.22.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\antlr\antlr\2.7.7\83cd2cd674a217ade95a4bb83a8a14f351f48bd0\antlr-2.7.7.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.jboss\jandex\2.4.2.Final\1e1c385990b258ff1a24c801e84aebbacf70eb39\jandex-2.4.2.Final.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.5.1\3fe0bed568c62df5e89f4f174c101eab25345b6c\classmate-1.5.1.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\5.3.17\5636b1b924f38ab3b3ab25bcd7003cadc334340a\spring-orm-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\2.6.3\767ebf330da425ac4ab4b14391a60d9ed3ba18b7\spring-data-commons-2.6.3.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\5.3.17\d41d39725d3ae613b6649094002120ab27ba532\spring-tx-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\net.minidev\json-smart\2.4.8\7c62f5f72ab05eb54d40e2abf0360a2fe9ea477f\json-smart-2.4.8.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\jakarta.activation\jakarta.activation-api\1.2.2\99f53adba383cb1bf7c3862844488574b559621f\jakarta.activation-api-1.2.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter-params\5.8.2\ddeafe92fc263f895bfb73ffeca7fd56e23c2cce\junit-jupiter-params-5.8.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter-api\5.8.2\4c21029217adf07e4c0d0c5e192b6bf610c94bdc\junit-jupiter-api-5.8.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy-agent\1.11.22\2fbcf3210dfc09b42242e3b66a5281cc5b9adb80\byte-buddy-agent-1.11.22.jar;C:\Users\tjfgh\.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\tjfgh\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\5.3.17\2d3c82d3c656d0743ed927a475745ac2394ea421\spring-jcl-5.3.17.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.2.11\4741689214e9d1e8408b206506cbe76d1c6a7d60\logback-classic-1.2.11.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.17.2\17dd0fae2747d9a28c67bc9534108823d2376b46\log4j-to-slf4j-2.17.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.slf4j\jul-to-slf4j\1.7.36\ed46d81cef9c412a88caef405b58f93a678ff2ca\jul-to-slf4j-1.7.36.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.attoparser\attoparser\2.0.5.RELEASE\a93ad36df9560de3a5312c1d14f69d938099fa64\attoparser-2.0.5.RELEASE.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.unbescape\unbescape\1.1.6.RELEASE\7b90360afb2b860e09e8347112800d12c12b2a13\unbescape-1.1.6.RELEASE.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.13.2\ec18851f1976d5b810ae1a5fcc32520d2d38f77a\jackson-annotations-2.13.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.13.2\a6a0e0620d51833feffc67bccb51937b2345763\jackson-core-2.13.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\2.3.6\45db7b69a8f1ec2c21eb7d4fc0ee729f53c1addc\txw2-2.3.6.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\3.0.12\cbbe1a62b0cc6c85972e99d52aaee350153dc530\istack-commons-runtime-3.0.12.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\net.minidev\accessors-smart\2.4.8\6e1bee5a530caba91893604d6ab41d0edcecca9a\accessors-smart-2.4.8.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.apiguardian\apiguardian-api\1.1.2\a231e0d844d2721b0fa1b238006d15c6ded6842a\apiguardian-api-1.1.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.junit.platform\junit-platform-commons\1.8.2\32c8b8617c1342376fd5af2053da6410d8866861\junit-platform-commons-1.8.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.opentest4j\opentest4j\1.2.0\28c11eb91f9b6d8e200631d46e20a7f407f2a046\opentest4j-1.2.0.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.2.11\a01230df5ca5c34540cdaa3ad5efb012f1f1f792\logback-core-1.2.11.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.17.2\f42d6afa111b4dec5d2aea0fe2197240749a4ea6\log4j-api-2.17.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\9.1\a99500cf6eea30535eeac6be73899d048f8d12a8\asm-9.1.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.h2database\h2\1.4.200\f7533fe7cb8e99c87a43d325a77b4b678ad9031a\h2-1.4.200.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.junit.jupiter\junit-jupiter-engine\5.8.2\c598b4328d2f397194d11df3b1648d68d7d990e3\junit-jupiter-engine-5.8.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.objenesis\objenesis\3.2\7fadf57620c8b8abdf7519533e5527367cb51f09\objenesis-3.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\com.sun.activation\jakarta.activation\1.2.2\74548703f9851017ce2f556066659438019e7eb5\jakarta.activation-1.2.2.jar;C:\Users\tjfgh\.gradle\caches\modules-2\files-2.1\org.junit.platform\junit-platform-engine\1.8.2\b737de09f19864bd136805c84df7999a142fec29\junit-platform-engine-1.8.2.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 hello.hellospring.service.MemberServiceIntegrationTest 14:44:52.776 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] 14:44:52.804 [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)] 14:44:52.880 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [hello.hellospring.service.MemberServiceIntegrationTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper] 14:44:52.910 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [hello.hellospring.service.MemberServiceIntegrationTest], using SpringBootContextLoader 14:44:52.922 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [hello.hellospring.service.MemberServiceIntegrationTest]: class path resource [hello/hellospring/service/MemberServiceIntegrationTest-context.xml] does not exist 14:44:52.924 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [hello.hellospring.service.MemberServiceIntegrationTest]: class path resource [hello/hellospring/service/MemberServiceIntegrationTestContext.groovy] does not exist 14:44:52.924 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [hello.hellospring.service.MemberServiceIntegrationTest]: no resource found for suffixes {-context.xml, Context.groovy}. 14:44:52.926 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [hello.hellospring.service.MemberServiceIntegrationTest]: MemberServiceIntegrationTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 14:44:53.041 [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 [hello.hellospring.service.MemberServiceIntegrationTest] 14:44:53.186 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [C:\Users\tjfgh\Desktop\spring\hello-spring\out\production\classes\hello\hellospring\HelloSpringApplication.class] 14:44:53.195 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration hello.hellospring.HelloSpringApplication for test class hello.hellospring.service.MemberServiceIntegrationTest 14:44:53.469 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [hello.hellospring.service.MemberServiceIntegrationTest]: using defaults. 14:44:53.470 [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] 14:44:53.514 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@1e8b7643, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@51549490, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@71e9ebae, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@73d983ea, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@36a5cabc, org.springframework.test.context.support.DirtiesContextTestExecutionListener@432038ec, org.springframework.test.context.transaction.TransactionalTestExecutionListener@7daa0fbd, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@42530531, org.springframework.test.context.event.EventPublishingTestExecutionListener@5a3bc7ed, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@181e731e, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@35645047, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@6f44a157, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@6bc407fd, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@291f18, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@17d88132] 14:44:53.524 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@c7ba306 testClass = MemberServiceIntegrationTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@4ff8d125 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@29e495ff, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@15bbf42f, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a84a97d, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@223aa2f7, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@4d02f94e, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], 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]. . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.6.5) 2022-04-10 14:44:54.280 INFO 26660 --- [ main] h.h.s.MemberServiceIntegrationTest : Starting MemberServiceIntegrationTest using Java 12 on DESKTOP-U5FU35V with PID 26660 (started by tjfgh in C:\Users\tjfgh\Desktop\spring\hello-spring) 2022-04-10 14:44:54.282 INFO 26660 --- [ main] h.h.s.MemberServiceIntegrationTest : No active profile set, falling back to 1 default profile: "default" 2022-04-10 14:44:55.628 INFO 26660 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2022-04-10 14:44:55.661 INFO 26660 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 17 ms. Found 0 JPA repository interfaces. 2022-04-10 14:44:56.739 INFO 26660 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2022-04-10 14:44:56.866 INFO 26660 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.7.Final 2022-04-10 14:44:57.210 INFO 26660 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 2022-04-10 14:44:58.355 INFO 26660 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2022-04-10 14:44:58.468 INFO 26660 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2022-04-10 14:44:58.523 INFO 26660 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2022-04-10 14:44:59.507 INFO 26660 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2022-04-10 14:44:59.524 INFO 26660 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2022-04-10 14:45:00.245 WARN 26660 --- [ 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-04-10 14:45:00.930 INFO 26660 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html] 2022-04-10 14:45:01.624 INFO 26660 --- [ main] h.h.s.MemberServiceIntegrationTest : Started MemberServiceIntegrationTest in 8.01 seconds (JVM running for 10.33) 2022-04-10 14:45:01.812 INFO 26660 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@c7ba306 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@5cf3a7f9, testMethod = 중복_회원_예외@MemberServiceIntegrationTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@4ff8d125 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@29e495ff, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@15bbf42f, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a84a97d, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@223aa2f7, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@4d02f94e, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], 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@621a387f]; rollback [true] Hibernate: select member0_.id as id1_0_, member0_.name as name2_0_ from member member0_ where member0_.name=? 2022-04-10 14:45:02.400 INFO 26660 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@c7ba306 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@5cf3a7f9, testMethod = 중복_회원_예외@MemberServiceIntegrationTest, testException = java.lang.IllegalStateException: 이미 존재하는 회원입니다., mergedContextConfiguration = [WebMergedContextConfiguration@4ff8d125 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@29e495ff, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@15bbf42f, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a84a97d, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@223aa2f7, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@4d02f94e, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], 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]] java.lang.IllegalStateException: 이미 존재하는 회원입니다. at hello.hellospring.service.MemberService.lambda$validateDuplicateMember$0(MemberService.java:31) at java.base/java.util.Optional.ifPresent(Optional.java:183) at hello.hellospring.service.MemberService.validateDuplicateMember(MemberService.java:30) at hello.hellospring.service.MemberService.join(MemberService.java:24) at hello.hellospring.service.MemberService$$FastClassBySpringCGLIB$$530c61b7.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698) at hello.hellospring.service.MemberService$$EnhancerBySpringCGLIB$$4067b1ff.join(<generated>) at hello.hellospring.service.MemberServiceIntegrationTest.중복_회원_예외(MemberServiceIntegrationTest.java:41) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) 2022-04-10 14:45:02.424 INFO 26660 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@c7ba306 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@107ebdad, testMethod = 회원가입@MemberServiceIntegrationTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@4ff8d125 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@29e495ff, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@15bbf42f, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a84a97d, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@223aa2f7, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@4d02f94e, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], 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@621a387f]; rollback [true] Hibernate: select member0_.id as id1_0_, member0_.name as name2_0_ from member member0_ where member0_.name=? Hibernate: call next value for hibernate_sequence 2022-04-10 14:45:02.435 WARN 26660 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 90036, SQLState: 90036 2022-04-10 14:45:02.436 ERROR 26660 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Sequence "HIBERNATE_SEQUENCE" not found; SQL statement: call next value for hibernate_sequence [90036-200] 2022-04-10 14:45:02.447 INFO 26660 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@c7ba306 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@107ebdad, testMethod = 회원가입@MemberServiceIntegrationTest, testException = javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement, mergedContextConfiguration = [WebMergedContextConfiguration@4ff8d125 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@29e495ff, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@15bbf42f, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@6a84a97d, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@223aa2f7, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@4d02f94e, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@7225790e], 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]] javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:762) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:742) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:311) at com.sun.proxy.$Proxy90.persist(Unknown Source) at hello.hellospring.repository.JpaMemberRepository.save(JpaMemberRepository.java:17) at hello.hellospring.service.MemberService.join(MemberService.java:25) at hello.hellospring.service.MemberService$$FastClassBySpringCGLIB$$530c61b7.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698) at hello.hellospring.service.MemberService$$EnhancerBySpringCGLIB$$4067b1ff.join(<generated>) at hello.hellospring.service.MemberServiceIntegrationTest.회원가입(MemberServiceIntegrationTest.java:28) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:75) at org.hibernate.id.enhanced.SequenceStructure$1.getNextValue(SequenceStructure.java:105) at org.hibernate.id.enhanced.NoopOptimizer.generate(NoopOptimizer.java:40) at org.hibernate.id.enhanced.SequenceStyleGenerator.generate(SequenceStyleGenerator.java:534) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:115) at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:185) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:128) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55) at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:756) ... 91 more Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Sequence "HIBERNATE_SEQUENCE" not found; SQL statement: call next value for hibernate_sequence [90036-200] at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) at org.h2.message.DbException.get(DbException.java:205) at org.h2.message.DbException.get(DbException.java:181) at org.h2.command.Parser.readSequence(Parser.java:7678) at org.h2.command.Parser.readTermWithIdentifier(Parser.java:4593) at org.h2.command.Parser.readTerm(Parser.java:4311) at org.h2.command.Parser.readFactor(Parser.java:3343) at org.h2.command.Parser.readSum(Parser.java:3330) at org.h2.command.Parser.readConcat(Parser.java:3305) at org.h2.command.Parser.readCondition(Parser.java:3108) at org.h2.command.Parser.readExpression(Parser.java:3059) at org.h2.command.Parser.parseCall(Parser.java:6480) at org.h2.command.Parser.parsePrepared(Parser.java:905) at org.h2.command.Parser.parse(Parser.java:843) at org.h2.command.Parser.parse(Parser.java:815) at org.h2.command.Parser.prepareCommand(Parser.java:738) at org.h2.engine.Session.prepareLocal(Session.java:657) at org.h2.server.TcpServerThread.process(TcpServerThread.java:278) at org.h2.server.TcpServerThread.run(TcpServerThread.java:183) at java.base/java.lang.Thread.run(Thread.java:833) at org.h2.message.DbException.getJdbcSQLException(DbException.java:576) at org.h2.engine.SessionRemote.done(SessionRemote.java:611) at org.h2.command.CommandRemote.prepare(CommandRemote.java:85) at org.h2.command.CommandRemote.<init>(CommandRemote.java:51) at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:481) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76) at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:352) at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:337) at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$1.doPrepare(StatementPreparerImpl.java:90) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:176) ... 101 more 2022-04-10 14:45:02.471 INFO 26660 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2022-04-10 14:45:02.475 INFO 26660 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2022-04-10 14:45:02.497 INFO 26660 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. Process finished with exit code -1 다른 질문들도 서치를 해보았고 코드도 따로 복붙했는데 대체 왜 이런 오류가 나는지 모르겠습니다 .. ㅠㅠ
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
실무에서도 repository를 도메인마다 따로 만드나요??
이 강의는 도메인 별로 각 각 repository랑 service를 만들었는데 예제에서만 그런건지 실제로 실무에서도 그런지 궁금합니다 ㅠㅠ
-
미해결스프링 핵심 원리 - 기본편
request scope bean의 생성을 지연한다는 의미가 무엇일까요?
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]안녕하세요 공부 중 궁금한 게 있어서 질문드립니다. 1. ObjectProvider.getObject()를 호출하는 시점까지 request scope bean의 생성을 지연한다고 설명해주셨는데요. provider를 사용하지 않는다면 스프링 어플리케이션을 실행하는 시점에 싱글톤 빈은 생성해서 주입이 가능하지만, request scope bean은 실제 고객 요청이 오지 않아 생성되지 않는 문제가 생기잖아요? 그런데 제가 조금 헷갈린 건 실제 고객 요청이 오기 전이라 request scope bean이 생성되지 않는데 왜 윗 문단처럼 request scope bean의 생성을 지연한다고 말씀하신걸까요?ㅠㅠ 궁금한 점은 고객이 요청하기 전에는 scope빈이 생성되지 않는데 그걸 왜 http 요청이 오기전까지 지연을 시키는 지 입니다... 감사합니다.