묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
타임리프에서 어떤 부분이 typeMismatch 오류 메시지를 출력하는 건가요
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.<div class="field-error" th:if="${errors?.containsKey('price')}" th:text="${errors['price']}"> 가격 오류 </div>타임리프의 이 부분이 typeMismatch에 대한 메시지 코드인 '숫자를 입력해주세요' 를 출력하는 건가요? 아니면 <input type="text" id="price" th:field="*{price}" th:errorClass="field-error" class="form-control" placeholder="가격을 입력하세요">이 부분의 th:field가 오류 감지하고 출력하는 건가요
-
해결됨블렌더 입문 : UX/UI 디자이너를 위한 3D 아이콘으로 배우는 블렌더!
렌더 이미지가 흐리게 보입니다
제가 보는 렌더 이미지, 추출했을 때 이미지 모두 흐릿하게 보입니다.선명하게 보일 수 있도록 해결할 방법이 있을까요?가장 우측에 렌더링 옵션도 같이 캡쳐했습니다. 렌더링으로 추출한 이미지
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
Oracle12cDialect 오류 해결 방법
(사진)
-
미해결
스프링에서 @CreatedBy 와 AuditorAware 의 활용에 질문 드립니다!
@CreatedBy을 이용하면, 디비에 데이터가 입력될 때마다 작성자의 정보를 자동으로 기입할 수 있어서 많은 분들이 이용하시고 있습니다. 그리고 해당 @CreatedBy 값에 들어 갈 값은 AuditorAware을 통해 만들 수가 있는데요.<Q. 질문>그러나 만일.. 아래와 같이 생성시 점에서 ID 값과 Name 을 입력해 주어야한 다면... AuditorAware를 어떻게 이용해서 아래의 내용을 기입할 수 있는지 알고계신 분 있으실까요?(@CreatedBy 가 특정 AuditorAware 파일을 지정할 수 있으면 될 것 같은데... 방법을 못찾았습니다 ㅠ)@CreatedByprivate Long creatorId;@CreatedByprivate Stirng creatorName;
-
해결됨대용량 채팅 TPS 처리를 위한 웹소켓 통신 만들며 학습하기
app.js를 여러 번 실행했음에도 불구하고, 로그가 단 한 번만 출력됨
app.js를 여러 번 실행했음에도 불구하고, 로그가 단 한 번만 출력됩니다. 포트 충돌 문제인가 해서 8080 포트 죽여보고 9090으로 바꿨는데도 안됩니다. ㅜ[winston을 통한 로깅 설정 및 서버 시작하기] 수강 중입니다.
-
해결됨실전! 스프링 데이터 JPA
gavlyukovskiy 의존성을 추가했는데도 파라미터 로그가 보이지 않슴니다.
안녕하세요 다음과 같이 의존성을 했지만 보이지 않습니다. 무슨 문제가 있을까요?다음과 같이 로그가 뜨며 현재 psy 관련 로그는 보이지 않습니다. dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.7' }
-
미해결[아파치 카프카 애플리케이션 프로그래밍] 개념부터 컨슈머, 프로듀서, 커넥트, 스트림즈까지!
윈도우 연산시 주의해야할 사항 + 기타 질문
윈도우 연산시 주의해야 할 사항에텀블링 윈도우에 한해서 윈도윙이 5초간격이라면커밋 간격도 5초로 맞춰주면굳이 최신 데이터를 어떤 로직처리에 의해서 뽑아줄 필요가 없지 않을까요?스트림 처리할때만 커밋 간격을 윈도우 크기만큼 맞추고, 나머지는 디폴트나 설정한 값으로 처리하면 될것 같은데요이렇게 하는건 어떻게 생각하시는지 궁금합니다 자바의 main 말고 카프카의 데이터를 컨슘해서 프론트엔드로 서빙하는 스프링 예제provectuslabs/kafka-ui의 이미지를 사용해서 도커컴포즈로 브로커를 3대 띄우고 운영한다던지(아무래도 쿠버네티스 환경까지 들어가면 너무 깊어지니깐)스키마 레지스트리와 KSQL 등에 대한 것추가로 2, 3, 4번 예제는 강의에 없는것 같은데 혹시 집필하신 책에 나와있을까요? 많은 내용을 배워서 갑사합니다추가로 현업에서 사용되는 다양한 처리 방법을 조금 더 심도있게 배우고 싶습니다
-
해결됨데이터 리터러시 - 데이터 읽고 쓰기의 기술
dls604 강의가 재생이 안됩니다.
dls604 - 티스토리 GA4 분석 데이터 확보하기해당 강의만 재생이 안되는데 무슨 오류일까요?
-
미해결이득우의 언리얼 프로그래밍 Part2 - 언리얼 게임 프레임웍의 이해
9강 랜덤박스 문제
코드는 강의자료를 통해서 작성하였는데 랜덤박스에 weapon이 들어가있는 것을 확인하려고 하는데 이상하게 weapon이 item으로 생성이 되지않습니다. 단순 운 문제인가 진행해보아도 scroll과 potion만 아이템 박스에 담깁니다.
-
미해결[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
NodeJS 는 왜 싱글 스레드라고 불리는가요?
안녕하세요! 개발을 시작한지 얼마되지 않은 개발자입니다. 수업의 내용을 조금 인용하면 "nodeJS 는 싱글 스레드 모델이고, 이벤트 룹이 앞단에서 nonBlocking 요청 빠르게 수행하고 만일 Blocking 요청이 들어온다면 워커 스레드에 넘긴다. " 라고 이해했습니다.하지만 워커 스레드를 사용하게된다면 그것이 싱글 스레드라는 이름에 맞는건지 의구심이 듭니다. 단순히 이벤트 룹이라는 특정 스레드가 앞단에서 Blocking 요청과 nonBlocking 요청을 구분해서 처리를 하기에 싱글 스레드라는 말이 나온건가요?그리고 이벤트 룹이 Blocking 요청과 nonBlocking 요청을 나누는 기준 또한 궁금합니다.마지막으로 구글링을 하며 본 정보에 의하면 JavaScript 가 싱글 스레드 기반의 언어이고, NodeJS는 스레드 풀을 미리 생성하여 워커 스레드들을 미리 생성해 둔 뒤, 각 워커 노드에서 JavaScript 를 실행하여 멀티 스레드를 가능하게 한다는 글을 보았는데 이 내용이 맞다면 NodeJS 는 싱글 스레드 기반 프레임워크가 아닌것으로 받아드려도 괜찮을까요?
-
미해결[리뉴얼] 처음하는 SQL과 데이터베이스(MySQL) 부트캠프 [입문부터 활용까지]
SQL Server
안녕하세요.컴퓨터공학과 학생인데요 현재 맥북을 사용중인데 SQL Server을 쓰고 싶은데 어떻게 해야되나요?
-
해결됨
김영한 강사님 강의에 대한 오류 질문입니다.
김영한 강사님의 스프링 핵심원리 기본편을 수강하다가 나온 오류입니다.모든 테스트를 실행했는데 이러한 오류가 나왔습니다. 해결책을 알려주시면 감사하겠습니다. java.lang.IllegalStateException: Failed to load ApplicationContext for [MergedContextConfiguration@63bde6c2 testClass = hello.core.CoreApplicationTests, locations = [], classes = [hello.core.CoreApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@58670130, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@59d2103b, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@18518ccf, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@6722db6e, org.springframework.boot.test.context.SpringBootTestAnnotation@e348e9fb], contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:180) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:142) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:98) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) 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 java.base/java.util.Optional.orElseGet(Optional.java:364) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memberServiceImpl' defined in file [C:\study\core\out\production\classes\hello\core\member\MemberServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'hello.core.member.MemberRepository' available: expected single matching bean but found 2: memoryMemberRepository,memberRepository at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:237) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1355) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1192) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:959) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) 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:1454) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) 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:225) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) ... 17 moreCaused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'hello.core.member.MemberRepository' available: expected single matching bean but found 2: memoryMemberRepository,memberRepository at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:218) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1420) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:907) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:785) ... 41 more
-
미해결김영한의 실전 자바 - 중급 1편
6. 날짜와 시간 duration 부분에서
질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]생성 부분에 of(): 특정 시간을 지정해서 Period를 생성한다 < 이 부분은 Duration을 생성한다가 맞는걸까요? 혹은 객체를 뜻하는게 아니라 기간의 period를 말하시는걸까요?
-
해결됨스프링 핵심 원리 - 기본편
테스트 오류 관련 질문
java.lang.IllegalStateException: Failed to load ApplicationContext for [MergedContextConfiguration@6c302a1d testClass = hello.core.CoreApplicationTests, locations = [], classes = [hello.core.CoreApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@b5cc23a, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@758f4f03, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@9cd25ff, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@70ab80e3, org.springframework.boot.test.context.SpringBootTestAnnotation@699a8e45], contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:180) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:142) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:98) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163) 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 java.base/java.util.Optional.orElseGet(Optional.java:364) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memberServiceImpl' defined in file [C:\Users\uniti\OneDrive\바탕 화면\Developer\Back End\Spring\core\basic\core\core\out\production\classes\hello\core\member\MemberServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'hello.core.member.MemberRepository' available: expected single matching bean but found 2: memoryMemberRepository,memberRepository at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:795) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:237) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1355) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1192) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) 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:975) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) 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:1454) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) 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:225) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) ... 17 moreCaused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'hello.core.member.MemberRepository' available: expected single matching bean but found 2: memoryMemberRepository,memberRepository at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:218) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1420) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:782) ... 41 more CoreApplicationTests 에서 위와 같이 오류가 납니다
-
미해결[핵집] 2025 빅데이터 분석기사(필기)_과목 3~4
강의교안 부탁드려요
안녕하세요3-4과목 통합강의교안 부탁드립니다메일주소 2dull2dull@naver.com입니다감사합니다
-
미해결스프링 DB 1편 - 데이터 접근 핵심 원리
커넥션에 관한 질문 드립니다.
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 네2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 네3. 질문 잘하기 메뉴얼을 읽어보셨나요? 네[질문 내용]안녕하세요 커넥션과 관련된 질문을 드리고 싶습니다.해당 강의에서 커넥션이 여러번 반복되어 나오는데커넥션 개념이 정리가 잘 되지 않습니다.애플리케이션 로직이 커넥션을 조회하면 DB 드라이버에서DB와 TCP/IP 커넥션 연결을 한다고 나옵니다.그 후 다다음 단계에서 커넥션이 생성 완료되었다고 나오는데커넥션을 연결하는 것과 커넥션이 생성되는 것이 모호하게 이해가 잘 되질 않습니다. 이 부분에 대한 추가적인 설명을 부탁드려도 될까요? 그 후 DB드라이버는 커넥션을 반환한다고 나오는데 이것은 커넥션 객체를 말하는 것일까요?
-
해결됨Next + React Query로 SNS 서비스 만들기
회원가입시 redirect가 안됩니다.
클라이언트 컴포넌트에서 Server Actions 사용하기에서 가입하기를 누르면response에는 message: null이 잘 오는데 redirect에서 에러가 납니다.404 SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse (<anonymous>) at parseJSONFromBytes (node:internal/deps/undici/undici:5329:19) at successSteps (node:internal/deps/undici/undici:5300:27) at fullyReadBody (node:internal/deps/undici/undici:1447:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async specConsumeBody (node:internal/deps/undici/undici:5309:7) at async onSubmit (webpack-internal:///(action-browser)/./src/app/(beforeLogin)/_lib/signup.ts:49:21) at async C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:406 at async t2 (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:38:6412) at async rS (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:41:1369) at async doRender (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\base-server.js:1378:30) at async cacheEntry.responseCache.get.routeKind (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\base-server.js:1539:28) at async DevServer.renderToResponseWithComponentsImpl (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\base-server.js:1447:28) at async DevServer.renderPageComponent (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\base-server.js:1844:24) at async DevServer.renderToResponseImpl (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\base-server.js:1882:32) at async DevServer.pipeImpl (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\base-server.js:895:25) at async NextNodeServer.handleCatchallRenderRequest (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\next-server.js:269:17) at async DevServer.handleRequestImpl (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\base-server.js:791:17) at async C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\dev\next-dev-server.js:331:20 at async Span.traceAsyncFn (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\trace\trace.js:151:20) at async DevServer.handleRequest (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\dev\next-dev-server.js:328:24) at async invokeRender (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\lib\router-server.js:174:21) at async handleRequest (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\lib\router-server.js:353:24) at async requestHandlerImpl (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\lib\router-server.js:377:13) at async Server.requestListener (C:\Users\user\Desktop\projects\z-com\node_modules\next\dist\server\lib\start-server.js:140:13)at async onSubmit (webpack-internal:///(action-browser)/./src/app/(beforeLogin)/_lib/signup.ts:49:21) 에러가 난것을 확인했을때 다른것은 되는데 redirect가 안되는 것 같습니다.signup.ts는"use server"; import { redirect } from "next/navigation"; import { signIn } from "@/auth"; export default async function onSubmit(prevState: any, formData: FormData) { if (!formData.get("id") || !(formData.get("id") as string)?.trim()) { return { message: "no_id" }; } if (!formData.get("name") || !(formData.get("name") as string)?.trim()) { return { message: "no_name" }; } if ( !formData.get("password") || !(formData.get("password") as string)?.trim() ) { return { message: "no_password" }; } if (!formData.get("image")) { return { message: "no_image" }; } let shouldRedirect = false; try { const response = await fetch( `${process.env.NEXT_PUBLIC_BASE_URL}/api/users`, { method: "post", body: formData, credentials: "include", } ); console.log(response.status); if (response.status === 403) { return { message: "user_exists" }; } console.log(await response.json()); shouldRedirect = true; await signIn("credentials", { username: formData.get("id"), password: formData.get("password"), redirect: false, }); } catch (err) { console.error(err); return { message: null }; } if (shouldRedirect) { redirect("/home"); } return { message: null }; } ESLint 오류가 나서 return {message:null}을 추가해준것과export default async function onSubmit(prevState: any, formData: FormData) {}async function onSubmit 형태로 바꾼것 외에는 건드린게 없고,공지사항대로 @auth/core와 next-auth 버전을npm i @auth/core@0.27 next-auth@5.0.0-beta.11 msw@2.1이렇게 설정해줬고,.env.local도NEXT_PUBLIC_API_MOCKING=enabled API_MOCKING=hello NEXT_PUBLIC_BASE_URL=http://localhost:9090/ .env도AUTH_SECRET=mustkeepinsecret NEXT_PUBLIC_API_MOCKING=enabledSingupModal.tsx"use client"; import style from "./signup.module.css"; import onSubmit from "../_lib/signup"; import BackButton from "@/app/(beforeLogin)/_component/BackButton"; import { useFormState, useFormStatus } from "react-dom"; function showMessage(messasge: string | null) { if (messasge === "no_id") { return "아이디를 입력하세요."; } if (messasge === "no_name") { return "닉네임을 입력하세요."; } if (messasge === "no_password") { return "비밀번호를 입력하세요."; } if (messasge === "no_image") { return "이미지를 업로드하세요."; } if (messasge === "user_exists") { return "이미 사용 중인 아이디입니다."; } return ""; } export default function SignupModal() { const [state, formAction] = useFormState(onSubmit, { message: null }); const { pending } = useFormStatus(); return ( <> <div className={style.modalBackground}> <div className={style.modal}> <div className={style.modalHeader}> <BackButton /> <div>계정을 생성하세요.</div> </div> <form action={formAction}> <div className={style.modalBody}> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="id"> 아이디 </label> <input id="id" name="id" className={style.input} type="text" placeholder="" required /> </div> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="name"> 닉네임 </label> <input id="name" name="name" className={style.input} type="text" placeholder="" required /> </div> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="password"> 비밀번호 </label> <input id="password" name="password" className={style.input} type="password" placeholder="" required /> </div> <div className={style.inputDiv}> <label className={style.inputLabel} htmlFor="image"> 프로필 </label> <input id="image" name="image" required className={style.input} type="file" accept="image/*" /> </div> </div> <div className={style.modalFooter}> <button type="submit" className={style.actionButton} disabled={pending} > 가입하기 </button> <div className={style.error}> {showMessage(state?.message || null)} </div> </div> </form> </div> </div> </> ); } showMessage에 TS오류나서 타입을 state?.message || null로 바꿔준것 외에는 없습니다.캐시도 다 삭제하고 mock서버랑 next서버 다 껐다가 다시 키고 vscode도 껐다가 다시 켜도 똑같습니다.. 리다이렉트가 안됩니다 ㅠㅠ 자꾸 404 SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON이 나옵니다... auth.ts도 바꾼것이 없습니다..import NextAuth from "next-auth" import CredentialsProvider from "next-auth/providers/credentials"; import {NextResponse} from "next/server"; export const { handlers: { GET, POST }, auth, signIn, } = NextAuth({ pages: { signIn: '/i/flow/login', newUser: '/i/flow/signup', }, providers: [ CredentialsProvider({ async authorize(credentials) { const authResponse = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}}/api/login`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ id: credentials.username, password: credentials.password, }), }) if (!authResponse.ok) { return null } const user = await authResponse.json() console.log('user', user); return { email: user.id, name: user.nickname, image: user.image, ...user, } }, }), ] });
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
깃 이상한 부분을 만졌더니 프로젝트 파일이 이상해요..
제가 한 프로젝트에서 깃 뭐를 만졌는지는 모르는데 이것저것 만지고나서 새로운 프로젝트를 만들어서 실행을 하면 갑자기 새로운 프로젝트에서 out 파일이 만들어지면서 그 하위에 제가 깃 이것저것 막 만진 프로젝트 코드들이 업로드되면서 새로운 프로젝트안에 자동으로 들어와져요.... 인텔리제이를 삭제했다가 다시 깔았는데도 계속해서 이렇게 되는 데 혹시 새로운 프로젝트 만들어서 실행해도 out폴더가 자동으로 생기지 않게 하는 방법이 뭘까요...그리고 .gragle이랑 .idea도 생성되고 이 두개랑 out 폴더까지 총 3개 글씨가 주황색으로 변해져있어요 해결방법 없을까요?ㅜㅜ
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
MemberServiceIntegrationTest 실행 오류 질문드립니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]MemberServiceIntegrationTest 실행에서 계속 오류가 납니다.H2도 실행 중이고 테이블도 삭제하고 돌렸는데 계속 "java.lang.illegalstateexception: could not initialize plugin: interface org.mockit..."라는 오류가 나네요. 프로젝트 구글 드라이브 첨부합니다:https://drive.google.com/drive/u/0/folders/1oYRjWn6uxwdLBkZoeIgnG3oEdYMHLxKd 감사합니다!
-
미해결
Ivermectin side effects and warnings?
ivermectin for humans for sale, when used properly, is mostly safe. Yet, not everyone bodies can handle it well. Some people might feel sick in the stomach. They might throw up or have loose tummies. Others might feel dizzy when they stand up fast. Some might also feel tired or itchy. They might even have rashes.Ouch, muscle or joint pain may happen too. But it's not common. In some rare cases, some people might get allergies like their face, lips, or tongue swelling up. It might even make it hard for them to breathe. Please always remember, these bad effects are rare when you use ivermectin as your doctor tells you to.Yet, there are times when ivermectin might cause bad side effects. Those times are when it is used in a wrong way or given in big doses. These doses are usually for animals and not for humans. For example, using ivermectin improperly might mess with your brain. It might make you confused. Sometimes, it might even lead to fits or a coma.Very, very rarely, your liver might get hurt too. This could give you tummy pain. You might turn yellow in the skin or eyes. Your liver might not work as it should. Heart problems might also occur. Your heart might beat too fast. It might make your blood pressure low. You might even feel chest pain.That's why always listen to your healthcare professional when using ivermectin. You must use it the right way and follow all the instructions given.