묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결실전! 스프링 데이터 JPA
assertThat관해서 질문있습니다
assertThat(A).isEqualTo(B); assertEquals(A,B); 두가지 같은것이 맞나요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part9: MMO 컨텐츠 구현 (DB연동 + 대형 구조 + 라이브 준비)
이해한 것이 맞나 궁금합니다.
플레이어가 disconnected될 때 게임룸에서 Push를 하여 LeaveGame을 예약을 했었는데요. 현재 JobSerializer를 상속하는게 DbTransaction과 GameRoom 두 개가 있는데 쉽게 두 개의 쓰레드가 있다고 생각하면 되는지 모르겠습니다. 하나의 게임룸에서 일감이 - 플레이어A의 LeaveGame - 플레이어B의 전투 - 플레이어C의 전투 ... 이렇게 쌓여있을 때 플레이어A가 나갔을 때 현재 상태를 DB에 저장한다고 하면 I/O를 처리하는데 시간을 많이 잡아먹으면 플레이어B와 C의 전투 처리 코드가 지연이 되기 때문에, DbTransaction 쓰레드로 DB 일감을 Push하여 거의 같은 시각에 봤을 때 플레이어B의 전투와 플레이어A의 DB 갱신 로직이 처리될 수 있다고 이해했는데 이렇게 생각하면 될까요? 세 지점에 브레이크 포인트를 찍어서 쓰레드를 관찰해봤는데 위에서 차례대로 24132 -> 주쓰레드 -> 9440 이렇게 변화가 있었는데요. 전부 Push로 예약을 하는 입장에서 왜 DbTransaction에 Push한 일감만 주쓰레드에서 처리하는지도 궁금합니다.
-
미해결[리뉴얼] 처음하는 파이썬 백엔드와 웹기술 입문 (파이썬 중급, flask[플라스크] 로 이해하는 백엔드 및 웹기술 기본) [풀스택 Part1-1]
DevTools failed to load source map
GET 버튼을 누르고 consol을 확인하면 그림처럼 메시지가 나옵니다. 해결방법 부탁드립니다.
-
미해결웹 게임을 만들며 배우는 React
인터랙티브 웹 페이지와 같이 쓰려면
안녕하세요, 제로초님. 강좌 정말 잘 보고 있습니다. 감사합니다. (강좌 뒷부분 보다가 이 질문을 어디에 써야 할 지 몰라서 제일 앞 강의에 올립니다.) 개인 프로젝트로 만드는 웹 팬게임에 리액트를 적용해보려고 합니다. 그런데 앞부분이 인터랙티브 웹 페이지라 이 부분은 리액트를 적용할 수 없지 않나 싶더라구요. 화면 제어를 리액트에게 맡기지 않으니까요.. 그래서 인터랙티브 기술을 적용한 html 파일 여러 개와 리액트를 적용할 html 파일 하나를 만들어서 페이지 이동을 시키면 되지 않을까 하는데, 제가 맞게 이해한 건지 궁금합니다.
-
미해결작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
help_text를 제거하려면 어떻게 코드를 추가해야할까요?
class AccountCreateView(CreateView): model = User form_class = UserCreationForm success_url = reverse_lazy('appaccount:hello_world') template_name = 'appaccount/account_user.html' 오늘 진행한 강좌에서 help_text를 제거하려면 어떻게 해야할까요 찾아보니 class UserCreateForm(UserCreationForm): email = forms.EmailField(required=True) def __init__(self, *args, **kwargs): super(UserCreateForm, self).__init__(*args, **kwargs) for field_name in ('email', 'username', 'password1', 'password2'): self.fields[field_name].help_text = '' 이렇게 클래스를 추가하기도 한다는데 어떻게 이용해야할지 잘 모르겠습니다
-
미해결만들면서 배우는 프론트엔드 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); } }