묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨코딩테스트 [ ALL IN ONE ]
강의 교재 부탁드려요
안녕하세요. 강의 너무 잘 보고 있습니다.교재 공유 요청 했는데 확인 한번 부탁드리겠습니다~!구글폼에 접수한 메일에는 아무것도 안와있어서요.
-
해결됨실전! 스프링 데이터 JPA
글로벌 서비스의 경우 시간 데이터 저장 및 뷰 관련 질문
강의에서는 시간 데이터를 넣는 방법을 가르쳐주셨는데 글로벌 서비스에서는 시간 데이터를 어떻게 관리하는지 궁금합니다. 예를 들어, 블로그 플랫폼의 유저들이 미국과 한국에 위치할때, 같은 시간에 작성된 글이라도 위치에 따라 다른 시간 데이터를 표시하도록 해야할것 같습니다. 이때 게시글을 작성한 시간은 DB에서 UTC로 가지고 있는게 좋을까요? 만약 그렇다면 DB의 데이터를 로컬로 가져올때 실무에서는 백엔드에서 변환을 하는지 아니면 프론트까지 UTC를 가져와서 프론트에서 변환을 하는지 궁금합니다.
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
바둑이 승차 질문입니다!
package other.study; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; import static java.lang.Integer.MIN_VALUE; import static java.lang.Math.max; import static java.lang.System.in; // todo: 해결 필요!! public class Main3 { static int[] ch = new int[100000000]; static int c, n, answer = MIN_VALUE; public static void main(String[] args) { Scanner kb = new Scanner(in); c = kb.nextInt(); n = kb.nextInt(); ch = new int[n]; int[] arr = new int[n + 1]; for (int i = 0; i < n; i++) { arr[i] = kb.nextInt(); } // DFS(0, 0, arr); BFS(0, arr); System.out.println("answer = " + answer); } static void DFS(int L, int sum, int[] arr) { if (sum > c) return; if (L == n) { answer = max(answer, sum); } else { DFS(L + 1, sum + arr[L], arr); DFS(L + 1, sum, arr); } } static void BFS(int L, int[] arr) { Queue<Node> Q = new LinkedList<>(); Q.offer(new Node(0, arr[0])); while (!Q.isEmpty()) { int len = Q.size(); for (int i = 0; i < len; i++) { Node tmp = Q.poll(); if (tmp.weight > c) continue; if (L == n) { answer = max(answer, tmp.weight); } else { Q.offer(new Node(tmp.level + 1, tmp.weight + arr[tmp.level + 1])); Q.offer(new Node(tmp.level + 1, tmp.weight)); } } System.out.println(); L++; } } static class Node { private int level, weight; public Node(int level, int weight) { this.level = level; this.weight = weight; } } }안녕하세요 선생님!명품 강의 정말 잘 듣고 있어요! 바둑이 승차를 BFS로도 풀어봤는데, 문제되는 부분이 있을까해서 질문 드립니다! 늦었지만 새해 복 많이 받으세요!
-
미해결대세는 쿠버네티스 (초급~중급편)
vegrant up 중간 멈춤
지금 에러 로그가 없어서 자세한 설명은 불가한데 설치중간 k8s-worker1 ....... cri compelte 였나 여기서 몇시간 멈춰있더라구요 오늘 저녁에 다시 해보고 멈춘 부분에 자세한 로그 올리겠습니다.
-
미해결게임 엔진을 지탱하는 게임 수학
1 라디안의 값에 오차가 있습니다
검색이나 직접 계산을 했을 때 1 라디안이 약 57.2958이 나오는데, 강의문서에 첨부된 값이 52.2958로 되어있습니다. 수정이 필요해 보입니다.
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
내장 톰캣 관련 질문입니다
안녕하세요 강사님 강의 잘 보고 있습니다.내장 톰캣 관련하여 사소한 궁금증이 생겼는데 이리저리 찾아봐도 원하는 답을 얻지 못해 질문 남깁니다.스프링부트의 내장톰캣 기능을 사용하면 실행하는 컴퓨터의 메모리를 쓰는 것 인가요? 아니면 스프링부트에 뭔가가 있는지 궁금하여 질문 남깁니다.감사합니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
자동완성 기능설정이 궁금합니다.
강사님 강의를 따라하다가 이렇게 자동완성되는 기능을 똑같이 쓰고 싶은데 단축키를 눌러도 추천을 해주지 않습니다. ctrl + space를 두번누르면 너무 터무니 없는것들만 나오고 분명 플러그인도 다 설치했는데 안되서 혹시 방법을 아시는지 궁금합니다. 저렇게 자동완성이 된다면 코딩피로도가 현저히 줄것 같아서 궁금합니다!ctrl + spce ctrl + space x2
-
미해결김영한의 자바 입문 - 코드로 시작하는 자바 첫걸음
섹션8_문제와풀이3
범위가 아닌 값이 딱딱 떨어지는거면 switch문을 사용하는게 좋다고 강의시간에 들었습니다. 그래서 저는 switch 문으로 풀어봤습니다. Q1 : switch 문에서 break는 이렇게 사용하는게 맞을까요? continue는 굳이 사용할 필요가 없을까요? switch 문에서 break랑 continue 적절히 쓰는법 알려주시면 감사합니다 !Q2 : 가독성면에서는 어떤지도 피드백 부탁드립니다 !package array.ex; import java.util.Scanner; public class ArrayEx10 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int[] productPrices = new int[10]; String[] productNames = new String[10]; int productCount = 0; while (true) { System.out.println("1. 상품 등록 | 2. 상품 목록 | 3. 종료"); System.out.print("메뉴를 선택하세요 : "); int option = scanner.nextInt(); scanner.nextLine(); switch (option) { case 1 -> { if (productCount < 10) { System.out.print("상품 이름을 입력하세요 : "); productNames[productCount] = scanner.nextLine(); System.out.print("상품 가격을 입력하세요 : "); productPrices[productCount] = scanner.nextInt(); productCount++; } else { System.out.println("더 이상 상품을 등록할 수 없습니다."); } break; } case 2 -> { if (productCount == 0) { System.out.println("등록된 상품이 없습니다."); } else { for (int i = 0; i < productCount; i++) { System.out.println(productNames[i] + " : " + productPrices[i] + "원"); } } break; } case 3 -> { System.out.println("프로그램을 종료합니다."); System.exit(0); } default -> { System.out.println("올바른 메뉴가 아닙니다."); break; } } } } }
-
해결됨스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
스프링부트가 아닌, 스프링 프레임워크일 경우 BasicErrorController
안녕하세요,스프링 부트일 경우, BasicErrorController 가 자동적으로 등록되어 사용된다고 하셨는데, 부트가 아닌 일반 스프링 프레임워크일 경우, BasicErrorController 와 비슷한 역할을 해주는 Controller 가 자동적으로 등록되지는 않는 것인지요?부트가 아닌 스프링 프레임워크에서는 개발자가 예외나 response.sendError(); 에 대해서 아무런 대비/대처 설정 (예와나 sendError 를 처리해주는 코드를 작성하지 않았을 경우) 을 해주지 않았을 경우에는 어떤 default 설정을 따라가는지 궁금합니다.스프링 부트일 경우,WebServerFactoryCustomizer<ConfigurableWebServerFactory> 를 구현한 클래스를 작성해서 ErrorPage를 지정해주고 있는데, 부트가 아닌 스프링 프레임워크에서는 어떻게 WebServerFactoryCustomizer<ConfigurableWebServerFactory> 를 구현한 것과 동일하게 custom 을 해줄 수 있는지 궁금합니다.감사합니다.
-
미해결네이버 카페 DB 추출 프로그램 개발 강의 [selenium]
질문있습니다.
query = "강아지옷" userDisplay = 15 option=0 searchBy = 1 # searchdate = "all" # all or 1w encoding_query = parse.quote(query,encoding="MS949") link = f"https://cafe.naver.com/joonggonara?iframe_url=/ArticleSearchList.nhn%3Fsearch.clubid=10050146%26search.media=0%26search.searchdate={searchdate}%26search.defaultValue=1%26search.exact=%26search.include=%26userDisplay={userDisplay}%26search.exclude=%26search.option={option}%26search.sortBy=date%26search.searchBy={searchBy}%26search.searchBlockYn=0%26search.includeAll=%26search.query={encoding_query}%26search.viewtype=title%26search.page={page_idx}"이번 강의는 순서도 바뀐 것 같고 건너띄기 된 느낌입니다..이 부분 내용이 생략이 된 것 같아서요. 저기 link 주소랑 관련된 저 부분들 분석 하는 방법 궁금합니다. 그리고 FLAG 쓰셨는데.. 이해가 잘 안되서요.. 그걸 이용하는 방법을 알려주신 건지.. 저기에 꼭 써야하는건지 잘 이해가 안가네요.if에 break 걸어 놓으셨으니 FLAG를 안 써도 될 것 같아서 여쭤봅니다. ( keyword.py, menu.py 둘 다요)
-
미해결홍정모의 따라하며 배우는 C++
fptr1에 Something으로 접근 연산자를 붙히는 이유는 Something 클래스의 인스턴스 주소를 넘겨줘야해서 인가요?
int (*fptr2)() = &Something::getValue;는 단순히 정적 메모리에 있는 Something클래스의 함수 포인터를 초기화한다고 이해 할 수 있지만 제목 그대로의 의문점이 있습니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
MemberServiceTest를 실행하면 에러가 뜹니다.
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오) 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 아니오3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]1. MemberServiceTest를 실행하면 에러가 뜹니다. @RunWith는 Junit5로 넘어오면서 없어져 넣진 않았습니다. 01:32:35.817 [Test worker] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.boardproject.service.MemberServiceTest]: MemberServiceTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test at org.springframework.util.Assert.state(Assert.java:76) at org.springframework.boot.test.context.SpringBootTestContextBootstrapper.findConfigurationClass(SpringBootTestContextBootstrapper.java:246) at org.springframework.boot.test.context.SpringBootTestContextBootstrapper.getOrFindConfigurationClasses(SpringBootTestContextBootstrapper.java:233) at org.springframework.boot.test.context.SpringBootTestContextBootstrapper.processMergedContextConfiguration(SpringBootTestContextBootstrapper.java:150) at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:354) at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildDefaultMergedContextConfiguration(AbstractTestContextBootstrapper.java:270) at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:218) at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildTestContext(AbstractTestContextBootstrapper.java:108) at org.springframework.boot.test.context.SpringBootTestContextBootstrapper.buildTestContext(SpringBootTestContextBootstrapper.java:111) at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:142) at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:126) at org.junit.platform.engine.support.store.NamespacedHierarchicalStore.lambda$getOrComputeIfAbsent$5(NamespacedHierarchicalStore.java:147) at org.junit.platform.engine.support.store.NamespacedHierarchicalStore$MemoizingSupplier.computeValue(NamespacedHierarchicalStore.java:372) at org.junit.platform.engine.support.store.NamespacedHierarchicalStore$MemoizingSupplier.get(NamespacedHierarchicalStore.java:361) at org.junit.platform.engine.support.store.NamespacedHierarchicalStore$StoredValue.evaluate(NamespacedHierarchicalStore.java:308) at org.junit.platform.engine.support.store.NamespacedHierarchicalStore$StoredValue.access$200(NamespacedHierarchicalStore.java:287) at org.junit.platform.engine.support.store.NamespacedHierarchicalStore.getOrComputeIfAbsent(NamespacedHierarchicalStore.java:149) at org.junit.platform.engine.support.store.NamespacedHierarchicalStore.getOrComputeIfAbsent(NamespacedHierarchicalStore.java:168) at org.junit.jupiter.engine.execution.NamespaceAwareStore.lambda$getOrComputeIfAbsent$3(NamespaceAwareStore.java:66) at org.junit.jupiter.engine.execution.NamespaceAwareStore.accessStore(NamespaceAwareStore.java:90) at org.junit.jupiter.engine.execution.NamespaceAwareStore.getOrComputeIfAbsent(NamespaceAwareStore.java:65) at org.springframework.test.context.junit.jupiter.SpringExtension.getTestContextManager(SpringExtension.java:366) at org.springframework.test.context.junit.jupiter.SpringExtension.beforeAll(SpringExtension.java:131) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:396) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:396) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:212) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:85) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148) 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:107) 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: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.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:119) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:94) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:89) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62) 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.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 jdk.proxy1/jdk.proxy1.$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:113) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65) at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
-
미해결[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
무한스크롤 구현 오류
안녕하세요. 선생님 무한스크롤이 계속 만들어져서 질문드려요위 사진에는 댓글이 2개 달린 상태입니다. 그런데스크롤을 내리면서 2개였던게 계속 복사되어 만들어지는 상태입니다. 이런식으로 초기 댓글 갯수가 반복해서 늘어나는 것 같아요. 코드를 보고도 오류를 찾기 힘들어 질문 드려요!참고로, 이전에 비슷한 질문에 확인 해야 할 사항이 있어서 체크해보았습니다. nextconfig.json에서 reactStrictmode를 false로 바꿔보시고 서버를 껐다 다시 켜주세요!>> 바꾸고 해도 되지 않는 것 같습니다. 무한스크롤을 제거한 후 댓글을 작성해 보고 정상적으로 작성이 되는지 알려주세요.>> 무한스크롤 컴포넌트 삭제 시 다른 부분들은 원활하게 작동합니다.또 다른 자료가 필요하시면 말씀해주세요! 긴 질문 읽어주셔서 감사합니다!!
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
5장 테스트벤치 코드와 관련된 질문입니다.
=================현업자인지라 업무때문에 답변이 늦을 수 있습니다. (길어도 만 3일 안에는 꼭 답변드리려고 노력중입니다 ㅠㅠ)강의에서 다룬 내용들의 질문들을 부탁드립니다!! (설치과정, 강의내용을 듣고 이해가 안되었던 부분들, 강의의 오류 등등)이런 질문은 부담스러워요.. (답변거부해도 양해 부탁드려요)개인 과제, 강의에서 다루지 않은 내용들의 궁금증 해소, 영상과 다른 접근방법 후 디버깅 요청, 고민 상담 등..글쓰기 에티튜드를 지켜주세요 (저 포함, 다른 수강생 분들이 함께보는 공간입니다.)서로 예의를 지키며 존중하는 문화를 만들어가요.질문글을 보고 내용을 이해할 수 있도록 남겨주시면 답변에 큰 도움이 될 것 같아요. (상세히 작성하면 더 좋아요! )먼저 유사한 질문이 있었는지 검색해보세요.잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.==================5장 테스트벤치에서 마지막부분 dut와 tb를 연결해주는 named mapping코드에서, 아웃풋에 해당하는 부분이 빈칸으로 되어있는데 혹시 공백으로 두었을 때에는 시스템이 어떻게 인식하는 건가요? 굳이 필요없는 코드 같아 보이는데 편의를 위한 작성인 것인지, 아니라면 o_value값들이 어떻게 연결되는 것인지 질문드립니다.
-
해결됨[코드캠프] 훈훈한 Javascript
for of, for in 강의에서
19분 45초쯤 starter 함수에서 counterMaker()을 적는 코드가 있는데 counterMaker함수에서 return을 하지 않았는데 저렇게 사용해도 괜찮은 건가요?
-
해결됨Flutter로 SNS 앱 만들기
저는 왜 signUp함수가 안나와요.
(사진)
-
미해결Next + React Query로 SNS 서비스 만들기
auth.ts 페이지의 credentials 관련 에러 질문
안녕하세요. 강의를 보며 코드를 작성하고 있는데, auth.ts 페이지에서'{ authorize(credentials: Record<string, string> | undefined): Promise<any>; }' 형식의 인수는 'UserCredentialsConfig<Record<string, CredentialInput>>' 형식의 매개 변수에 할당될 수 없습니다.'credentials' 속성이 '{ authorize(credentials: Record<string, string> | undefined): Promise<any>; }' 형식에 없지만 'Pick<CredentialsConfig<Record<string, CredentialInput>>, "credentials" | "authorize">' 형식에서 필수입니다.ts(2345)credentials.d.ts(12, 5): 여기서는 'credentials'이(가) 선언됩니다.(parameter) credentials: Record<string, string> | undefined이런 에러가 발생했습니다. credentials 속성을 타입과 함께 추가해주고, body에서 사용되고 있는 credentials에 ?. 연산자를 이용해 에러를 해결했는데도이러한 에러가 발생합니다.이때 500 에러가 같이 발생하는데 해당 에러도 하단에 첨부합니다. GET http://localhost:3000/api/auth/signin 500 (Internal Server Error)processMessage @ webpack-internal:///…t-dev-client.js:233eval @ webpack-internal:///…ot-dev-client.js:55handleMessage @ webpack-internal:///…lay/websocket.js:52index.js:591 Uncaught TypeError: Cannot read properties of undefined (reading 'GET')at eval (webpack-internal:///(rsc)/./src/auth.ts:14:21)at (rsc)/./src/auth.ts (file:///Users/goorm/Documents/next/y-com/.next/server/app/api/auth/[...nextauth]/route.js:182:1)at __webpack_require__ (file:///Users/goorm/Documents/next/y-com/.next/server/webpack-runtime.js:33:43)at eval (webpack-internal:///(rsc)/./src/app/api/auth/[...nextauth]/route.ts:6:63)at (rsc)/./src/app/api/auth/[...nextauth]/route.ts (file:///Users/goorm/Documents/next/y-com/.next/server/app/api/auth/[...nextauth]/route.js:172:1)at __webpack_require__ (file:///Users/goorm/Documents/next/y-com/.next/server/webpack-runtime.js:33:43)at eval (webpack-internal:///(rsc)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute&page=%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute&appPaths=&pagePath=private-next-app-dir%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute.ts&appDir=%2FUsers%2Fgoorm%2FDocuments%2Fnext%2Fy-com%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2FUsers%2Fgoorm%2FDocuments%2Fnext%2Fy-com&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!:17:126)at (rsc)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute&page=%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute&appPaths=&pagePath=private-next-app-dir%2Fapi%2Fauth%2F%5B...nextauth%5D%2Froute.ts&appDir=%2FUsers%2Fgoorm%2FDocuments%2Fnext%2Fy-com%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2FUsers%2Fgoorm%2FDocuments%2Fnext%2Fy-com&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D! (file:///Users/goorm/Documents/next/y-com/.next/server/app/api/auth/[...nextauth]/route.js:162:1)at __webpack_require__ (file:///Users/goorm/Documents/next/y-com/.next/server/webpack-runtime.js:33:43)at __webpack_exec__ (file:///Users/goorm/Documents/next/y-com/.next/server/app/api/auth/[...nextauth]/route.js:192:39)at <unknown> (file:///Users/goorm/Documents/next/y-com/.next/server/app/api/auth/[...nextauth]/route.js:193:424)at __webpack_require__.X (file:///Users/goorm/Documents/next/y-com/.next/server/webpack-runtime.js:163:21)at <unknown> (file:///Users/goorm/Documents/next/y-com/.next/server/app/api/auth/[...nextauth]/route.js:193:47)at Object.<anonymous> (file:///Users/goorm/Documents/next/y-com/.next/server/app/api/auth/[...nextauth]/route.js:196:3)at Module._compile (node:internal/modules/cjs/loader:1256:14)at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)at Module.load (node:internal/modules/cjs/loader:1119:32)at Module._load (node:internal/modules/cjs/loader:960:12)at Module.require (node:internal/modules/cjs/loader:1143:19)at mod.require (file:///Users/goorm/Documents/next/y-com/node_modules/next/dist/server/require-hook.js:65:28)at require (node:internal/modules/cjs/helpers:121:18)at requirePage (file:///Users/goorm/Documents/next/y-com/node_modules/next/dist/server/require.js:109:84)at <unknown> (file:///Users/goorm/Documents/next/y-com/node_modules/next/dist/server/load-components.js:59:84)at async loadComponentsImpl (file:///Users/goorm/Documents/next/y-com/node_modules/next/dist/server/load-components.js:59:26)at async DevServer.findPageComponentsImpl (file:///Users/goorm/Documents/next/y-com/node_modules/next/dist/server/next-server.js:671:36)getServerError @ client.js:417eval @ index.js:591setTimeout (async)hydrate @ index.js:579await in hydrate (async)pageBootrap @ page-bootstrap.js:24eval @ next-dev.js:25Promise.then (async)eval @ next-dev.js:23./node_modules/next/dist/client/next-dev.js @ main.js?ts=1704985593164:192options.factory @ webpack.js?ts=1704985593164:716__webpack_require__ @ webpack.js?ts=1704985593164:37__webpack_exec__ @ main.js?ts=1704985593164:1259(anonymous) @ main.js?ts=1704985593164:1260webpackJsonpCallback @ webpack.js?ts=1704985593164:1388(anonymous) @ main.js?ts=1704985593164:9Show 6 more framesShow lesswebsocket.js:46 [HMR] connected확인하시기 쉽게 같은 내용의 사진과 함께 올려드립니다.그리고 강의 내용 이외의 credentials 관련 코드를 추가하기 전인 auth.ts 파일의 코드도 첨부드립니다.import NextAuth from "next-auth"; import CredentialsProvider from "next-auth/providers/credentials"; 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.AUTH_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(); return user; }, }), ], }); chap3-1의 auth.ts 코드를 복붙해도 에러가 해결되지 않아 무엇이 원인인지 모르겠습니다. 도움을 주신다면 정말 감사하겠습니다...
-
미해결실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)
assertThat이 보이지 않습니다. ㅠㅠ
안녕하세요? 강의 잘 듣고 있습니다.강의를 들으면서 진행하고 있는데, assertThat을 import 할 수가 없고, 대신 import org.junit.jupiter.api.Assertions.assertEquals 이런 식으로 assertEquals가 import 되는데 혹시 이유를 알 수 있을까요? ㅠㅠ gradle은 pdf에서 제공해주신 내용을 그대로 사용하고 있습니다.감사합니다!plugins { id 'org.springframework.boot' version '2.6.8' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' id 'org.jetbrains.kotlin.jvm' version '1.6.21' } group = 'com.group' version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' repositories { mavenCentral() } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' runtimeOnly 'com.h2database:h2' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('test') { useJUnitPlatform() } compileKotlin { kotlinOptions { jvmTarget = "11" } } compileTestKotlin { kotlinOptions { jvmTarget = "11" } }
-
해결됨실전! Querydsl
h2 연결 문제
안녕하세요 querydsl 강의 초반에 환경설정 도중 기본 엔티티 생성 후 Test 하는 부분에서 h2 연결시 지정한 url 이 아니라 자꾸 인메모리 방식으로 연결이 되고 있어 글을 남기게 되었습니다. 사용하고 있는 버전은 다음과 같습니다.java : 17 spring boot : 3.2.1Ide : intellij edu 기타 설정 내용application.yml 파일 및 프로젝트 폴더 구성 h2 실행 및 console 접속은 정상적으로 되고 있습니다. h2 서버를 꺼도 연결되지 않는다는 오류가 나지 않고, show_sql 값등을 변경해도 반영되지 않는 걸 보니 application.yml 에 지정한 내용을 못 읽어오는 것 같아 File > invalidate cache test 폴더 하위에 resources 폴더 및 application.yml 추가 와 같이 시도해보았으나 문제 해결에 실패하였습니다. 혹시 이와같은 문제에 대해 해결방안이 있을까요? 검색해봐도 h2 메모리연결 방법 혹은 h2 접속 자체가 안되는 경우에 대해서만 있네요. 답변 부탁드립니다 🙂
-
미해결대세는 쿠버네티스 (초급~중급편)
vagrant up 에러
==> vagrant: A new version of Vagrant is available: 2.4.0 (installed version: 2.3.4)!==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.htmlBringing machine 'k8s-master' up with 'virtualbox' provider...Bringing machine 'k8s-node1' up with 'virtualbox' provider...Bringing machine 'k8s-node2' up with 'virtualbox' provider...==> k8s-master: Box 'rockylinux/8' could not be found. Attempting to find and install... k8s-master: Box Provider: virtualbox k8s-master: Box Version: >= 0==> k8s-master: Loading metadata for box 'rockylinux/8' k8s-master: URL: https://vagrantcloud.com/rockylinux/8==> k8s-master: Adding box 'rockylinux/8' (v9.0.0) for provider: virtualbox k8s-master: Downloading: https://vagrantcloud.com/rockylinux/boxes/8/versions/9.0.0/providers/virtualbox/unknown/vagrant.boxDownload redirected to host: dl.rockylinux.org k8s-master: k8s-master: Calculating and comparing box checksum...==> k8s-master: Successfully added box 'rockylinux/8' (v9.0.0) for 'virtualbox'!There are errors in the configuration of this machine. Please fixthe following errors and try again:Vagrant:* Unknown configuration section 'disksize'.* Unknown configuration section 'vbguest'.이런 에러가 발생합니다... 어떻게 해결하나요?