안녕하세요. 이전강의들을 포함해서, "파이썬 기본 환경 설정(2-1) : 개발 환경 설정(Vscode) - Windows" 강의 내용을 그대로 따라서 했습니다. 그런데 해당 강의 동영상의 25:33에서처럼 Ctrl+F5 단축키를 누르거나 Run 메뉴에서 Run Without Debugging을 직접 선택해도, 강의에서처럼 Hello python!이 출력되지 않고 이렇게 Select debugger라고 나옵니다. 이때 무엇을 선택해야 하나요? 어떻게 하면 강사선생님처럼 Run Without Debugging을 실행할 수 있나요? 참고로 오른쪽 상단의 오른쪽 방향 세모 아이콘을 클릭하면 문제없이 실행하고 Hello python!이 출력됩니다. (저는 단축키 설정에 대해서 질문을 드린 게 아닙니다.)
[질문 내용] 제가 생각하는 양방향 연관관계를 사용하는 이유는 다음과 같습니다. 1) 조회 : team.getMembers().stream ... 근데 이러면 모든 Member 들이 DB에서 불러와지니까 만약 조회해야 할 대상이 많은 경우(members가 너무많아서 페이징 처리를 해야 하는 경우) 는 양방향 연관관계를 삭제하고 그냥 JpaRepository 에서 쿼리로 페이징 쿼리를 작성해야 한다. 2) CascadeType.all 혹은 orphanRemoval true 를 위한 매개체 1번, 2번 이외에는 쓸데없는 것 맞을까요?? 특히 강조한 부분의 제 생각이 맞는지 궁금합니다.
[Nest] 16188 - 2024. 03. 17. 오후 12:19:06 ERROR [ExceptionHandler] Nest can't resolve dependencies of the UsersService (?). Please make sure that the argument "UserRepository" at index [0] is available in the AuthModule context. Potential solutions: - Is AuthModule a valid NestJS module? - If "UserRepository" is a provider, is it part of the current AuthModule? - If "UserRepository" is exported from a separate @Module, is that module imported within AuthModule? @Module({ imports: [ /* the Module containing "UserRepository" */ ] }) Error: Nest can't resolve dependencies of the UsersService (?). Please make sure that the argument "UserRepository" at index [0] is available in the AuthModule context. Potential solutions: - Is AuthModule a valid NestJS module? - If "UserRepository" is a provider, is it part of the current AuthModule? - If "UserRepository" is exported from a separate @Module, is that module imported within AuthModule? @Module({ imports: [ /* the Module containing "UserRepository" */ ] }) at Injector.lookupComponentInParentModules (D:\BackEnd\class\section11\11-02-login-authentication\node_modules\@nestjs\core\injector\injector.js:254:19) at Injector.resolveComponentInstance (D:\BackEnd\class\section11\11-02-login-authentication\node_modules\@nestjs\core\injector\injector.js:207:33) at resolveParam (D:\BackEnd\class\section11\11-02-login-authentication\node_modules\@nestjs\core\injector\injector.js:128:38) at async Promise.all (index 0) at Injector.resolveConstructorParams (D:\BackEnd\class\section11\11-02-login-authentication\node_modules\@nestjs\core\injector\injector.js:143:27) at Injector.loadInstance (D:\BackEnd\class\section11\11-02-login-authentication\node_modules\@nestjs\core\injector\injector.js:70:13) at Injector.loadProvider (D:\BackEnd\class\section11\11-02-login-authentication\node_modules\@nestjs\core\injector\injector.js:97:9) at D:\BackEn yarn start:dev 실행 시, 위와 같은 오류가 발생하여, users.module.ts 파일의 exports 부분을 아래와 같이 수정하였습니다. exports: [ TypeOrmModule, // 원래는 TypeOrmModule이 아닌 => UsersService(강의 기준) ], 이렇게 수정하니, 문제는 해결되었는데, 이렇게 수정해도 괜찮은지, 이유가 무엇인지 잘 모르겠어 여쭤봅니다.
코드 select p.product_id, round((sum(u.units*p.price) / sum(u.units)),2) as average_price from Prices as p inner join UnitsSold as u on p.product_id = u.product_id where u.purchase_date between p.start_date and end_date group by p.product_id 현재 inner join으로 코드를 작성해봤습니다. submit을 하고나니 아래와 같이 테스트케이스에 통과하지 못했습니다! [ 문제 상황 ] 테스트케이스를 확인해보니 Prices 테이블에 product_id가 3인 row가 있음 inner join을 했으므로 3번에 대한 결과가 나오지 않음 실제 결과값에는 3번도 포함되어야한다 [ 궁금한 사항 ] 결과를 만족하려면 left outter join을 사용해야할 것 같습니다. 하지만 어떻게 해야지 잘 적용할 수 있는지 감이 잘 안옵니다. left outer join을 활용한 풀이와 설명 부탁드립니다!
안녕하세요 카일님. 연습문제 관련 질문드립니다. join 연습문제 3번: 고향=포켓몬 잡은 위치 같은 것만 구하려면 레프트 조인 쓰지 않고 그냥 아래처럼 이너조인으로 쓰는 게 낫지 않을까요? 레프트 조인을 쓰신 사유가 따로 있으실까요? select count(distinct tp.trainer_id) as trainer_cnt FROM `inflearnbigquery1.basic.trainer` t join `inflearnbigquery1.basic.trainer_pokemon` tp on t.id =tp.trainer_id and t.hometown=tp.location join 연습문제 4번: 저는 아래와 같이 풀었는데 (각 테이블을 서브쿼리에서 where조건으로 범위를 줄여놓고 조인하고자 했습니다) 왜 count(tp.pokemon_id) 나 count(distinct tp.pokemon_id)를 하지 않고 count(tp.id)를 하는지 이해가 잘 안 갑니다..! 5번 문제도 마찬가지로 왜 count( tp.id )인지 동일한 이유로 이해가 잘 안 가요...! 그리고 4번에서 count(tp.id)를 하더라도 아래와 같이 풀면 정답과 같이 water 속성이 나오는데 저는 cnt가 69가 나오네요. (정답에선 14) select -- tp.trainer_id, -- tp.pokemon_id, -- p.type1 p.type1, -- count(pokemon_id) as pokemon_cnt count(tp.id) as cnt from (select id,trainer_id, pokemon_id, status from `inflearnbigquery1.basic.trainer_pokemon` where status in ('Active', 'Training')) tp left join (select id, achievement_level from `inflearnbigquery1.basic.trainer` where achievement_level = 'Master') t on tp.trainer_id = t.id left join (select id, type1 from `inflearnbigquery1.basic.pokemon`) p on tp.pokemon_id = p.id group by 1 order by 2 desc limit 1 아래처럼 풀면 14가 나오는 걸 보니... from 절은 서브쿼리로 범위를 줄여놔도 되지만 레프트조인 절에 들어가는 건 서브쿼리로 하면 안되는 거였을까요? 바깥에서 where master 조건을 줘야하는데 안에서 준 게 잘못된 것으로 추정되는데... 위 쿼리처럼 하면 왜 안되는 걸까요? select p.type1, count(tp.id) as cnt from (select id,trainer_id, pokemon_id, status from `inflearnbigquery1.basic.trainer_pokemon` where status in ('Active', 'Training')) tp left join `inflearnbigquery1.basic.trainer` t on tp.trainer_id = t.id left join `inflearnbigquery1.basic.pokemon` p on tp.pokemon_id = p.id where t.achievement_level = 'Master' group by 1 order by 2 desc limit 1
실습에 문제 발생 시 최대한 캡쳐 화면을 꼭 올려 주세요. (원인 파악에 도움이 큽니다) 영상 내용 질문 시 해당 영상 제목과 내용이 있는 시간을 같이 올려주세요. (내용을 다시 들어보고 답변을 드리기 위해서 입니다) 긴 로그는 제 메일로 보내주세요. (k8s.1pro@gmail.com) 카페 [강의 자료실]에도 많은 질문과 답변들이 있어요! cafe: https://cafe.naver.com/kubeops 안녕하세요! 선생님 강사소개편을 감동하면서 봤습니다. 역시 일프로는 다른것같아요.저도 선생님을따라 업무나 공부에 있어서 큰 그림을 그려보고싶은데 따로 툴은 ppt를 이용하셨나요??
안녕하세요? 템플릿을 Espanso를 활용하는 방법 알려주셨는데, 회사 컴퓨터에 해당 프로그램을 깔기가 조금 어려운 상황입니다. 회사 컴퓨터에는 Python이 깔려있고, 사용하는 SQL은 DBeaver (PrestoSQL)인데요. Python을 활용해서 Espanso 활용한 것처럼 템플릿이 뜨게끔 할 수 는 없을까요? PM 강의, SQL 기초 강의도 너무 잘 봤습니다. 심화강의는 언제쯤 업로드 예정이신지 알 수 있을까요? 심화강의 올라왔을 때 알람을 받아볼 방법이 있을지요? 너무 기다려집니다!!!! 감사합니다.
안녕하세요! 🙃 이런 질문 올려도 되는지 모르겠지만 .. 여태 로컬에서 여러 컨테이너 띄워서 테스트 하다가 궁금한게 생겼습니다.. 실제로 도커를 사용하는 환경이라고 해야되나 어떻게 활용되는지 궁금해서요! 강의에서는 3티어로 한 서버(로컬)에서 한번에 구성하는걸 알려주셨는데 개발 할 땐 편할거 같지만 배포하고 운영할때는 어떻게 사용되는걸까요? (서버 한대에 3티어를 구성할때 사용할수는 있을것 같지만요.. 🤔 ) 아래를 예로 들자면(실제로 서버를 이렇게 구성하는게 맞는건진 모르겠네요.. 😭 ) 프론트-리액트 백엔드-스프링부트 Db-redis, mysql 이렇게 사용한다고 했을때 실제 현업 서비스라면 Nginx-클라우드 서버 2대 사용 Was-클라우드 서버 2대 사용 Db-클라우드 서버 3대(?) 사용 (mysql 이중화, 캐시용 redis 1대) 이렇게 서버를 여러개 써서 구축할텐데 각각 서버에 직접 프로세스 하나씩 띄우는게 기존 방식인 상태인거죠.. 🤔 이 상태에서 ci/cd를 구축하기 위해서 컨테이너 기술을 사용한다면… 각각 웹, 와스, db 서버에서 전부 도커로 띄우게 되는 걸까요? 프론트랑 백은 배포까지 해야할테니 그럴것 같은데 db도 도커로 띄우면 장점이 있나요? 3티어를 전부 쿠버네티스로 관리하기 위한 게 맞을까요..? 각각 서버 하나에 컨테이너 하나씩 띄워서 운영되는 건지.. 한 서버에 내에서 컨테이너로 이중화 하는 상황도 있는건지… 궁금합니다🥹🥹🥹🥹 실제로 개인 프로젝트를 클라우드 서버에 배포 해보고 싶어서 질문이 많았네요 😅
8.5에서 업데이트 기능 구현 전, 오류를 없애기 위해서 readonly 속성을 적용시켰었는데, readonly를 지우지 않고도 onChange가 동작해서 여쭤봅니다. onchange가 값이 변경될 때 실행되는 걸로 알고 있는데, readonly인데 값이 변경될 수 있나요? 8.6) Update 입니다.
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
26강까지 내용을 모두 따라하고 실행하니 다음과 같은 오류가 뜹니다 j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] o.s.boot.SpringApplication : Application run failed yml 설정도 잘 하고 mySql 버전도 맞는데 왜 오류가 날까요? ㅜㅜ
입문자를 위한 Spring Boot with Kotlin - 나만의 포트폴리오 사이트 만들기
실습 2 클래스 생성 3분 에아래 코드를 작성했는데 @MappedSuperclass Kotlin: Unresolved reference: MappedSuperclass 오류가 떠요 "persistence" 이것도 안보여요 import jakarta.persistence.MappedSuperclass build.gradle.kts 의존성은 아래처럼 되어 있어요 plugins { id("org.springframework.boot") version "3.2.3" id("io.spring.dependency-management") version "1.1.4" kotlin("jvm") version "1.9.22" kotlin("plugin.spring") version "1.9.22" } dependencies { implementation("org.springframework.boot:spring-boot-starter-thymeleaf") implementation("org.springframework.boot:spring-boot-starter-validation") implementation("org.springframework.boot:spring-boot-starter-web") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("org.jetbrains.kotlin:kotlin-reflect") runtimeOnly("com.h2database:h2") runtimeOnly("com.mysql:mysql-connector-j") testImplementation("org.springframework.boot:spring-boot-starter-test") } 깃은 https://github.com/justkjy/portfolio-justkim 입니다. 왜 못찾는다고 할까요? 추가 왜 JPA 관련 에러가 계속 나는걸까요??
run은 아래와 같이 T에 대한 확장 함수를 받는데 public inline fun <T, R> T.run(block: T.() -> R): R { return block() } personReopository의 save를 메서드 레퍼런스로 호출할 때 person 객체 즉 this 를 넘겨야하는데, 위의 run의 구현부를 봤을 때 는 파라미터로 아무 것 도 넘겨 주지 않고 어떻게 this를 받아서 아래 와같이 사용이 될수있는지 궁금합니다. val person= Person(name: "최태현", age: 100).run(personRepository::save)