안녕하십니까 선생님의 강의 정말 유익하게 잘 보고 있습니다. 다름이아니라 상품주문 test 를 하게되면 ==== 오류 org.springframework.dao.InvalidDataAccessApiUsageException: id to load is required for loading; nested exception is java.lang.IllegalArgumentException: id to load is required for loading 이런식으로 납니다.그래서 id가 자동으로 생성이 안되는내용이라서 @GenereatedValue 가 이미 Item 에 id 에 선언되어있고 혹시나 해서 setId로 id 값 지정후 해보니 그다음으로는 == 오류 전문 java.lang.NullPointerException at jpabook.jpashoop.service.OrderService.order(OrderService.java:41) at jpabook.jpashoop.service.OrderService$$FastClassBySpringCGLIB$$f6e85b24.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) at jpabook.jpashoop.service.OrderService$$EnhancerBySpringCGLIB$$ac50f3a2.order(<generated>) at jpabook.jpashoop.service.OrderServiceTest.상품주문(OrderServiceTest.java:44) 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.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686) 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$6(TestMethodTestDescriptor.java:212) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:208) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248) at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211) at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53) 이런식으로 NullPointEception 이 일어납니다. 혹시 이렇게 되면 item class가 문제인지 또는 service 와 repository 문제인지 혹시 알고싶습니다.
이클립스 환경인데요, build과정에서 오류가나서 프로젝트를 지우고 다시 불러왔는데 아예 gradle 라이브러리 인식을 못합니다.. ㅠㅠ 구글링을 엄청했는데도 못고쳐서 진도를 못나가고 있어요 The import org.springframework cannot be resolved 오류이름은 이거에요
강의 내에서는 Init()로 순서와 상관없이 매니저 오브젝트를 생성하고 불러올 수 있게 했지만, 또 이후에도 비슷한 방법으로 처리를 하면 되겠지만 유니티 동작 순서를 알고 싶어서 질문드립니다. Managers.cs와 Player.cs 처럼 여러 오브젝트에 여러 스크립트가 있을 경우 void Start()와 Update()를 호출하는 순서가 궁금합니다. 그리고 이 순서가 맘에 들지 않는다면 순서를 바꾸는 방법이 있을까요?
안녕하세요 마지막 DummyClient에서 ServerCore로 계속해서 요청 보내는 부분에서 이상한 에러가 나서 문의드립니다. ServerCore 쪽에서는 RegisterAccept에서 pending이 True 로 반환되고, DummyClient에서는 Connection refused Exception이 발생하네요 ㅠ System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (61): Connection refused 192.168.35.35:7777 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at DummyClient.Program.Main(String[] args) in /Users/hun/Projects/Server/DummyClient/Program.cs:line 28 혹시 의심될만한 부분이 있을까요?
안녕하십니까? 강의 영상 모두 결제해서 잘 보고 있습니다. 바로 본론부터 말씀 드리면, 회사에서 여러개의 프로젝트를 준비하고 있고 그중 자주 쓰이는 공통적인 기능을 ( 회원, 게시판 등 ) 만들어 놓고 프로젝트마다 재활용하여 시간을 단축하자는 의견이 나왔습니다. 그래서 JPA 에서 사용하는 entity 도 인터페이스와 추상클래스를 사용해서 설계를 해보라고 해서 진행중에 있습니다. 들어가기 앞서, 스프링 프로젝트의 코드를 살펴보면 인터페이스를 잘 사용해서 설계를 잘 했다고 생각하고 있습니다.그러나 데이터베이스와 직접적인 연관이 없는 코드라서 자유롭게 쓸수 있었던것 같은데요. JPA 를 쓰고 있는 입장에서 인터페이스와 추상클래스를 사용해서 다형성을 구현할려고 할때마다 한계에 자꾸 봉착하는 느낌이 듭니다. 결국 도메인 클래스는 CRUD 가 중요한데, 인터페이스로는 실제 구현된 클래스가 뭔지 알수 없어 사용하기가 난감합니다. Item 과 Book 과 같이 강하게 결합 하는것에 대해서는 어느정도 수긍이 갑니다만, 거의 대부분은 그렇게 강하게 연결되는 경우가 잘 없는거 같아서요. 인터페이스를 쓰는경우도 잘 못본거 같습니다. 실무에서는 인터페이스와 추상클래스를 어느 정도 까지 사용하는지궁금합니다.
선생님 안녕하세요. 우선 정말 이 수업을 개설해 주셔서 정말정말 감사하다는 말씀 드립니다. 프로젝트 수업으로 스프링 프레임워크에서 스트레스를 엄청 받다가 선생님의 강의를 듣고 한줄기 희망이 생겼습니다!!! 지금 DB 파트 강의에서 순수 JDBC 듣는 중인데, 원래는 오라클 SQL을 사용하려다 import 하는 부분에서 막히길래, 역시 강의와 다른 걸 쓰려니 힘들구나 싶어서ㅜㅜ 우선은 그냥 수업에서 사용하시는 H2로 다시 시도하고 원리를 좀 깨친 다음에 오라클로 재시도 하려 했습니다만.... 결국은 똑같은 곳에서 문제가 생기길래 이렇게 질문을 드립니다. H2에서 DB 생성하고, build.gradle에서 의존성 주입했고, application.properties에 url, driver-class-name까지 설정은 완료한 상태입니다. 그러고나서 JdbcMemberRepository 코드를 작성했는데, 이상하게 이 부분만 import에서 오류가 생깁니다. import org.springframework.jdbc .datasource.DataSourceUtils; (밑줄 친 부분에 오류가 있다고 빨간 줄이 생김) 에러메시지는 "The import org.springframework.jdbc cannot be resolved" 라고 뜨고, 클래스를 새로 생성하라는 식으로만 나오고 있습니다 ㅜㅜ 강제로 실행시키면 다음 메시지가 나옵니다. " Description: Parameter 0 of constructor in hello.hellospring.SpringConfig required a bean of type 'javax.sql.DataSource' that could not be found. The following candidates were found but could not be injected: - Bean method 'dataSource' in 'JndiDataSourceAutoConfiguration' not loaded because @ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType' - Bean method 'dataSource' in 'XADataSourceAutoConfiguration' not loaded because @ConditionalOnClass did not find required class 'javax.transaction.TransactionManager' Action: Consider revisiting the entries above or defining a bean of type 'javax.sql.DataSource' in your configuration. " 사용 환경은 윈도10 / Eclipse EE / Spring boot 2.3.3. 입니다. 수업을 착실히 들었다고 생각했는데 혹시 설정 같은 걸 빼먹은 게 아닌지 싶은데, 구글링해도 답을 얻을 수 없어 여쭤봅니다. 감사합니다 !!
안녕하세요. 김영한 강사님. 이번 강의를 듣던 도중 실무 이야기를 몇번 하셨는데요. sequence 변수에 대해 궁금하 점이 생겼습니다. Member를 save할때마다 id 값을 1씩 증가시켜주는데요. 이건 DB기반이 아니라 메모리 기반이기 때문에 id값을 이렇게 임의로 정해주는 것인가요? 실무에서 DB는 id 값을 auto increment를 주지 않고 이런 식으로 sequence를 올려가며 회원 저장마다 id값을 지정해주는 건가요? 제가 이해한것이 맞다면 서버가 재가동 될때마다 모든 회원 DB를 다 읽어와야 하는 시스템인것 같은데 제가 이해한바가 맞는지요.. 너무 궁금해서 그냥 넘어갈수가 없었습니다. 감사합니다.
좋은 강의 감사합니다. 조회 v3.1에서 to One 관계는 모두 페치 조인하고 나머지 컬렉션은 지연로딩을 유지했을때 다음과 같은 에러가 발생합니다. query specified join fetching, but the owner of the fetched association was not present in the select list 고심하던 중 @Query부분을 value 와 countQuery로 나눠어서 처리 한 결과 정상적으로 조회 됬습니다.(Spring Data Jpa사용) 예) @Query(value = "select u from User u join fetch u.store s", countQuery = "select count(u) from User u") Page<User> findAllUser(Pageable pageable); 꼭 countQuery를 사용해야 하는지 궁금합니다.
indx.html을 /src/main/resourcee/static/index.html을 넣어도 못찾네요 hello예제에서는 "template might not exist or might not be accessible by any of the configured Template Resolvers" 로 나오네요 경로가 차이가 있는건지 모르겠습니다. 아래는 grandle 설정입니다 어떤 문제가 있는건지 모르겠습니다. plugins { id 'org.springframework.boot' version '2.1.16.RELEASE' id 'io.spring.dependency-management' version '1.0.9.RELEASE' id 'java' } group = 'jpabook' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' }
이 Post Process 강의에 다른 분이 올려주신 질문과 저도 똑같은 문제인데요 ㅠㅠ 코드 다 똑같이 따라했는데 좀비들이 처음 시작하고 랜덤한 위치로 각자 달려가서 각자의 위치에 자리잡은 이후엔 순찰하지 않고 제 자리에서 멍때립니다. 그리고 좀비랑 맞닿을 정도로 앞까지 가야 그제서야 플레이어를 인지 합니다 다른 분 질문에 업데이트 해주시겠다고 댓글 남기셨던데 이에 대한 사항을 어디서 확인할 수 있을까요!