묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결만들면서 배우는 프론트엔드 DO IT 코딩 (Next.js, Typescript)
publicRuntimeConfig 질문
client 단에서 사용하기 위해 publicRuntimeConfig setting을 한다고 하셨는데, server 단과 client 단 둘다 동시에 적용하는 방법 중에,.env 파일 안에, NEXT_PUBLIC_ 을 붙이는 방법도 있는 것으로 알고 있습니다. 2개의 차이점이 있을까요? 감사합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
테스트 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요 JPA 테스트 실행시 나타나는 오류입니다..... 원인을 잘 모르겠습니다 H2 켜놓은 상태입니다 Failed to load ApplicationContext java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124) at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8(ClassBasedTestDescriptor.java:363) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:368) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9(ClassBasedTestDescriptor.java:363) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:362) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:283) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:282) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) 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:1541) 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:108) 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:96) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) 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.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) at com.sun.proxy.$Proxy2.stop(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193) at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71) at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memberController' defined in file [C:\study\hello-spring\build\classes\java\main\hello\hellospring\controller\MemberController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberService' defined in class path resource [hello/hellospring/SpringConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.service.MemberService]: Factory method 'memberService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberRepository' defined in class path resource [hello/hellospring/SpringConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.repository.MemberRepository]: Factory method 'memberRepository' threw exception; nested exception is java.lang.ClassCastException: class com.sun.proxy.$Proxy93 cannot be cast to class javax.sql.DataSource (com.sun.proxy.$Proxy93 is in unnamed module of loader 'app'; javax.sql.DataSource is in module java.sql of loader 'platform') at app//org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) at app//org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at app//org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at app//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at app//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at app//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) at app//org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at app//org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at app//org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) at app//org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) at app//org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at app//org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:132) at app//org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) at app//org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) ... 85 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberService' defined in class path resource [hello/hellospring/SpringConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.service.MemberService]: Factory method 'memberService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberRepository' defined in class path resource [hello/hellospring/SpringConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.repository.MemberRepository]: Factory method 'memberRepository' threw exception; nested exception is java.lang.ClassCastException: class com.sun.proxy.$Proxy93 cannot be cast to class javax.sql.DataSource (com.sun.proxy.$Proxy93 is in unnamed module of loader 'app'; javax.sql.DataSource is in module java.sql of loader 'platform') at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) at app//org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at app//org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at app//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at app//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at app//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at app//org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at app//org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) at app//org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ... 103 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.service.MemberService]: Factory method 'memberService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberRepository' defined in class path resource [hello/hellospring/SpringConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.repository.MemberRepository]: Factory method 'memberRepository' threw exception; nested exception is java.lang.ClassCastException: class com.sun.proxy.$Proxy93 cannot be cast to class javax.sql.DataSource (com.sun.proxy.$Proxy93 is in unnamed module of loader 'app'; javax.sql.DataSource is in module java.sql of loader 'platform') at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ... 117 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberRepository' defined in class path resource [hello/hellospring/SpringConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.repository.MemberRepository]: Factory method 'memberRepository' threw exception; nested exception is java.lang.ClassCastException: class com.sun.proxy.$Proxy93 cannot be cast to class javax.sql.DataSource (com.sun.proxy.$Proxy93 is in unnamed module of loader 'app'; javax.sql.DataSource is in module java.sql of loader 'platform') at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) at app//org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at app//org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at app//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at app//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at app//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at app//org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:362) at app//org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:334) at app//hello.hellospring.SpringConfig$$EnhancerBySpringCGLIB$$5a22a17.memberRepository(<generated>) at app//hello.hellospring.SpringConfig.memberService(SpringConfig.java:27) at app//hello.hellospring.SpringConfig$$EnhancerBySpringCGLIB$$5a22a17.CGLIB$memberService$0(<generated>) at app//hello.hellospring.SpringConfig$$EnhancerBySpringCGLIB$$5a22a17$$FastClassBySpringCGLIB$$c576d6fc.invoke(<generated>) at app//org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) at app//org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) at app//hello.hellospring.SpringConfig$$EnhancerBySpringCGLIB$$5a22a17.memberService(<generated>) at java.base@11.0.15/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base@11.0.15/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base@11.0.15/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base@11.0.15/java.lang.reflect.Method.invoke(Method.java:566) at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 118 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [hello.hellospring.repository.MemberRepository]: Factory method 'memberRepository' threw exception; nested exception is java.lang.ClassCastException: class com.sun.proxy.$Proxy93 cannot be cast to class javax.sql.DataSource (com.sun.proxy.$Proxy93 is in unnamed module of loader 'app'; javax.sql.DataSource is in module java.sql of loader 'platform') at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ... 141 more Caused by: java.lang.ClassCastException: class com.sun.proxy.$Proxy93 cannot be cast to class javax.sql.DataSource (com.sun.proxy.$Proxy93 is in unnamed module of loader 'app'; javax.sql.DataSource is in module java.sql of loader 'platform') at hello.hellospring.repository.JdbcMemberRepository.<init>(JdbcMemberRepository.java:17) at hello.hellospring.SpringConfig.memberRepository(SpringConfig.java:34) at hello.hellospring.SpringConfig$$EnhancerBySpringCGLIB$$5a22a17.CGLIB$memberRepository$1(<generated>) at hello.hellospring.SpringConfig$$EnhancerBySpringCGLIB$$5a22a17$$FastClassBySpringCGLIB$$c576d6fc.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) at hello.hellospring.SpringConfig$$EnhancerBySpringCGLIB$$5a22a17.memberRepository(<generated>) 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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 142 more .
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
몽구스 에러 원인을 모르겠어요
왜이럴까요?
-
미해결홍정모의 따라하며 배우는 C언어
10:39 질문 있습니다.
앞에서 1점 뭐뭐는 항상 있다고 하시는데 nomalize significand의 성질때문인것 같긴 하지만 어떤 연관이 있는지 잘 모르겠습니다.
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
도메인 변수 타입
domain에서 id를 Long 타입으로 만들었는데 왜 정수형인 Long타입으로 해줘야 하는 건지 궁금합니다. id라는건 말그대로 우리가 화면에서 aaa123이런식으로 받는거를 뜻하는게 아닌가요? 저는 String으로 해줘야 한다고 생각했는데 Long 타입으로 하셔서 이해를 못하겠습니다.
-
해결됨코딩은 실전이다! - Git알못을 위한 깃린이코스(Git, Github 실습위주)
슬랙 초대 부탁드립니다!
arrrasun25@gmail.com
-
해결됨데이터베이스 중급(Modeling)
1:M 과 M:N 선택 질문
안녕하세요. 강사님. 수업 잘 듣고 있습니다. 제가 고민하던 부분과 연결시키면서 수업 듣고 있었는데 아직 고민이 되어 의견을 여쭤보고 싶어 질문 드립니다. 상품 테이블은 이미 있고 그 상품을 검색하는 해시태그(#) 검색 기능을 추가하기 위한 테이블 추가가 필요합니다. 기능은 1) 해시태그로 해당 해시태그가 등록된 상품을 검색 가능해야 합니다. 2) 상품별 해시태그도 알 수 있어야 합니다. 테이블 구성이 1:M 과 M:N 중에 고민이 됩니다. 상품과 태그는 1:M 수업에서 예로 들어주셨던 책-목차 처럼 '상품별 태그' 로 표현 가능하고 선천적으로 부모 자식 관계 같기도 하면서, 비지니스 관계처럼 '태그로 상품을 검색한다.' 가 표현이 됩니다. 하나의 상품이 여러 해시태그를 가질 수 있고, 하나의 해시태그도 여러 상품에 해당될 수 있으니 M:N 이 더 맞다고 생각이 들고 이렇게 진행하려는데 1:M 도 가능하지 않나 라는 의문이 남아서요. 1 테이블이 상품 테이블이면 M 테이블에서 컬럼을 상품ID(FK,PK), 해시태그(PK) 두개로 하면 기능적으로 다 가능합니다. 이런 경우는 1:M, M:N 중에 어떤 것이 더 나은 방향인지를 선택하는 기준이 있을까요?
-
미해결Three.js로 시작하는 3D 인터랙티브 웹
map에 관해 궁금한 것이 있습니다
map과 관련된 속성이 많은데, JS의 map과 뜻이 다른 것 같아서 질문을 남깁니다. Three.js에서 map이라는 단어가 가지는 의미가 뭔가요??
-
미해결스프링 핵심 원리 - 고급편
프록시로 감싼 빈에 대한 재사용성 질문
안녕하세요 ! 스프링 컨테이너에서 빈을 가져와 프록시 기능이 필요할 경우 프록시로 래핑을 해주는걸로 아는데 이 때 프록시 객체로 래핑한 결과물은 1회성으로 사용하고 버리나요? 아니면 그 또한 재사용을 위해 어딘가에 캐싱을 해두나요?
-
미해결[하루 10분|Web Project] HTML/JS/CSS로 나만의 심리테스트 사이트 만들기
이미지 표시가 되지 않습니다.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 올려주신 MYMBTI-main 파일 안에 비주얼스튜디오 코드 폴더 열어서 했는데 이미지 표시가 안되요ㅠㅠ 어떻게해야 할까요?
-
미해결이미지 관리 풀스택(feat. Node.js, React, MongoDB, AWS)
DB에서 불필요한 데이터 제거하고 전송하기
현재 프론트쪽으로 document의 모든 데이터( _id, createdAt, updatedAt, _v 포함)를 보내주는데, 보내주고 싶지 않은 데이터만 빼서 보내주려면 어떻게 해야하나요? 특히, user라는 document가 있을경우, 많은 필드 중에서 password 정보만 빼고 보내준다던가, 이런 경우요
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
print라고 입력했더니, 오류가 뜹니다.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
@ModelAttribute 생성자
1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]여기에 질문 내용을 남겨주세요. ModelAttribute 사용시, 객체를 생성한후 프로퍼티바운딩을 해준다고 배웠는데, Item 클래스에는 기본생성자가 없어서 객체를 어떻게 만드나 궁금해서 soutm을 찍어보니 Item(String name, Integer price, Integer quntity) 생성자를 호출해 주더라고요, 그리고 Item 클래스에 Item() 생성자를 만들어주면 ModelAttribute이용시에 Item()생성자를 호출하는것을 확인했습니다. 여기에서 질문하겠습니다. ModelAttribute 사용시 객체를 생성할때, 여러생성자가 있다면, 어떤 생성자가 호출되는지 메커니즘이 있나요?
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
서블릿
그전에 서블릿과 파일 업로드 할때는 스프링을 아예 사용안하고 순수하게 자바코드로만 이용해서 한건가요?
-
미해결Java TPC (생각하고, 표현하고, 코딩하고)
클래스 내부의 인스턴스 메서드 끼리의 호출
이 강의로 자바 기초를 다지면서 자바 알고리즘 강의도 듣고있습니다. 강의를 듣다가 궁금해진게 한 클래스 내부에서 static main 메서드 안에서 인스턴스 메서드를 호출할때는 Main클래스를 생성해서 호출하지만 재귀함수나 두개 이상의 인스턴스 메서드끼리 상호작용 할 때는 객체를 생성하지 않고 클래스 이름도 붙이지 않고 바로 메서드를 사용할수있는데 이는 어떤경우일까요? 답변주시면 감사하겠습니다. 아래 코드는 예시입니다. solution 메서드에서 DFS메서드호출하는부분이 궁급합니다 class Main { static int n,m,answer =0; static int[] dx = {-1, -1, 0, 1, 1, 1, 0,-1}; static int[] dy = { 0, 1, 1, 1, 0,-1,-1,-1}; public void DFS(int x, int y, int[][] board) { for(int i=0;i<8;i++) { int nx=x+dx[i]; int ny=y+dy[i]; if(nx>=0 && nx<n && ny>=0 && ny<n && board[nx][ny]==1) { board[nx][ny]=0; DFS(nx,ny,board); } } } public void soulution(int[][] board) { for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { if(board[i][j]==1) { answer++; board[i][j]=0; DFS(i,j,board); } } } } public static void main(String[] args) { Main T = new Main(); Scanner kb = new Scanner(System.in); n=kb.nextInt(); int[][] arr = new int[n][n]; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { arr[i][j]=kb.nextInt(); } } T.soulution(arr); System.out.println(answer); } }
-
해결됨자바 ORM 표준 JPA 프로그래밍 - 기본편
엔티티로 승격되지 않은 테이블은 JPA에서 어떻게 사용할 수 있나요?
JPA 강의 도중에 "모든 테이블을 엔티티로 바를 순 없다"고 얘기하셨던 게 기억나요. 어떤 강의였는 지 정확히 기억이 나진 않습니다. 엔티티 코드로 명시되지 않은 테이블은 어떻게 사용할 수 있는지 궁금합니다. JPA Native 쿼리로 써야하나요? 아니면 값 타입으로 정의를 해야할까요? 예를 들면, 특정 년도의 통계를 저장하는 테이블을 말할 수 있을 것 같아요. Member, Order, Delivery, OrderItem, Item 같은 테이블이 아니라 단순히 값만 뽑아서, 화면에 뿌리는 용도로 사용되는 테이블이요. 이런 테이블 같은 경우, 컬럼이 수십개가 넘어서, 이 컬럼들을 전부 Attribute로 정의해서 엔티티로 만들어야 하는지 의구심이 생깁니다. 또 이런 테이블은 용도상 객체 내부에서 이뤄질 연산이 거의 없기도 합니다.
-
미해결
인텔리제이 클래스가 안보여요..
보통 좌측에 패키지, 클래스 등 있었는데 어느순간 안보입니다 ㅠㅠ 검색해도 그 툴바의 이름을 모르니까 어떻게 검색해야할지도 모르겠고.. 알려주시면 감사하겠습니다!!!!
-
미해결CS 지식의 정석 | 디자인패턴 네트워크 운영체제 데이터베이스 자료구조
디자인 패턴 구현코드에 대해
책에 나와있는 대부분의 코드 설명은 자바스크립트로 되어있던데 이유가 있을까요?
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
WAS에 관해서...
서블릿 컨텍스트가 request 반환해주는 걸로 아는데 궁금한게 있는데요 http로 요청이 일어날때 request를 만드는걸로 알고있는데 이 request객체를 코드로 구현을 할 수 있는건 스프링에서 와스와 호환?이 돼서 할수있는건가요? 스프링 자체에서 무슨 설정이 되어있나요?
-
미해결[NarP Series] MVC 프레임워크는 내 손에 [나프1탄]
servlet 에서 로직과 화면을 담당하는 것을 뭐라고 하나요 ??
찾아보니깐 모델1, 모델2 방식은 아닌거 같은데 jsp를 사용하지 않는 그냥 servelt 방식인가요 ??