안녕하세요 선생님! 우선 좋은 강의 감사합니다. 다름이 아니라 앱 강의를 보고 공부를 하던 중에 react-query에 대해 궁금한 점이 있어서 질문드립니다. 게시글을 작성할 때 invalidateQuries를 이용해서 특정 달에 작성한 게시물 리스트를 조회해오는 캐시 데이터를 무효화 시켰습니다. 강의를 들을 때는 "아! 그렇구나~" 하고 지나갔던 부분인데 staleTime의 기본 값이 0이라는 사실을 알고 의문이 생겼습니다. reactQuery에서 staleTime을 지정하지 않으면 기본값 0이 적용되며 이는 데이터를 들고오자 마자 해당 데이터가 stale 상태로 변경된다는 것을 의미한다고 합니다. 그래서 무효화 쿼리가 없어도, staleTime의 값이 0이기 때문에, 캘린더 화면에 들어갔을 때는 새로 저장한 게시물에 대한 정보가 보여야 할 것으로 생각되는데, 생각과 다르게 invalidateQuery를 사용해야 하는 이유에 대해서 알 수 있을까요? 감사합니다!
export PATH=$HOME/.rbenv/shims:$PATH eval "$(rbenv init - zsh)" M1 맥북을 사용 중인데, zshrc 파일에 Ruby 버전을 변경하는 코드를 추가했지만 정상적으로 작동하지 않아 인텔 맥에서 사용하는 환경 변수 코드를 사용하니 버전이 변경되었습니다. 그러나 버전이 변경되었다고 해도 프로젝트를 생성할 때 환경 설정 문제가 발생합니다.
안녕하세요 선생님 대학교에서 캡스톤디자인을 수행하고 있는 학생입니다. 판결문에서 사건의 원인,판결 결과,가중·감소 처벌 요소,키워드를 추출하고 싶은데 어떤 기술을 사용해야할지 막막하여 질문올리게 되었습니다. 거대언어모델은 지양하라고 교수님께서 말씀하셨습니다..ㅜ 조언을 주신다면 감사하겠습니다.
안녕하세요 강사님! dags_python_with_ templates.py 파일에서 show_templates 함수를 아무 인자도 넣지 않고 실행을 시키는데요, dag 실행시 출력되는 키워드 인자들은 에어플로우 태스크 객체에 기본으로 입력되는 값들인가요? 정확한 원리가 궁금하여 여쭤봅니다
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] update 모드에서 기존엔티티에 @Column(unique = true) 를 사용한다음 재시작을 했는데, 변경 사항이 h2에 적용이 되지 않습니다. 그런데 @Column(name="username", unique=true) 를 하니 이번에는 ALTER 쿼리가 나가서 name과 unique 변경사항이 db에 적용이 됩니다. update 모드에서 @Column(unique = true) 를 했을때 적용이 되지 않고 @Column(name="username", unique=true) 이렇게 해야만 적용이 되는 이유를 알 수 있을까요?
16:29초에 order_item에서 order가 연관관계 주인이 된다고 하셨는데 order_item 엔티티 클래스 안에 보면 ```java @JoinColumn(name = "order_id") private Order order; ``` @JoinColumn을 한 order 외래키를 가진 order_item이 연관관계 주인 아닌가요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. ===================================== [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 앞서 질문한 학생들의 질문들과 구글링을 진행해봤지만 해결되지 않아 질문 남깁니다. 먼저 강의를 따라 쭉 타이핑을 했는데 Junit4 를 사용하여 테스트를 만들고 진행해 봤고, 테스트가 안되어서 build.gradle와 MemberRepositoryTest 등을 번갈아가면서 수정해봤지만 어떤것이 문제인지 모르겠습니다. 파일 링크 남겨드립니다. https://drive.google.com/file/d/1EsGR5F0YDa1G97u5616ZM8JeYwWZYjQr/view?usp=sharing
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 테스트를 실행하면 로그는 이렇게 찍힙니다. WARNING: A Java agent has been loaded dynamically (/Users/esyoleo/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.14.12/be4984cb6fd1ef1d11f218a648889dfda44b8a15/byte-buddy-agent-1.14.12.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release 어떻게 하면 좋을까요? JUnit은 4를 사용중이고, 필요한 설정은 build.gradle, yml 등에 모두 작성한 상황입니다.
안녕하세요! socket관련한 서비스를 진행해보고 싶어서 제로초님의 강의를 들은 수강생입니다. 현재 nest & flutter를 이용하고 있는데, flutter에서의 연결 및 다른 tool에서 socket io 연결이 되지 않으며 “외부 사이트로는 접근이 불가능한 오류” 가 생겨서 조심스럽게 여쭤봅니다. 현재 로직은 채팅을 생성시, 채팅을 보여주는 리스트가 실시간으로 새로고침이 되는 부분을 작업중입니다. 하지만, postman, httpie, hoppscotch의 부분에서 연결이 되지 않는 문제가 발생합니다. 많은 방법을 찾아봤지만, 터미널에서 socket io cli를 통해서 로그는 볼 수 있지만, 다른 tool에서는 이용이 불가능한 방법에 대해서 알고 싶어서 질문드립니다! Socket io를 통해서 local, dev서버 연결 완료 하지만 postman의 socket io기능을 통해서 테스트를 진행하려고 할 때, postman으로 연결 local에서는 문제가 없이 연길이 되지만, dev서버에서는 이러한 에러가 발생합니다. 또한 flutter 앱에서 연결을 하려면 다음과 같은 에러가 발생합니다. 오류 메시지 "WebSocketException: Connection to ' http://~~~~.com:81/socket.io/?EIO=4&transport=websocket# ' was not upgraded to websocket"는 클라이언트가 WebSocket 연결을 시도하였으나, 서버가 해당 연결을 WebSocket 프로토콜로 업그레이드하지 않았다는 것을 의미합니다. 이는 여러 가지 원인에 의해 발생할 수 있습니다: upgrade가 되지 않았다고 나와서 ,ngnix의 socket 부분에서 upgrade부분도 잘 넣어줬는데, 오류가 해결되지 않아서... 고민 끝에 질문 올립니다. Ngnix 설정부터 2주정도 시간을 들였지만, 해결이 되지 않아서…여쭤봅니다. 방화벽도 해제가 되어 있는데 연결이 안되고 있습니다.. 다음은 nest에서 작성한 코드 입니다! [chat.gateway.ts] import { WebSocketGateway, WebSocketServer, SubscribeMessage, OnGatewayConnection, OnGatewayDisconnect, OnGatewayInit, ConnectedSocket, MessageBody, } from '@nestjs/websockets'; import { Server, Socket } from 'socket.io'; @WebSocketGateway() export class ChatGateway implements OnGatewayInit, OnGatewayConnection, OnGatewayDisconnect { @WebSocketServer() server: Server; afterInit(server: Server) { console.log('WebSocket initialized'); } handleConnection(client: Socket) { console.log(`Client connected: ${client.id}`); // 수정: client 객체 직접 출력 대신 id 출력 } handleDisconnect(client: Socket) { console.log(`Client disconnected: ${client.id}`); } @SubscribeMessage('sendMessage') handleMessage( @ConnectedSocket() client: Socket, @MessageBody() data: { message: string } ): void { console.log(`Received message from ${client.id}: ${data.message}`); this.server.emit('newMessage', data); // 모든 클라이언트에게 메시지 전송 console.log(`Received message: ${data.message}`); } } [main.ts] import { ConfigService } from '@nestjs/config'; import { NestFactory } from '@nestjs/core'; import { NestExpressApplication } from '@nestjs/platform-express'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { join } from 'path'; import { AppModule } from './app.module'; import { HttpExceptionFilter } from './common/exceptions/http-exception.filter'; import { SuccessInterceptor } from './common/interceptors/success.interceptor'; import { IoAdapter } from '@nestjs/platform-socket.io'; import { CustomIoAdapter } from './adapters/custom-io.adapter'; async function bootstrap() { const app = await NestFactory.create<NestExpressApplication>(AppModule); app.useWebSocketAdapter(new CustomIoAdapter(app)); const configService = app.get(ConfigService); const port = configService.get('server.port'); const mongoUrl = configService.get('DB.MONGO_URL'); console.log('MongoDB URL:', mongoUrl); app.enableCors({ origin: true, credentials: true, }); app.useStaticAssets(join(__dirname, '..', 'client'), { prefix: '/api/v1/client', }); app.useGlobalInterceptors(new SuccessInterceptor()); app.useGlobalFilters(new HttpExceptionFilter()); app.setGlobalPrefix('api/v1'); const swagger_options = new DocumentBuilder() .setTitle('Nyam-Docs') .setDescription('API description') .setVersion('2.0.1') .addApiKey( { type: 'apiKey', name: 'x-token', in: 'header', description: 'Enter token', }, 'x-token', ) .addApiKey( { type: 'apiKey', name: 'x-type', in: 'header', description: 'Enter type', }, 'x-type', ) .build(); const document = SwaggerModule.createDocument(app, swagger_options); SwaggerModule.setup('api-docs', app, document); await app.listen(port, '0.0.0.0'); console.log(`Application Listening on Port : ${port}`); } bootstrap(); 다음은 custom한 io입니다 [custom.io.adpter.ts] import { IoAdapter } from '@nestjs/platform-socket.io'; import { INestApplication, Injectable } from '@nestjs/common'; import { ServerOptions } from 'socket.io'; @Injectable() export class CustomIoAdapter extends IoAdapter { constructor(app: INestApplication) { super(app); } createIOServer(port: number, options?: ServerOptions): any { const serverOptions: ServerOptions = { ...options, cors: { origin: '*', // 모든 도메인에서 접근 허용 methods: ['GET', 'POST', 'PUT', 'DELETE'], credentials: true }, transports: ['websocket', 'polling'], //pooling 없으면 연결 안 됨(socket) allowEIO3: true // Engine.IO 3.x 버전 클라이언트 허용 }; return super.createIOServer(port, serverOptions); } } 혹시 해결방법을 아시거나, 도움을 주실만한 정보가 있으시다면 알려주시면 정말 감사하겠습니다!
[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 코드팩토리 통합 링크 https://links.codefactory.ai Flutter 강의를 구매하시면 코드팩토리 디스코드 서버 플러터 프리미엄 채널에 들어오실 수 있습니다! 디스코드 서버에 들어오시고 저에게 메세지로 강의를 구매하신 이메일을 보내주시면 프리미엄 채널에 등록해드려요! 프리미엄 채널에 들어오시면 모든 질의응답 최우선으로 답변해드립니다!
[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
안녕하세요 코팩님! class 작성 시에 다른 class를 상속하여 작성하는 경우 있잖아요 nestjs/passport를 이용해서 구글 oauth 로그인을 구현하려고 합니다. import { PassportStrategy } from '@nestjs/passport'; import { Strategy } from 'passport-google-oauth20'; import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; @Injectable() export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { constructor(private readonly configService: ConfigService) { super({ clientID: this.configService.get('GOOGLE_CLIENT_ID'), clientSecret: this.configService.get('GOOGLE_CLIENT_SECRET'), callbackURL: 'http://localhost:3000/auth/google/callback', scope: ['email', 'profile'], }); } 이 경우에 super() 호출 전에 this 를 참조하려고 해서 에러가 발생합니다. 이런 경우에는 불가피하게 그냥 @Injectable() export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { constructor() { super({ clientID: process.env.GOOGLE_CLIENT_ID, clientSecret: process.env.GOOGLE_CLIENT_SECRET, callbackURL: 'http://localhost:3000/auth/google/callback', scope: ['email', 'profile'], }); } 이렇게 직접 환경변수를 적어주는 방법 밖에는 없을까요?
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
현제 45강까지 완료했고 구글링해서 user라는 키워드가 현제 제가 쓰고있는 버전에서는 예약어이기때문에 사용아 안된다는것까지 인지했습니다. 그래서 yml에 dev에 해당하는 url에 NON_KEYWORDS=USER까지 입력했고 User class에 @Table(name ="USER") 까지 적용해서 git을 이용해서 ec2서버에 적용했지만 동일한 오류가 발생합니다. 2일정도를 해결하려했는데 안되어서 질문 남깁니다. 저의 github 는 https://github.com/Jo-Jun-Yeong/library-app 입니다. 그리고 제가 사용하는 hc2 ip는 54.180.104.239 입니다 다른 인프런에 답글달아주신 글도 봤지만 user가 예약어이니 nonkeyword적용해라 이상의 해결을 못봤습니다.. /////////////////////////////////////////// 라고 질문하려했는데 마지막으로 ./gradlew build가 적용되지않아서 그런거지않을까? 해서 ./gradlew clean 후 build했더니 적용되었습니다. 특히 User.class에 @Table(name="user")적용을 해야 하는것 같습니다. 저처럼 2틀동안 삽질하지 않으셨으면 좋겟네요