38 강의 내용 관련입니다. import 'package:json_annotation/json_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:note_app/domain/util/order_type.dart'; part 'note_order.freezed.dart'; @freezed abstract class NoteOrder with _$NoteOrder { const factory NoteOrder.title(OrderType orderType) = NoteOrderTitle; const factory NoteOrder.date(OrderType orderType) = NoteOrderDate; const factory NoteOrder.color(OrderType orderType) = NoteOrderColor; } 위의 코드는 타입 매칭을 위한 거기 때문에 아래와 같이 dart 에서 지원하는 sealed 클래스를 사용하는 방법으로 고쳤습니다. import 'package:note_app/domain/util/order_type.dart'; sealed class NoteOrder<T> { const factory NoteOrder.title(OrderType orderType) = NoteOrderTitle; const factory NoteOrder.date(OrderType orderType) = NoteOrderDate; const factory NoteOrder.color(OrderType orderType) = NoteOrderColor; } class NoteOrderTitle<T> implements NoteOrder<T> { final OrderType orderType; const NoteOrderTitle(this.orderType); } class NoteOrderDate<T> implements NoteOrder<T> { final OrderType orderType; const NoteOrderDate(this.orderType); } class NoteOrderColor<T> implements NoteOrder<T> { final OrderType orderType; const NoteOrderColor(this.orderType); } order_section.dart 에서 Radio<NoteOrder>( value: NoteOrder.title(noteOrder.orderType), groupValue: noteOrder, onChanged: (NoteOrder? value) { onOrderChanged(NoteOrder.title(noteOrder.orderType)); }, activeColor: Colors.white, ), dart 지원 sealed 클래스를 사용하면 noteOrder.orderType에 접근이 안 되는데 어떻게 수정해야 할까요?
아래의 순서로 쿠버네티스 설치 작업하는 도중에 에러가 발생하고 있습니다. apt-get install -y apt-transport-https ca-certificates curl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list deb https://apt.kubernetes.io/ kubernetes-focal main EOF apt-get update [에러 로그] =================================================================== Err:7 https://packages.cloud.google.com/apt kubernetes-focal Release 404 Not Found [IP: 172.217.164.110 443] Reading package lists... Done E: The repository 'https://apt.kubernetes.io kubernetes-focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details =================================================================== 답변 부탁드립니다. 감사합니다. 수고하세요.
실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)
안녕하세요 강사님 덕분에 편히 배우고 있습니다. 다름이 아니라 이번 강의 초반에 @Transactional 어노테이션을 사용할 시 open 키워드를 클래스와 매서드에 다 사용해주어야 하고, 만약 이게 싫다면 플러그인을 적용해야 한다고 말씀하셨는데요, 찾아보니 코틀린에서는 기본적으로 모든 클래스가 최종 클래스고, 그렇기 때문에 상속이 되지 않아 open 키워드를 사용해 상속 가능성을 열어두어야 한다는 것 같더라구요. 그런데 왜 이게 @Transactional 어노테이션을 사용할 때도 해당되는 내용인지 잘 모르겠습니다. 프록시 객체가 생성되기 때문인 걸까요? 제가 코틀린 기본 강의를 들었음에도 잘 기억이 나질 않아 질문드립니다. 항상 감사드립니다.
learn-nuxt/layouts at master · joshua1988/learn-nuxt (github.com) 에 들어가도 layout를 보니 default.vue밖에 없습니다. 강사님의 다른 강의에서도 github 에 아이디 등록을 하라고 해서 등록을 해도 접근이 안되는 이유가 무엇인가요
"스프링 빈 조회" 내용 중 질문 있습니다. 아래는 제가 질문이 있는 코드 부분입니다. class ApplicationContextBasicFindTest { AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); @Test @DisplayName("빈 이름으로 조회") void findBenaByName() { MemberService memberService = ac.getBean("memberService", MemberService.class); assertThat(memberService).isInstanceOf(MemberServiceImpl.class); } ,,, } 여기서 빈을 조회할 때는 타입을 MemberService.class 로 조회하는데 조회한 빈을 검증할 때에는 MemberServiceImpl.class 로 이 타입의 인스턴스 인지를 확인하는데 이렇게 하는 이유가 AppConfig 에서 memberService() 메소드가 스프링빈으로 등록될 때 아래 처럼 반환하는 객체가 MemberServiceImpl 이라서 빈에 등록될 때 MemberServiceImpl 로 등록되어서 그런건가요?? @Configuration public class AppConfig { @Bean public MemberService memberService() { return new MemberServiceImpl(memberRepository()); } ,,, } 직접해보니 isInstanceOf(MemberService.class) 도 되더라구요. 제가 아직 배우는 단계라 살짝 헷갈려요 ㅠㅠ 문장이 너무 길지만 알려주시면 감사하겠습니다 ㅠㅠ
학습 관련 질문을 남겨주세요. 어떤 부분이 고민인지, 무엇이 문제인지 상세히 작성하면 더 좋아요! 먼저 유사한 질문이 있었는지 검색해 보세요. 서로 예의를 지키며 존중하는 문화를 만들어가요. 강의 듣다가 궁금한 점이 생겨서 질문을 작성합니다! Order 클래스는 @Entity 어노테이션이 붙어있는 도메인 객체인데 여기에 어떤 로직? 이라고 해야 하나요? List<OrderProduct> 를 바로 넣어주는 것이 아니고 List<Product>를 받아서 값을 뽑아서 new OrderProduct 로 생성하거나, calculateTotalPrice() 같은 메서드를 작성해도 괜찮은가요? (현업에서도 많이 쓰이는 방법인가요? 뭔가 따로 service로 빼도 괜찮지 않을까 라는 생각이 들었습니다. ) 전에 간단한 토이 프로젝트를 할 때 cascade = CascadeType.ALL 가 아닌 cascade = CascadeType.REMOVE 로 설정하고 Order을 생성한 후 OrderProduct를 수동으로 생성했었는데 CascadeType.ALL 이 더 범용적으로 많이 쓰는 방법인지 테스트 코드 작성법을 배우려고 듣게 되었는데 뭔가 라이브 코딩을 따라가면서 전반적으로? 많이 배우고 있어서 좋아요! ㅎㅎ 좋은 강의 감사합니다.
실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)
Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. 이런 오류가 나는데요 코틀린 버전을 바꿔야할까요?
[질문 내용] 대댓글을 확인안해주시는 것 같아 질문 다시 올립니다 ! 의존관계가 잘못되었는지 테스트 3개가 다 안 돌아갑니다 뭐가 잘못된건지 모르겠습니다 .. https://drive.google.com/file/d/1yZWpxXR6pZD3RVN6Zt3ni5hFttutBKrj/view?usp=sharing
안녕하세요. 항상 잘 보고 있습니다. 감사합니다. ChatGPT API Key 발급받고 python 예제 복사해서 실행 여부 확인하고 있는데 처음부터 에러가 발생하는데 당췌 알 수가 없습니다. 어떻게 해결해야 할지 조언 부탁드립니다. 막혀서 진행을 하지 못하고 있습니다. completion = openai.ChatCompletion.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\ChatGPT_원고자동생성기\venv\Lib\site-packages\openai\lib\_old_ api.py ", line 39, in __call__ raise APIRemovedInV1(symbol=self._symbol) openai.lib._old_api.APIRemovedInV1: You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API. You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28` A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742 참고로 사용하고 있는 파이썬 버전(3.11.5)과 openai 버전(1.14.3버전입니다. 코드를 수정해야 할 듯한데 ChatGPT에 질문을 해도 해결이 안됩니다. 해결하신 분 있으시면 답변 부탁드릴께요~
h2.properties 에서 포트번호를 다른 번호로 바꾸고 해봐도 이전에 했던 h2 포트로 연결이 되더라구요... 별도 프로젝트를 다른 포트로 연결하고 싶을 땐 세팅을 어떻게 해야할까요? 찾아봐도 잘 안돼서 질문드립니다. (스프링 프로젝트이고 gradle 사용하여 application.properties 에 해당 h2 db 연결하려고 하는 상황입니다)
쿠버네티스 설치 작업하는 도중에 에러가 발생하고 있습니다. 쿠버네티스 설치 명령어 순서 apt-get install -y apt-transport-https ca-certificates curl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list deb https://apt.kubernetes.io/ kubernetes-xenial main EOF apt-get update apt-get update 명령어를 사용하면 404 에러가 뜨고 있습니다. root@k8s-master:/home/vagrant# apt-get install -y apt-transport-https ca-certificates curl Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20230311ubuntu0.20.04.1). The following NEW packages will be installed: apt-transport-https The following packages will be upgraded: curl libcurl4 2 upgraded, 1 newly installed, 0 to remove and 99 not upgraded. Need to get 398 kB of archives. After this operation, 162 kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.10 [1,704 B] Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.21 [161 kB] Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4 amd64 7.68.0-1ubuntu2.21 [235 kB] Fetched 398 kB in 4s (110 kB/s) Selecting previously unselected package apt-transport-https. (Reading database ... 112280 files and directories currently installed.) Preparing to unpack .../apt-transport-https_2.0.10_all.deb ... Unpacking apt-transport-https (2.0.10) ... Preparing to unpack .../curl_7.68.0-1ubuntu2.21_amd64.deb ... Unpacking curl (7.68.0-1ubuntu2.21) over (7.68.0-1ubuntu2.19) ... Preparing to unpack .../libcurl4_7.68.0-1ubuntu2.21_amd64.deb ... Unpacking libcurl4:amd64 (7.68.0-1ubuntu2.21) over (7.68.0-1ubuntu2.19) ... Setting up apt-transport-https (2.0.10) ... Setting up libcurl4:amd64 (7.68.0-1ubuntu2.21) ... Setting up curl (7.68.0-1ubuntu2.21) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9.9) ... root@k8s-master:/home/vagrant# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - OK root@k8s-master:/home/vagrant# cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list > deb https://apt.kubernetes.io/ kubernetes-xenial main > EOF deb https://apt.kubernetes.io/ kubernetes-xenial main root@k8s-master:/home/vagrant# apt-get update Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Hit:3 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 https://download.docker.com/linux/ubuntu focal InRelease Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease Ign:6 https://packages.cloud.google.com/apt kubernetes-xenial InRelease Err:7 https://packages.cloud.google.com/apt kubernetes-xenial Release 404 Not Found [IP: 142.251.214.142 443] Reading package lists... Done E: The repository 'https://apt.kubernetes.io kubernetes-xenial Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
[질문 내용] MvcMemberFormServlet에서 new-form을 실행 시, (로컬호스트 8080에서 서블릿 mvc 회원가입 선택 시) Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Mar 27 13:50:18 GMT+09:00 2024 There was an unexpected error (type=Not Found, status=404). 에러가 발생합니다. (1) build.gradle에 jsp 관련 디펜던시도 잘 들어간 상태이고 (2) 오타도 없어보이는데 무슨 문제일까요? 답변에 압축파일 올려드리겠습니다.
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 외장톰캣 사용시엔 server.xml 등 나와있는 파일로 보안취약점 조치를 했는데요. 수업들으면서 내장톰캣의 장점은 잘들었습니다. 내장톰캣은 어떤식으로 보안취약점 조치를 진행하나요? 궁금합니다.
스프링 통합 테스트에서 회원 가입 테스트 할 때 오류가 뜹니다. java.lang.ClassNotFoundException: org.h2.Drivers at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass( BuiltinClassLoader.java:641 ) db 연동이 안되서 뜨는 것 같은데... db도 제대로 실행 시키고 한 것 같은데 왜 안되는지 모르겠습니다. 살려주세요 흐규... 프로젝트 구글 드라이브로 첨부합니다. https://drive.google.com/file/d/1FKsLKXU9ZfqIaolEiOpAh3g6WCJ3fGAr/view?usp=sharing