따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
import "reflect-metadata"; ^^^^^^ SyntaxError: Cannot use import statement outside a module 해당 에러 발생 후 , package.json 파일에 type 을 추가 후 실행 하였더니, 충돌 에러가 발생합니다 ㅠ 어떻게 해결 해야 하는지 조언좀 부탁드립니다. https://github.com/bottlesun/study/tree/master/09-redditClone-nextjs
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요. 새해 복 많이 받으세요 ! 열심히 강의를 수강중인 학생 입니다. updateItemDTO 관련하여 궁금한게 생겨서 문의 남깁니다. 영한님이 말씀해주신 의견에 따라 소스를 변경해보았습니다. Controller updateItemDto (service package안에 뒀습니다) Service Item book 소스는 이런식으로 변경해서 잘 동작 하는 것 확인 했습니다. 궁금점 영한님이 다른 분에게 남겨 준 글을 봤을 때 DTO가 생성되는 계층에 dto class를 작성하라고 쓰여있었습니다. 저의 소스 같은 경우 Controller 에서 인스턴스화 되고 있는데 이럴 때는 Controller 밑에 dto package를 만들었어야 하는건가요? Service 쪽에서 Item findItem = itemRepository.findOne(itemId); findItem.changeItem(updateItemDto); 이 로직을 실행하게 되면 Book, Album , Movie 다 똑같이 changeItem override 해주었습니다. 이후에 Controller에서 Album , Movie 에 필요한 필드 값 세팅 후 Service로 넘겼습니다. 3개의 자식 중에 Book 호출 되게 되는데 이 점이 궁금합니다 (기본적인 자바 지식 일수도 있지만, 구글링을 하여도 적합한 글을 찾지 못해서 글 남겼습니다) 3. 2번과 이어지는 질문인데, 혹시 movie , album , book 을 다 수정할 수 있게 된다면 어떤 식으로 구성해야 좋은지 궁금합니다! 4.처음 view에서 넘겨 받은 BookForm을 itemService.updateItem() 인자로 넘기지 않고 중간에 변환해서 넘긴 이유가 궁금합니다! 5번 질문과 같은 맥락일까요 5.service 계층에서 dto를 의존하게 되는 경우는 어떤 경우인지도 궁금합니다 ! 좋은 강의 잘 보고 있습니다. 항상 감사합니다!
안녕하세요 나도코딩님 새해복 많이받으세요! 전달값(Parameter) 강의 듣고있는데 public static void powerByExp(int number, int exponent) { // 전달값을 2개 받는경우 int result = 1; for (int i = 0; i < exponent; i++) { result = result * number; } System.out.println(number + " 의 " + exponent + " 승은 " + result); powerByExp(3,3); // 3 * 3 * 3 = 8 여기서 for문의 사용법이 이해가 안가는데 result = result * number; 3의 3승을 한다고했을때 3 * 1, 3 * 3, 9 * 3는 이렇게 3번 계산하는거잖아요? 그러면 이걸 출력한다고하면 System.out.println(number + " 의 " + exponent + " 승은 " + result); result는 27이 나오는데 마지막 9 * 3 만 result라고 해석하는건가요? 3*1, 3*3 은 왜 result 라고 해석을 안하는건가요? 매소드 너무 어렵습니다.. ㅠㅠ
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] allocationSize를 50정도로 설정해서 여러서버에서 사용하더라도 동시성 이슈 없이 사용한다고 하셔서 생각해봤는데... sequence를 얻기위해 호출시에 50씩 증가되서 메모리에 가지고 있고 여러 서버에서 자주 호출되는 서비스의 경우 중간에 빈 숫자가 정말 많을 것 같습니다;; 1번의 트랜잭션에서 다음시퀀스를 받아오는 쿼리를 여러번 수행하는게(allocationsize를 1로 해두고 여러번 nextval 여러번 수행) 성능상으로 차이가 클까요? 실제 배민과 같이 트래픽이 많은 현업에서도 50정도로 잡아서 사용하는지 궁금합니다!(long사이즈도 결국 한계가 있지 않나요?ㅠㅠ)
안녕하세요 ㅠㅠ 빌더패턴 사용시 이런식으로 구성하려고하는데요. 이렇게해서 INSERT를 하면 NULL로 받습니다. 그래서 이렇게 putOrder메소드를 만들어서 빌더패턴안에 포문으로 돌려서 해결했는데 이런식으로 하는게 맞는지(?) 되는지(?) 궁금합니다. 또한 https://www.inflearn.com/questions/419013/%EC%97%B0%EA%B4%80%EA%B4%80%EA%B3%84-%ED%8E%B8%EC%9D%98-%EB%A9%94%EC%86%8C%EB%93%9C-%EC%83%9D%EC%84%B1-%EB%A9%94%EC%86%8C%EB%93%9C%EC%97%90-%EB%8C%80%ED%95%B4-%EC%A7%88%EB%AC%B8%EB%93%9C%EB%A0%A4%EC%9A%94 여기서 질문한 것 역시 봤었는데, 왜 저는 저렇게 안되는 걸까요?? @@ 무슨 차이가 있는 걸까요???
test가 정상으로 처리되어 redisson을 추가하여 test하였습니다. RedissonLockStockFacadeTest는 이상이 없는데 LettuceLockStockFacadeTest를 재시도 한 결과 실패가 됩니다. 원인을 찾아보려고 다 다시 만들어봤지만 동일한 이슈가 발생하여습니다. 무엇이 문제일까요? redisson의 종속성을 삭제하고 돌리면 이상이 없음을 확인하였습니다. LettuceLockStockFacade 컴포넌트 와 RedissonLockStockFacade 컴포넌트는 함께 사용할 수 는 없나요? 또한 그 이유가 무엇인가요?
build.gradle를 오픈하자마자 다음과 같은 오류가 뜹니다ㅜㅜ 자바는 11버전 설치했고 강의 제일 처음, build.gradle부터 오픈하자마자 저런 오류가 났고 아무것도 안건들었습니다. <오류코드>- 일부만 가져왔습니다. A problem occurred configuring root project 'hello-spring'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.6') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 안녕하세요 16:29 질문입니다. <property name="hibernate.jdbc.batch_size" value="10"/> 이 부분이 햇갈립니다.. 이걸 하냐 안하냐 차이가 (쓰기지연시) 위 설정을 하면 DB 커넥션 한번에 10개의 쿼리를 보내준다는거고 위 설정을 안하면 쓰기지연 모드가 발동시 10번의 커넥션이 이루어 진다고 생각하면 되나요 ??
윈도우11 home을 사용하고있고 C:\html 경로에서 docker run 명렁어를 입력하였습니다. 혹시 틀린 부분이 있을까요? 위 방법으로 해결은 되었습니다. 다만 무슨차이가 있는것이고 왜 문제가 발생한지 모르겠어요 그리고 또하나 질문이 있습니다. docker run으로 실행하였을때 위에 이미지 처럼 뜨게되는데 이 상태에서 컨트롤 + c / 컨트롤 + d를 입력해도 명령이 종료가 되지않는데 어떻게 종료할 수 있을까요?