[ConverterController.java] public String converterForm(Model model) { IpPort ipPort = new IpPort("127.0.0.1", 8080); Form form = new Form(ipPort); model.addAttribute("form", form); return "converter-form"; } [converter-form.html] <form th:object="${form}" th:method="post"> th:field <input type="text" th:field="*{ipPort}"><br/> th:value <input type="text" th:value="*{ipPort}"> </form> th:field가 컨버터로 IpPortToStringConverter를 선택한 이유가 궁금한데요 . 추측해본 이유는 다음과 같습니다. th:field가 value 속성을 만들 때, form.getIpPort()에 컨버터를 적용하려고 한다. 그런데, form.getIpPort()의 타입은 IpPort이다. 그래서, 컨버팅 대상은 IpPort가 되는 것이다. String으로 컨버팅되는 이유는 <input type="text">이기 때문이다.
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 안녕하세요? 강의 너무 잘 듣고있습니다! 실습하던 중에 저는 addItemV1 버전으로 rejectedValue 없이 오류를 처리했는데도 영한님과 다르게 입력했던 값이 유지가 됩니다. 타임리프가 업데이트 된걸로 봐야할까요? 감사합니다.
안녕하세요 멘토님 항상 좋은 강의 잘 보고 있습니다. 궁금한 점이 생겨서 문의를 드렸는데요, 수업을 하면서는 몰랐는데 타입스크립트와 graphql-codegen에 대하여 강의를 들으면서 09-01 폴더를 10-01로 복사 후, 수업 후반부까지 import 부분에서 계속 빨간줄이 뜨길래 원인을 한참 찾았는데 알고보니 저는 여태까지 컴포넌트를 import 할 때 절대경로를 사용하고 있었습니다. (import 할 때 자동완성 사용) 왜 인지는 모르겠지만 .js 파일까지는 절대 경로를 사용해도 문제가 없었는데 타입스크립트로 변환을 하니까 여태 잘 사용하던 절대경로가 빨간줄이 계속 뜨고 상대경로를 입력하니까 빨간줄이 사라지더라구요. 09-01 .js 실습 파일 (빨간줄 없이 정상작동) 10-01 .tsx 실습 파일 (절대경로 - 빨간줄, 상대경로 - 정상 작동) 이렇게 JS 에서는 되던 절대경로가 TS 에서는 왜 안되는 것인지가 궁금하여 질문드렸습니다. 감사합니다!
리눅스 환경에서 구조체내에 int a, b, c가 있고, 메인 영역에서 while상태로 함수1을 구조체로 포인터로 매개변수를 전달하여 함수 call을 하여 a,b에 접근하여 값을 바꿔준다 가정하고, 쓰레드를 열고 그 쓰레드 내 while상태로 함수2를 똑같은 구조체 포인터로 매개변수를 전달하여 함수call하여 c의 값을 바꿔준다고 가정하면 혹시 레이스 컨디션이 일어나나요?... 서로의 함수 1은 a,b, 2는 c만을 건들지만 궁금한 점은 구조체 전체의 값을 read하고 원하는 영역만 바꾸고 구조체 전체의 값을 write하게 된다면, 함수 1과 2의 레이스 컨디션이 일어나는건지 너무 궁금하네용.. 너무 두서없이 써서 죄송합니당..
========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/) [질문 내용] 여기에 질문 내용을 남겨주세요. 필터는 setDispatcherTypes 로 무슨 요청일때 필터가 작동하는지 설정을 할수있는데 인터셉터는 그게 안되서.. 만약에 에러페이지인데도 어떤 에러페이지는 로그가 필요하고 어떤 에러페이지는 로그가 필요 없을땐 어떻게 처리해야 할까요 ?
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) 예 [질문 내용] start.spring.io에 들어가 그림과 같이 프로젝트를 만든 후 인텔리 제이로 실행만 시켰는데 이런 오류가 뜹니다. gradle파일을 찾을수 없다인것 같은데.. 어떻게 해결하는지 모르겠어서 질문남깁니다.
현재 윈도우 11에 vs2019를 사용중이고, 폰트는 굴림체 입니다. 현재 미로가 이렇게 그려지고 있어서 질문 남깁니다(코드는 동일하게 작성하였습니다). 제생각에, 원 그림이 차지하는 칸이 2칸인데, console.foregroundcolor을 변경하게 될 경우 원래의 cursor position로 돌아가서? 발생하는 문제인 것 같습니다... 예를들면, 두번째 줄의 경우 가장 왼쪽이 red이고 원이 그려질 경우 두 칸을 움직이게 되어 cursor position이 (1, 2)인데, foregroundcolor을 바꾸게 될 경우 원이 아니라면 한 칸을 움직이게 될 테니 (1, 1)에 그리게 되는 것 같습니다... 일단은 임시로 before 변수를 두어 foregroundcolor가 바뀔 경우 x좌표를 2배하여 setcursorposition 하도록 작성해서 해결하긴 하였는데... 설정값을 바꿔서 해결할 수 있는 부분이 있는지 질문드립니다.
[ConverterController.java] model.addAttribute("number", 10000); [converter-view.html] <span th:text="${{number}}" ></span> Model에서 "number"에 대응되는 10000은 int 타입입니다. 이때, IntegerToStringConverter가 선택된 이유가 궁금한데요 . ConversionService에서 int -> String으로 바꿔주는 컨버터가 없으니까, int ->Integer로 바꾼 후에, Integer -> String으로 바꿔주는 컨버터를 찾은 것인가요..?
바로 이전 강의인 useReduce까지는 모두 작동이 잘 되었습니다. 이번 강의에서 일기 생성과 삭제는 잘 이루어지는데 수정에서만 오류가 발생하고 있습니다. 강의를 세 번 돌려봤는데 무슨 문제인지 모르겠습니다ㅠ https://codesandbox.io/s/gallant-kilby-4l2tr7?file=/src/App.js
에러메세지는 아래와 같습니다. PS C:\Users\esc0\Desktop\saju\saju-frontend-vuejs> npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @vue/cli-plugin-eslint@5.0.8 npm ERR! Found: eslint@6.8.0 npm ERR! node_modules/eslint npm ERR! dev eslint@"^6.7.2" from the root project npm ERR! peer eslint@">= 4.12.1" from babel-eslint@10.1.0 npm ERR! node_modules/babel-eslint npm ERR! dev babel-eslint@"^10.1.0" from the root project npm ERR! 2 more (eslint-plugin-vue, vue-eslint-parser) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer eslint@">=7.5.0" from @vue/cli-plugin-eslint@5.0.8 npm ERR! node_modules/@vue/cli-plugin-eslint npm ERR! dev @vue/cli-plugin-eslint@"^5.0.8" from the root project npm ERR! npm ERR! Conflicting peer dependency: eslint@8.33.0 npm ERR! node_modules/eslint npm ERR! peer eslint@">=7.5.0" from @vue/cli-plugin-eslint@5.0.8 npm ERR! node_modules/@vue/cli-plugin-eslint npm ERR! dev @vue/cli-plugin-eslint@"^5.0.8" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\esc0\AppData\Local\npm-cache\_logs\2023-02-09T13_43_38_155Z-eresolve-report.txt npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\esc0\AppData\Local\npm-cache\_logs\2023-02-09T13_43_38_155Z-debug-0.log PS C:\Users\esc0\Desktop\saju\saju-frontend-vuejs> PS C:\Users\esc0\Desktop\saju\saju-frontend-vuejs> npm run serve > saju-frontend-vuejs@0.1.0 serve > vue-cli-service serve INFO Starting development server... ERROR Failed to compile with 2 errors 오후 10:47:30 [eslint] ESLint is not a constructor You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file. Error: Child compilation failed: [eslint] ESLint is not a constructor - child-compiler.js:169 [saju-frontend-vuejs]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:551 finalCallback [saju-frontend-vuejs]/[webpack]/lib/Compiler.js:551:5 - Compiler.js:577 [saju-frontend-vuejs]/[webpack]/lib/Compiler.js:577:11 - Compiler.js:1196 [saju-frontend-vuejs]/[webpack]/lib/Compiler.js:1196:17 - task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5 - task_queues:64 runNextTicks node:internal/process/task_queues:64:3 - timers:447 process.processImmediate node:internal/timers:447:9 ERROR in [eslint] ESLint is not a constructor ERROR in Error: Child compilation failed: [eslint] ESLint is not a constructor - child-compiler.js:169 [saju-frontend-vuejs]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:551 finalCallback [saju-frontend-vuejs]/[webpack]/lib/Compiler.js:551:5 - Compiler.js:577 [saju-frontend-vuejs]/[webpack]/lib/Compiler.js:577:11 - Compiler.js:1196 [saju-frontend-vuejs]/[webpack]/lib/Compiler.js:1196:17 - task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5 - task_queues:64 runNextTicks node:internal/process/task_queues:64:3 - timers:447 process.processImmediate node:internal/timers:447:9 1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack compiled with 3 errors
LinkedList 와 ArrayList 는 기능이나 선언, 입력, 삭제하는 문법이 대부분 같은데요. 분명 각각의 용도나 목적이 있으니 이 둘이 구분된 것으로 생각하고 있습니다. 혹시 각각 어떤 목적으로 어떤 용도로 사용하는지 구분을 알 수 있을까요? (실무에서는 이럴 때 뭐를 사용하고, 어떤 경우엔 뭐를 사용한다, 이런 내용도 좋을 것 같습니다!)
아직 학생이고 스프링을 통한 개발을 공부하기 위해 강의를 듣고 있습니다. 스프링 부트로 개발을 하고 싶은데 지금 설명해주시는건 스프링 부트를 배우기 전에 기반을 다지는 거니까 너무 세세하게 문장 하나하나를 따지고 가는 것 보다는 스프링이 이러한 과정을 통해 현재 편리한 스프링 부트까지 오게 되었다는 것을 체득하기 위해 듣는 쪽으로 해도 후에 큰 문제가 없을지 궁금합니다.