묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
순수 jdbc 회원 목록 IllegalStateException 라이브러리 에러
ERROR 7708 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.IllegalStateException: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection] with root cause JdbcMemberRepository 클래스에서 pdf파일을 복붙한 후 전체 Run 누르고 localhost에서 회원 목록을 조회했더니 웹에서 실행이 안됩니다.라이브러리가 안 맞아서 에러가 난 것 같은데 구글링에서 찾아봐도 없어서 질문 올립니다.라이브러리만 따로 수정할 수 있나요?아니면 저 클래스만 다시 작성해야 될까요?앞으로도 스프링부트 쓰다 보면 에러가 계속 날 수도 있는데 spring 홈페이지에서 관련 문서를 찾아보면 될까요?어떻게 하면 될까요?
-
미해결처음 만난 리액트(React)
목소리 너무 좋습니다
마음이 안정 됩니다 너무 설명도 잘하고 쉽고 유료강의보다 5천억만배 최강으로 최고 입니다
-
해결됨CS 지식의 정석 | 디자인패턴 네트워크 운영체제 데이터베이스 자료구조
128p UDP+IPv6 로 사용할 때 체크섬필드 사용 설정해야 하는 이유?
UDP 사용할 때 체크섬필드 선택사항이지만 UDP+IPv6 로 사용할 때 체크섬필드 사용 설정해야 하는 이유는IPv4는 체크섬이 있지만 IPv6에는 없기 때문인가요? 'UDP 사용할 때'에서 이 경우는 IPv4와 사용할 때를 가리키는 것인지요?
-
해결됨CS 지식의 정석 | 디자인패턴 네트워크 운영체제 데이터베이스 자료구조
상위 프로토콜 체크섬 존재와 IPv6의 CRC제외의 연관성
헤더 효율화를 위해 CRC(순환 중복검사)를 제외합니다. 다만 상위 프로토콜(TCP, UDP)에서 체크섬이 있기 때문에 이를 제거할 수 있습니다.이 두 문장의 연결이 이해가 안됩니다. 단순히 접속사를 잘못 쓰신건지요?원래 의도하신 건 '상위 프로토콜에 체크섬이 있기 때문에 IPv6에서 헤더효율화를 위한 CRC제외가 가능하다' 라는 의미인지요?
-
해결됨Flutter 초입문 왕초보편
코드 예제소스
중간에 따라하다가 실수로 뭐가 잘못된건지 따라한 작성내용이 다날라가서혹시 코드소스 있으면 올려주실수있나요?
-
미해결스프링 핵심 원리 - 기본편
스프링 빈 조회
스프링 빈을 왜 test 코드를짜서 검증을 해야하나요? 프레임워크가 자동적으로 컨테이너에 잘 등록했을 텐데 검증하는게 이해가 안가서요
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
Confusion Matrix and Type Errors
Confusion Matrix 의 FN 과 FP 는 혹시 Statistics 학문에서의 Type I Error 와 Type II Error 인가요?
-
해결됨스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
쿠키와 세션의 차이는 무엇인가요??
쿠키는 클라이언트에 저장된다고하는데 그 이유를 모르겠습니다
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
결국 완강을 했습니다!
수강 신청은 몇 달 전에 했는데계속 듣다가 이해가 안가서 좀 쉬다가또 흐름이 끊기고 기억이 사라져 처음부터 다시듣기를 반복하다가 드디어 오늘 거진 3개월 만에완강을 했습니다!최소한의 이해로 따라온 강의지만 꽤 스프링에 대한이해도가 깊어진 것 같습니다ORM인 JPA를 배운 것이 특히 신기하게 집중되고흥미로웠습니다. 복잡한 sql코드를 없앨 수 있어서 그랬던것 같습니다, ㅎㅎ. 모든 로드맵을 구매하였으니 선생님만 믿고 스프링 강의를 무한 반복하여 많은 것을 얻어 가겠습니다!! 감사합니다.
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
vscode 질문
안녕하세요실행 관련해서 이게 될 때도 있고 안 될 때도 있는데 대부분 실행이 안 돼서 질문 남깁니다.ㅜ사진 보시다시피 def랑 print 색깔도 그냥 일반 언어 색깔처럼 처리되고 실행을 해도 자꾸 디버깅 확장 관련 오류 메세지만 떠서요어떤 부분이 잘못 되었는지 알 수 있을까요??
-
해결됨스프링 핵심 원리 - 기본편
IllegalStateException과UnsatisfiedDependencyException이 뜨는데 어디서 잘못됬을까요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용] Test파일 실행을 시켜보면 오류가 발생하는데요 도대체 어떤 이유인지 잘 모르겠습니다. 최대한 제가 스스로 해결해보려다가 안되서 질문을 드려봅니다. 다만 걸리는 부분이 있다면 lombok을 설치할 때 build.gradle이 아니라 bulid.gradle.kts라고 되어 있어서 build.gradle로 파일을 변경 시켜주었습니다. 어떻게 해결할 방법이 있나요? org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'member' defined in file [/Users/leedongyoung/스프링 연습/core/out/production/classes/hello/core/member/Member.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'java.lang.Long' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1352) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1189) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:917) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:93) at hello.core.scan.AutoAppConfigTest.basicScan(AutoAppConfigTest.java:18) 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:727) 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:156) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) 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.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68) 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:147) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) 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:57) 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.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.Long' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1824) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1383) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ... 84 more.----------------------------------------- java.lang.IllegalStateException: Failed to load ApplicationContext for [MergedContextConfiguration@387bf2d9 testClass = hello.core.CoreApplicationTests, locations = [], classes = [hello.core.CoreApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceLocations = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@9da1, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@70fab835, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@32057e6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@53499d85, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@25f9407e, org.springframework.boot.test.context.SpringBootTestAnnotation@c1aac726], contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:142) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:127) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:141) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:97) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:241) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:377) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:382) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:377) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310) 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:762) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:376) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:289) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:288) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:278) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:277) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:105) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:104) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:68) 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: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:147) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) 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:57) 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.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'member' defined in file [/Users/leedongyoung/스프링 연습/core/out/production/classes/hello/core/member/Member.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'java.lang.Long' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1352) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1189) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:917) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1388) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:545) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:184) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:118) ... 72 moreCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.Long' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1824) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1383) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ... 96 more
-
해결됨실전! Querydsl
nullSafeBuilder메서드를 통해 null처리의 한계
개인 프로젝트를 진행하던중 where절의 조건들을 체이닝하는 과정에서 아래코드를 보면 경우 제일 앞에있는 nameLike()메서드가 null일 경우 에러가 발생하였습니다. and 조건일 경우 , 로 체이닝하면 되었지만 or조건들은 무조건 or()을 통해 연결을 해주어야했습니다.query.selectFrom(member) .where(nameLike("infren").or(nameEq("김영한강사님"))) .fetch();BooleanBuilder를 통해 조건을 처리해도되지만인프런 게시판을 통해알게된 nullSafeBuilder메서드를 만들어서 null처리를 하는 방법을 알게되었습니다. 하지만 몇가지 한계점들을 발견하였습니다.eq문에 null이 들어갈 경우에는 정상적으로 작동하였으나like절, 또는 in절에는 상황에 따라서 null을 넣을 경우 like,in문 자체가 파라미터로 null을 받지 못함으로 인해서 eq와는 다르게 작동하는 것을 발견하였습니다.몇 가지 경우의 테스트를 진행해보았습니다.eq절에 null을 넣을경우like절에 null을 넣을 경우 -> NullPointerExceptionin절에 String타입의 null을 넣을 경우in절에 String[] 타입의 null을 넣을 경우in절에 List<> 타입의 null을 넣을 경우 -> NullPointerExceptionin절에 객체(Team) null을 넣을 경우@Test void eq에Null을넣을때(){ String name = null; List<Member> findMember = query.selectFrom(member) .where(nullSafeBuilder(()-> member.username.eq(name))) .fetch(); assertEquals(findMember.size(),4); } @Test() void like절에_Null을_넣을때(){ String name = null; assertThrows(NullPointerException.class, () -> { List<Member> findMember = query.selectFrom(member) .where(nullSafeBuilder(()-> member.username.like(name))) .fetch(); }); } @Test void in절에_String타입의_Null을_넣을때(){ String name = null; List<Member> findMember = query.selectFrom(member) .where(nullSafeBuilder(()-> member.username.in(name))) .fetch(); assertEquals(findMember.size(),4); } @Test void in절에_String배열타입의_Null을_넣을때(){ String name = null; List<Member> findMember = query.selectFrom(member) .where(nullSafeBuilder(()-> member.username.in(name))) .fetch(); assertEquals(findMember.size(),4); } @Test void in절에_List에_Null을_넣을때(){ List<Team> team = null; assertThrows(NullPointerException.class, () -> { List<Member> findMember = query.selectFrom(member) .where(nullSafeBuilder(()-> member.team.in(team))) .fetch(); }); } @Test void in절에_Team타입의_Null을_넣을때(){ Team team = null; List<Member> findMember = query.selectFrom(member) .where(nullSafeBuilder(()-> member.team.in(team))) .fetch(); assertEquals(findMember.size(),4); } public static BooleanBuilder nullSafeBuilder(Supplier<BooleanExpression> f) { try { return new BooleanBuilder(f.get()); } catch (IllegalArgumentException e) { return new BooleanBuilder(); } }where절안에서 사용하는 함수(like, in...등등)에 따라 파라미터 자체에 null을 받지 못함으로인해 nullSafeBuilder를 통해 해결할 수 없는 경우도 있는것 같습니다.이러한 경우에는 강사님께서 알려주셨던 아래와 같은 방법으로 메서드를 통해 파라미터의 null처리를 해주고private BooleanExpression nameLike(String name){ return name != null ? member.username.like(name) : null; }체이닝할 때는 and조건이면 , 를 사용하고, or조건으로 체이닝을 해야할 경우에는 BooleanBuilder객체에 체이닝하는 방식으로 구현을 해야할 것 같습니다.아래는 프로젝트에 적용했던 동적쿼리문 입니다. 앞서 말했듯이 and조건은 ,로 연결하고 or조건들은 Booleanbuilder객체에 체이닝을 하였습니다.//페이징 처리를 하지않은 동적쿼리문 -> 테스트에서 사용 public List<Article> searchBooleanBuilder(ArticleSearchCond cond) { BooleanBuilder builder = new BooleanBuilder(); builder.or(contentLike(cond.getContent()))//글 내용 keyword검색 .or(nickNameLike(cond.getWriter()))//작성자(닉네임) keyword검색 .or(nameLike(cond.getWriter()))//작성자(이름) keyword검색 .or(tagArticleIn(cond.getArticlesByTagValue()))//태그 keyword검색 .or(restaurantNameLike(cond.getRestaurantName()));//음식점명 keyword검색 return query.selectFrom(article) .where( followMembersIn(cond.getFollowMembers()),//팔로우한 유저로 검색 sidoEq(cond.getSido()),//시도로 검색 sigoonEq(cond.getSigoon()),//시군으로 검색 dongEq(cond.getDong()),//동으로 검색 latitudeBetween(cond.getLatitude()),//위도로 검색 longitudeBetween(cond.getLongitude()),//경도로 검색 categoryEq(cond.getCategory()),//음식점 카테고리로 검색 likeArticleIn(cond.getLikeArticles()),//좋아요누른 게시판 검색 builder//keyword조건 검색 ) .orderBy(article.id.desc())//아이디가 높은 것(최신순)으로 내림차순 .limit(20) .fetch(); }아래는 nullSafeBuilder의 한계를 모른 상태로 구현하였던 에러가 발생하는 코드입니다. radioBtnSearchCond(and조건들), keywordSearchCond(or조건으로 연결)안에 nullsafeBuilder로 null처리한 메서드들이 있습니다. public List<Article> searchByNullSafer(ArticleSearchCond cond) { return query.selectFrom(article) .where( radioBtnSearchCond(cond)//라디로 버튼 검색 조건들 .and(keywordSearchCond(cond))//keyword로 검색 조건들 ) .orderBy(article.id.desc())//아이디가 높은 것(최신순)으로 내림차순 .fetch(); }혹시 nullSafeBuilder를 구현 좋은 방법이 있던가, 다른 좋은 방법을 아시는 분이 있으면 알려주시면 감사하겠습니다.
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
join 메소드는 리턴값이 있는데 왜 그냥 호출해도 오류가 안나나요?
안녕하세요! 제목처럼 join 메소드는 회원가입시키고 아이디를 리턴해주는데 왜 테스트케이스는 리턴값을 따로 안받아줘도 오류가 나지않나요?memberService.join(member);-> 따로 Long saveId = memberService.join(member);이렇게 안해줘도 오류가 안나서 궁금합니다!
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진
뭐가 문제인지 모르겠어요 4시간 동안 애쓰고 있답니다...
NullReferenceException: Object reference not set to an instance of an objectUtill.GetOrAddComponent[T] (UnityEngine.GameObject go) (at Assets/Script/Utills/Utill.cs:10)UIManager.ShowPopupUI[T] (System.String name) (at Assets/Script/Mangers/UIManager.cs:23)PlayerControler.Start () (at Assets/Script/PlayerControler.cs:67)먼저 오류 메시지는 이것입니다. 저는 UI_Button 프리펩 위치 Resources-Prefabs-UI-Popup폴더에 있구요UIButton 스크립트 Scripts-UI-Popup 폴더에 있습니다. 이제 코드는 Utill.cs:10 -> T component = go.GetComponent<T>(); UIManager.cs:23 -> T popup = Utill.GetOrAddComponent<T>(go);PlayerControler.cs:67 ->Managers.UI.ShowPopupUI<UIButton>();실행 전 UI_Button 프리펩 딜리트했다가 하이라키에 있는 UI_Button 오브젝트를 다시 프리펩화 한다음 그 오브젝트는 다시 딜리트 하여 실행 해본 결과 UI_Button가 뜨지 않고 저 에러만 납니다.뭐가 문제일까요 ???
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
2-F r선언
#include<bits/stdc++.h> using namespace std; int n, m, j, l, r, temp, ret; int main(){ cin >> n >> m >> j; l = 1, r = l + m - 1; for(int i = 0; i < j; i++){ cin >> temp; if(l <= temp && temp <= r) continue; else if(temp < l){ ret += (l - temp); l = temp; }else{ ret += (temp - r); l += (temp - r); } } cout << ret << '\n'; } #include<bits/stdc++.h> using namespace std; int n, m, j, l, r, temp, ret; int main(){ cin >> n >> m >> j; l = 1; for(int i = 0; i < j; i++){ r = l + m - 1; cin >> temp; if(l <= temp && temp <= r) continue; else if(temp < l){ ret += (l - temp); l = temp; }else{ ret += (temp - r); l += (temp - r); } } cout << ret << '\n'; } 안녕하세요 선생님 질문이 있어 이렇게 글을 남깁니다. r을 반복문 안에다 선언하면 맞고 밖에다 선언하면 틀렸다고 나오는데 도저히 이유를 모르겠습니다.
-
미해결스프링 핵심 원리 - 기본편
@SpringBootApplication안에 싱글톤유지하는 기능이있나요?
[질문 내용]AutoAppConfig에서 @ComponentScan 사용할때는 싱글톤을 사용하기 위해서, @Configuration을 붙여주었는데, 1 . @SpringBootApplication에도 싱글톤 유지하는기능이 있는건가요? 아니면 @Configuration추가로 붙여주어야하나요?2 . @ComponentScan( excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = Configuration.class) ) @Configuration public class AutoAppConfig { }이렇게 순서 바꿔서 코드 작성하면, @Configuration 붙은거 제외시켜서, autoAppConfig 가 등록이 안되어야 하는데, 왜 등록이 되는건가요?
-
미해결파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
if __name__=="__main__" 사용 기준
강사님 안녕하세요 :) 유익한 강의 잘 듣고 있습니다!학습 중 궁금한 점이 있어서 질문드립니다.강사님께서 DFS문제 외에도 코드 시작 부분에 이 코드를 작성하실 때가 종종 있는데 혹시 강사님의 사용 기준이 있는지 궁금합니다.ex) [섹션 8] 회장뽑기(플로이드-와샬) 사용 O vs 위상정렬(그래프 정렬) 사용 X
-
해결됨[NarP Series] MVC 프레임워크는 내 손에 [나프2탄]
root-context.xml의 namespace 질문 있습니다.
http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsdxsd옆에 버전을 쓸 때 mybatis-spring-1.2.xsd1.2라고 적으신 이유가 궁금합니다.mybatis-spring은 pom.xml에서 1.3.1 버전을 받은 것으로 기억합니다.그래서 저는 처음에 1.3.1.xsd로 했더니cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'resources'.라면서 선언을 안 해줬다고 에러가 나옵니다.(실행도 안 됩니다.)그런데 1.2.xsd로 하거나 버전을 적지 않으면 정상적으로 실행되네요.다른 이유가 있을까요...??
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
영속성 컨텍스트 select관련해서 질문드립니다!
EntityManager가 tx종료와 동시에 지워진다고 하셨는데,만약 dml쿼리없이 단순 select만 하게되어서EntityTransaction tx = em.getTransaction(); tx.begin();위의 코드없이 select만 여러번 실행하게될 경우 em가 생겼다 지워졌다 생겼다 지워졌다가 반복된다고 보면 될까요??위와같이 이해를 하여서, 위의 코드를 지우고 아래의 코드를 실행하면, 하나의 트랜잭션으로 묶지 않았기에 두번의 쿼리가 나갈것이라 예상했지만, 쿼리가 한번만 나가는것 같아서요Member member1 = em.find(Member.class, 101L); Member member2 = em.find(Member.class, 101L);
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
리뷰 부탁드립니다.
function solution(a,b){ let answer=0 let n = a.length let m = b.length let len = lt = 0 let char='' let arr =[] let sH = new Map() for(x of b){ if(!sH.has(x)) sH.set(x,1) else sH.set(x, sH.get(x)+1) } for(let rt=0; rt<m; rt++){ char += a[rt] if(sH.has(a[rt])) { sH.set(a[rt], sH.get(a[rt])-1) } if(sH.get(a[rt])==0) { len++ } if(len == sH.size){ answer++ } if(!sH.has(a[rt])) sH.set(a[rt],1) else sH.set(a[rt], sH.get(a[rt])+1) } const copySh = sH console.log(copySh) for(let rt=m; rt<n; rt++){ lt++ char = a.substring(lt, rt) + a.substring(rt, rt+1) if(char.split('').sort().join('')===b){ answer++ } } return answer } let a="bacaAacba"; let b="abc"; console.log(solution(a, b)); 저는 첫번째만 문자열 3개 3개만 hash 사용하여 비교하고 나머지는 sort해서 같은지 비교하는데 이경우도 복잡도 O(n2)일지 궁금합니다..!잘듣고있습니다. 감사합니다