8:10초쯤 printproxy를 호출했을 때 왜 프록시로 출력되나요? CallService 클래스에는 @Transactional 애너테이션이 붙어있지 않은데, 이러면 프록시 대신 실체 객체로 출력돼야 하지 않나요? 혹시, CallService클래스 내부의 internal 메서드에서 @Transactional 애너테이션이 붙어서 프록시로 출력되는건가요? 프록시는 트랜잭션이 시작될 때 생성되는거로 알고 있는데, internal 메서드를 호출하기 전에는 트랜잭션이 시작되지 않아서 실체 객체로 출력돼야된다고 생각했는데.. 제가 어느 부분에서 잘못 생각한지 말씀해 주실 수 있을까요? 감사합니다.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.h2.Driver 라는 에러가 나옵니다. 어떻게 해결해야할까요??
JPA 기술만 사용 할 때는 간단한 쿼리를 JPA가 SQL로 작성해 주고, 복잡한 쿼리가 필요한 경우 개발자가 JPQL을 따로 작성해서 처리합니다. 스프링 데이터 JPA를 사용 할 때는 간단한 쿼리든 복잡한 쿼리든 JPQL로 작성 해 줍니다. 혹시 여기까지 제가 잘못 이해한 부분이 있을까요? 그리고, 스프링 데이터 JPA에서는 SQL 대신 JPQL을 사용하는데 SQL을 사용하지 않는 이유를 알 수 있을까요? 어차피 JPQL은 SQL로 해석되기 때문에 JPQL로 작성하든 SQL로 작성하든 차이는 없을 것 같은데.. 궁금증에 여쭤봅니다. 남은 연휴 잘 보내시고 좋은 하루 되세요~~
Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module 다음과 같은 에러 나시면 plugin 에 <groupId>org.asciidoctor</groupId> <artifactId>asciidoctor-maven-plugin</artifactId> <version>2.1.0</version> 버전을 최신으로 업데이트 하심 해결됩니다.
안녕하세요! 강의를 들으며 결국 HandlerAdapter는 내부 로직을 통해 핸들러 종류에 관계없이 ModelAndView를 생성해 DispatcherServlet에게 전달해준다고 이해했습니다. 그렇다면, @ResponseBody 등을 사용해 HTTP 메시지 바디에 값을 직접 입력하는 경우에도 ModelAndVIew가 반환되나요? ModelAndVIew 가 내부적으로 뭔가 HTTP 메시지 바디를 그대로 들고있을 수 있는 field 같은 것이 있는건지 궁금합니다. 감사합니다!
안녕하세요 개인프로젝트 하며 딱 고민하고있던 부분이었는데 강의로 듣게되어 너무 기뻤습니다.. 현재는 mybatis로 진행을하고있는 토이프로젝트인데 jpa를 학습하고 나면 jpa로도 변경할 생각입니다 사실 service에서 mapper로 직접 의존할까 고민했었는데 나중에 JPA로 변경한다했을때 service를 건드려야될것 같아서 고민이 되더라구요.. 1 . service-repository-mapper 의 구조였는데 이런경우에는 중간에 repository가 있는게 가치가 있을수 있다 로 해석하면 될까요? 2 . 간단한방식을 추천하셨는데 만약 저처럼 계획을 하고있다고 한다면 똑같이 간단한방식으로 하실것인지 아니면 repository를 둘것인지 궁금합니다. 물론 아주 간단한 프로젝트겠지만요
안녕하세요. 강의 잘 듣고있습니다! 다름이 아니라 요청마다 쓰레드를 생성하여 다중 요청에 대응하는 부분을 보고 질문이 생겨서 남깁니다. servlet은 서블릿 컨테이너에 의해 싱글톤으로 관리되는 것으로 배웠는데, 기존 쓰레드가 요청 1을 servlet을 사용하여 처리하고 있는 와중에 새로운 요청 2가 들어와서 새로운 쓰레드가 생성되고 servlet을 사용하려고 하면 이미 요청 1이 servlet을 사용하고 있기 때문에 사용할 수 없지 않은지 질문드립니다. 감사합니다.
1:07분에서 하는 것처럼 똑같이 해서 터미널로 들어가서 bin폴더까지 접근해서 거기서 cat h2.sh를 하면 영상처럼 똑같이 나옵니다. 그래서 다음 단계인 ./ h2.sh 를 했는데 permission denied라는 문구가 출력됩니다. 그래서 sudo ./h2.sh를 할 경우 sudo: ./ h2.sh : command not found 라는 문구가 출력됩니다. h2-1.4.199.jar h2.bat h2.sh h2w.bat a@aui-iMac bin % cat h2.sh #!/bin/sh dir=$(dirname "$0") java -cp "$dir/h2-1.4.199.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console "$@" a@aui-iMac bin % ./h2.sh zsh: permission denied: ./h2.sh a@aui-iMac bin % sudo ./h2.sh Password: sudo: ./h2.sh: command not found 혹시 이럴때는 어떻게 해결해야 되나요?
섹션 3 - 새로운 할인정책 개발 강의에서 test 코드에서 RateDiscountPolicy discountPolicy = new RateDiscountPolicy(); 관련하여 질문 있습니다. Q1. 다른 test 코드에서는 자료형에 인터페이스 명을 적어서 선언했는데 이번엔 구현체 명을 적어서 선언한 이유가 있나요 ? Q2. 그렇지 않다면, 인터페이스 명으로 자료형을 선언할 때와 구현체 명을 선언할 때 차이점과 어떠한 상황에서 선언이 되어야 하는지 궁금합니다 !
안녕하세요 강사님! 수업 너무 잘 듣고 있습니다. 다름이 아니라 설명하시는 도중 18:20 가량 부터 잠깐 하시는 말씀에 대해 조금 이해가 덜 된 것 같아서 질문을 좀 드리고 싶어서 글을 남기게 되었습니다. 1. 설계하고 돌려서 테이블 생성된 것을 보고 원하는 대로 만들어졌는지 확인하는 것을 반복하라 >> DB 테이블에 칼럼들 들어간 모습들과 내가 원하는대로 들어갔는지 확인하면서 해라! 라는 말씀으로 이해하면 되는 걸까요? 2. 생성된 것을 그대로 쓰면 안된다(?) >> 제가 실무를 혼자서 진행해보고 DBA 분들과 얘기를 해본적이 없어서 이해가 잘 안됐을 수도 있는데, 혹시 이부분에서 말씀하시는 그대로 쓰면 안된다는게 어떤 부분인지 조금 더 말씀해주실 수 있을까요? Script 란 DB sql 들어가는 글들을 말씀하시는 것 같은데, 해당 SQL 을 따로 뽑아서 한번 쭉 본 후에 JPA DDL-AUTO 기능을 사용하지 말고 직접 DB workspace 같은 공간에 직접 import 를 해주는 방식으로 하라는 말씀이실까요? 도움주셔서 감사합니다!
테스트 실행 시 아래와 같은 오류가 나는데 어떻게 해결할 수 있을까요..? java.lang.IllegalStateException: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Connection is broken: " java.net .SocketException: 현재 연결은 사용자의 호스트 시스템의 소프트웨어의 의해 중단되었습니다: localhost " [90067-214] at hello.jdbc.connection.DBConnectionUtil.getConnection( DBConnectionUtil.java:21 ) at hello.jdbc.connection.DBConnectionUtilTest.connection( DBConnectionUtilTest.java:14 ) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:77 ) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43 ) at java.base/java.lang.reflect.Method.invoke( Method.java:568 ) 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:1511 ) 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:1511 ) 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.h2.jdbc.JdbcSQLNonTransientConnectionException: Connection is broken: " java.net .SocketException: 현재 연결은 사용자의 호스트 시스템의 소프트웨어의 의해 중단되었습니다: localhost " [90067-214] at org.h2.message.DbException.getJdbcSQLException( DbException.java:678 ) at org.h2.message.DbException.getJdbcSQLException( DbException.java:477 ) at org.h2.message.DbException.get( DbException.java:212 ) at org.h2.engine.SessionRemote.connectServer( SessionRemote.java:437 ) at org.h2.engine.SessionRemote.connectEmbeddedOrServer( SessionRemote.java:325 ) at org.h2.jdbc.JdbcConnection.<init>( JdbcConnection.java:122 ) at org.h2.Driver.connect( Driver.java:59 ) at java.sql/java.sql.DriverManager.getConnection( DriverManager.java:681 ) at java.sql/java.sql.DriverManager.getConnection( DriverManager.java:229 ) at hello.jdbc.connection.DBConnectionUtil.getConnection( DBConnectionUtil.java:17 ) ... 70 more Caused by: java.net .SocketException: 현재 연결은 사용자의 호스트 시스템의 소프트웨어의 의해 중단되었습니다 at java.base/sun.nio.ch.NioSocketImpl.implRead( NioSocketImpl.java:325 ) at java.base/sun.nio.ch.NioSocketImpl.read( NioSocketImpl.java:350 ) at java.base/sun.nio.ch.NioSocketImpl$1.read( NioSocketImpl.java:803 ) at java.base/java.net.Socket$SocketInputStream.read( Socket.java:966 ) at java.base/java.io.BufferedInputStream.fill( BufferedInputStream.java:244 ) at java.base/java.io.BufferedInputStream.read( BufferedInputStream.java:263 ) at java.base/java.io.DataInputStream.readInt( DataInputStream.java:393 ) at org.h2.value.Transfer.readInt( Transfer.java:270 ) at org.h2.engine.SessionRemote.done( SessionRemote.java:603 ) at org.h2.engine.SessionRemote.initTransfer( SessionRemote.java:163 ) at org.h2.engine.SessionRemote.connectServer( SessionRemote.java:433 ) ... 76 more Process finished with exit code -1
안녕하세요! 논리 뷰 이름 획득 이후 적합한 ViewResolver를 찾는 방식에 대해 질문드립니다. HandlerAdapter 때와 비슷하게 ViewResolver에 메시지를 보내 특정 논리 뷰 이름에 대응하는 View를 생성할 수 있는 ViewResolver인지(?) 확인하는 방식으로 찾게 되는건가? 하고 생각했는데 이러한 방식이 맞는 것일지 궁금합니다! 감사합니다.