묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨Microservice 구현 (with EDA,Hexagonal, DDD)
domain.model.event에 정의되는 객체들에 대한 질문이 있습니다
MSA강의 재밌게 잘 보고 있습니다 👏 강의를 보던 중 카프카 연동을 위해 kafkaadapter와 event 패키지를 정의하고 객체들을 넣고있는데, 저희 회사에서도 겪고 있는 문제가 떠올라서 궁금한게 생겼는데, 프로듀싱하는 서비스와, 컨슘하는 서비스의 프로토콜을 ItemReturned, ItemRented등으로 정의하고 내부 값에서IDName등을 사용한다고 할 때 이 프로토콜 스펙이 변경될 때마다 각 팀별로 객체 정보를 수정한다고 하면, 마치 서비스내에 코드 중복들이 된 상태에서 기능이 변경될때마다 중복된 코드들을 같이 관리하며 싱크를 맞춰줘야하는 작업들과 유사해보이는데, 이에 대해서는 어떻게 풀어나가야 하나요? 즉, 서비스간에 데이터 송수신을 위한 객체들이 중복코드처럼 보이는데 스펙변경이 있을때마다 각 서비스마다 직접 코드 수정을 하는건 한 팀에서 수정을 누락하거나 관리를 놓친 프로젝트에서 수정이 누락되면 문제가 될 수 있을 것 같은데 어떤식으로 풀어나가는지 궁금합니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
연관관계 편의 메소드 작성 기준 질문이요
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.public void setMember(Member member) { this.member = member; member.getOrders().add(this); } public void addOrderItem(OrderItem orderItem) { orderItems.add(orderItem); orderItem.setOrder(this); } public void setDelivery(Delivery delivery) { this.delivery = delivery; delivery.setOrder(this); }Order 클래스 내의 연관관계 편의 메소드 코드인데요영한님께서 연관관계 편의 메소드는 컨트롤 하는 쪽에서작성하는것이 좋다고 하셨는데 Order는 Member와 OrderItem을 mappedBy로 참조하고 DB에서 조회만 할수 있는데 Order 클래스 내에 작성하신 이유가 궁금해요컨트롤은 연관관계의 주인인 엔티티객체에서 하는것이 아닌가요?아니면 컨트롤이라고 말씀하신게 객체 관점에서 말씀하신건가요?
-
해결됨스프링 핵심 원리 - 기본편
의존성에 대해 궁금한것이있습니다
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]강의 보면 9분에 FixDiscountPolicy가 DIscountPolicy를 의존하고 있다고하는데 제가 알고있는 의존은 A클래스에서 B클래스를 new 로 생성하면 A가 B를 의존한다라고 알고있는데 인터페이스를 구현한 구현 객체도 의존한다고하니까 잘모르겠네요
-
미해결
css position absolute설정 시 space-between이 실행되지 않습니다.
cssbody { height: 97vh; display: flex; justify-content: center; align-items: center; background-color: #f3f3f5; } .sedow { box-shadow: 0 0px 20px 5px rgba(128, 128, 128, 0.1); } .insedow { color: rgba(128, 128, 128, 0.7); } .white-color { color: #ffffff; } .font-weight-lg { font-weight: 600; } .screen-first { height: 170mm; width: 90mm; background-color: #ffffff; margin: 50px; border-radius: 40px; position: relative; } .screen-second { height: 170mm; width: 90mm; background-color: wheat; margin: 50px; border-radius: 40px; } .screen-first-icon_box { display: flex; justify-content: space-between; margin: 50px 25px 0; } .screen-first_profile_box { display: flex; justify-content: center; margin-top: 30px; } .screen-first_profile { height: 80px; width: 80px; background-color: orange; border-radius: 50%; box-shadow: 0 0px 15px 10px rgba(255, 180, 40, 0.3); } .screen-first_profile_name { text-align: center; font-size: x-large; font-weight: 750; margin-top: 40px; } .screen-first_profile_genre { text-align: center; font-weight: 600; color: rgba(128, 128, 128, 0.7); margin-top: 15px; } .screen-first_button-box { margin-top: 35px; display: flex; justify-content: center; } .screen-first_button-box_button1 { padding: 12px 32px; border-radius: 30px; background-color: black; color: #ffffff; margin-right: 5px; } .screen-first_button-box_button2 { padding: 12px 20px; border-radius: 30px; background-color: #ffffff; color: rgba(128, 128, 128, 0.7); margin-left: 5px; font-weight: 550; } .fa-heart { color: black; } .screen-first_song-list { justify-content: center; align-items: center; flex-direction: column; margin-top: 20px; margin-left: 15px; margin-right: 15px; } .screen-first_song-list_profile { display: flex; align-items: center; padding: 15px 25px; position: relative; border-radius: 20px; } .screen-first_song-list_profile_img { display: flex; align-items: center; justify-content: center; height: 45px; width: 45px; background-color: tomato; border-radius: 10px; } .screen-first_song-list_profile_text { margin-left: 15px; } .fa-ellipsis-vertical { color: rgba(128, 128, 128, 0.7); position: absolute; right: 20px; } .screen-first_song-list_profile_text_title { margin-bottom: 5px; font-size: small; } .fa-chart-simple { color: #ffffff; } .screen-first_music-player { display: flex; justify-content: space-between; align-items: center; position: absolute; bottom: 5px; } .screen-first_music-player { background-color: #222222; padding: 15px 30px; margin: 10px 15px; border-radius: 50px; } .screen-first_music-player_text_singer { margin-bottom: 7px; } .fa-pause { margin: 0 20px; } 추가로 reset.css 2.0도 적용하여 사용하고 있습니다./* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ""; content: none; } table { border-collapse: collapse; border-spacing: 0; } html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <link rel="stylesheet" href="css/reset.css" /> <link rel="stylesheet" href="css/style.css" /> <script src="https://kit.fontawesome.com/3373615a5c.js" crossorigin="anonymous" ></script> </head> <body> <div class="screen-first"> <div class="screen-first-icon_box"> <i class="fa-solid fa-arrow-left fa-lg"></i> <i class="fa-solid fa-magnifying-glass fa-lg"></i> </div> <div class="screen-first_profile_box"> <div class="screen-first_profile"></div> </div> <h1 class="screen-first_profile_name">Tyler, The Creator</h1> <h4 class="screen-first_profile_genre">Rap, Hip-Hop</h4> <div class="screen-first_button-box"> <div class="screen-first_button-box_button1">Shuffle</div> <div class="screen-first_button-box_button2 sedow"> <i class="fa-solid fa-heart fa-lg"></i> 212 971 </div> </div> <ul class="screen-first_song-list"> <li class="screen-first_song-list_profile"> <div class="screen-first_song-list_profile_img"></div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> <li class="screen-first_song-list_profile sedow"> <div class="screen-first_song-list_profile_img"> <i class="fa-solid fa-chart-simple fa-xl"></i> </div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> <li class="screen-first_song-list_profile"> <div class="screen-first_song-list_profile_img"></div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> <li class="screen-first_song-list_profile"> <div class="screen-first_song-list_profile_img"></div> <div class="screen-first_song-list_profile_text"> <h4 class="screen-first_song-list_profile_text_title insedow font-weight-lg" > Tyler, the Creator </h4> <h2 class="screen-first_song-list_profile_text_singer font-weight-lg" > EARFQUAKE </h2> </div> <i class="fa-solid fa-ellipsis-vertical fa-xl"></i> </li> </ul> <div class="screen-first_music-player"> <div class="screen-first_music-player_text"> <div class="screen-first_music-player_text_singer insedow"> Tyler, The Creartor </div> <div class="screen-first_music-player_text_title white-color font-weight-lg" > NOVEMBER </div> </div> <div> <i class="fa-solid fa-backward-step fa-lg white-color"></i> <i class="fa-solid fa-pause fa-2xl white-color"></i> <i class="fa-solid fa-forward-step fa-lg white-color"></i> </div> </div> </div> <!-- <div class="screen-second"></div> --> </body> </html> 이상하게 position absolute시에만 space-between이 작동하지 않습니다. 아무리 고민해보아도 원인을 파악할 수 없어 질문드립니다. ㅜㅜ
-
미해결[게임 프로그래머 입문 올인원] C++ & 자료구조/알고리즘 & STL & 게임 수학 & Windows API & 게임 서버
SetConsoleTextAttribute 함수 특수문자 겹침 현상..
위와 같은 현상이 왜일어나는지 아시나요?같은 색으로 하면 괜찮습니다..색은 변경할때 반칸씩 밀려 겹쳐 보이네요..간단한 코딩 아래첨부합니다..#include <iostream>int main(){ int temp = 0; for (int y = 0; y < 25; y++) { for (int x = 0; x < 25; x++) { temp++; //단일색 안밀림.. //SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 1); //색변경시 밀림.. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), temp % 3 == 0 ? 1 : 2); cout << "■"; } cout << endl; }} 환경은 윈도우 11입니다.
-
해결됨Next + React Query로 SNS 서비스 만들기
fetch web api 에 next 옵션
fetch 함수가 그냥 web API 같은데fetch 함수에 next 라는 속성이 들어간건데 따로 임포트해온것도 아닌데 어떻게 작동되는건가요?next 가 내부적으로 fetch 를 새로 만든건가요?
-
미해결리눅스 입문 - 개념으로 탄탄히!!
리눅스 설치 광학 드라이브 선택안됨
안녕하세요 리눅스 설치 강좌에서 광학 드라이브가 저렇게 회색으로 뜨고 파일 선택이 되지 않아서 문의드립니다 ㅜ
-
해결됨스프링 핵심 원리 - 기본편
Interface를 구현한 객체가 2개라면 Dependency Injection은?
@Autowired public MemberServiceImpl(MemberRepository memberRepository) { this.memberRepository = memberRepository; } @Component public JDBCMemberRepository implements MemberRepository {...} @Component public MybatisMmeberRepository implements MemberRepository{...} <전제>ConfigurationFile에 @ComponentScan 을 적용한 상태고아래와 같은 상황이 있으며,dependency 관계가 위와 같다면 <상황>ApplicationContext에서 getBean()을 통해 객체를 사용하고자 할때 dependency injection을 한다면 <결과예상>어떤 객체가 injection되는건가요?JDBC MemberRepositoryMybatisMemberRepository <질문하는 이유>Spring Container에서는 Component로 등록한 Bean을 ComponentScan으로 자동으로 등록하며, ApplicationContext 객체를 만드는 시점에서 dependency를 추적하고 , getBeans로 객체를 만드는 시점(`new [xxx]`)에서 그에 따라 Runtime에 dependent한 객체를 주입한다고 알고 있습니다.그럼, <상황> 의 경우에는, 역할인 interface를 type으로 하여 생성자 주입을 받고있는데, Spring에서는 무엇을 선택하는지 모르겠고,근거는 무엇이고제가 영상에서 놓친 부분이 있다면, 그것이 어느 영상의 어느 부분까지인지는 몰라도어느 영상이나 어느 파트에서 알려주신건지라도 알려주세요. 제가 글로 적은 부분에서 오류가 있다면 같이 잡아주셨으면 합니다.
-
해결됨넓고 얕게 외워서 컴공 전공자 되기
컴퓨터가 글자를 다루는 방법 8:00 바이너리 질문
강의에서 2진수로 나열해서 보는 정보를 바이너리라고 하셨는데 16진수로 적혀있는 것 아닌가요?
-
해결됨김영한의 실전 자바 - 기본편
다음 강의는 몇월쯤에 나오나요?
2024년도 초반이라고 하셨는데, 조금 급한 상황이라서요 ㅠㅠ 몇월쯤에 나오는 지 궁금합니다!
-
미해결파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자
파이썬 설치 과정
파이썬을 설치하는데 설치 경로 줄이려고 customize installation에 들어가서 python숫자 를 제외한 나머지를 지우라고 하셨는데 지우면 설치에서 계속 오류가 뜹니다ㅜㅜ 그래서 안건들고 설치 해봤는데 그러면 설치가 돼요ㅜ설치된 상태에서 수업 계속 진행 하다가 hello world에서 python interpreter클릭하고 맨 위에 python를 클릭하라고 하셨는데 저는 python이 안뜹니다ㅜㅜpython is not installed라고 떠요
-
해결됨데이터 분석 SQL Fundamentals
::timestamp ::text 관련 질문이 있습니다.
to_date('2022-01-01', 'yyyy-mm-dd')::timestamp;여기서 ::timestamp를 통해 타임스탬프 형태로 바꿔주는데to_timestmap('2022-01-01', 'yyyy-mm-dd') 로 바로 해 주는 것과 무슨 차이가 있나요?
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
method patch 설정시 404에러
- id: user-service uri: lb://USER-SERVICE predicates: - Path=/user-service/** - Method=PATCH filters: - RemoveRequestHeader=Cookie - RewritePath=/user-service/(?<segment>.*), /$\{segment} - AuthorizationHeaderFilter 이렇게 작성했는데요@postmapping("/user/test")@patchmapping("/user/test")포스트는 잘동작하는데 패치는 404가 납니다뭐가 문제일까요?
-
미해결스프링부트 시큐리티 & JWT 강의
로그인 방식에 대해서 궁금한게 있습니다!
안녕하세요 유튜브 메타코딩 시절부터 즐겨봤는데 인프런에서도 보니 반갑네요! ㅎㅎ 다름이 아닌 로그인 방식에 대해서 궁금하게 생겨서 질문 드립니다.현재 프로젝트에서 로그인 방식은프론트에서 아이디와 비밀번호를 전송함Controller에서 아이디와 비밀번호를 받아 Service단에서 로그인 로직을 돌며 DB와 비교하여 로그인의 성공 유무를 알려줌 (성공시 JWT 제공) (정해진 JSON 형식대로 DTO에 담아 프론트에 제공)그 후 요청마다 JWT를 JWTAuthenticationFilter에서 인증함. 그런데 문득 강의를 듣다보니 로그인 방식을 굳이 Service 단으로 가져가지 않고 필터단에서 처리하는게 더 괜찮은 방식이며 Spring Security를 더 적절히 사용하는게 아닐까라는 생각이 들었습니다.이렇게 된다면 사용자가 입력한 아이디와 비밀번호를 Custom 필터에서 로그인을 진행하게 되겠네요. 하지만 이렇게 될 경우 현재 프로젝트에서 사용하는 로그인 방식과는 다르게 DTO에 담지 못하니 직접 response에 현재 정해진 JSON 형식대로 만들어 보내주는 방법밖에 없을거 같은데 이러한 방식이 주로 사용되는 방식일까요?!
-
미해결Django 프레임워크 제대로 배우기 Part.2
idx값을 가져올 때 views.py에서 매개변수 형태로 가져오는 것과 idx = request.POST['idx'] 형태로 가져오는 것의 차이를 모르겠습니다.
views.pydef delteMemo(requset,idx): db_article = Memo.objects.get(id = idx) db_article.delete() return HttpResponseRedirect(reverse('main')) def updateMemo(request): idx = request.POST['idx'] memoContent = request.POST['memoContent'] #실질적인 DB에서의 수정처리 db_article = Memo.objects.get(id = idx) db_article.memo_txt = memoContent db_article.save() return HttpResponseRedirect(reverse('main')) 강의 내용을 보면 views.py에는 이와 같은 코드가 작성됩니다. 두 함수 모두 DB에 접근하기 위해 idx 값을 가져와야 하는데 왜 방식이 다른 건지 모르겠습니다.
-
미해결김영한의 자바 입문 - 코드로 시작하는 자바 첫걸음
4.조건문에서 switch문 강의 관련 문의
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]Switch1에서 알려주신 코드 방식이 아닌, 이렇게 해도 맞는 것일까요?잘못된 방식이라면 설명 좀 부탁드려도 될까요?알려주신 코드 방식에서 int coupon; 부분이 이해가 안 가는 것 같아요.package Cond; public class Switch1 { public static void main(String[] args) { int grade = 2; if (grade == 1){ System.out.println("발급받은 쿠폰 : 1000"); } else if (grade == 2) { System.out.println("발급받은 쿠폰 : 2000"); } else if (grade == 3){ System.out.println("발급받은 쿠폰 : 3000"); } else { System.out.println("발급받은 쿠폰 : 500");} } }
-
해결됨이득우의 언리얼 프로그래밍 Part2 - 언리얼 게임 프레임웍의 이해
9강 무한맵의 제작에서 블루프린트에 컴포넌트의 디테일창이 안보이는 현상
작업하다보면 가끔씩 이런 현상이 발생하는데 혹시 원인이 어떤게 있을까요?? ㅠㅠ
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part1: C++ 프로그래밍 입문
exercise8 질문입니다!
안녕하세요! 좋은 강의 덕분에 많이 배우고 있습니다 ㅎㅎ8번 문제를 그냥 실행했을 때, crash가 나야하는데소리만 나고 출력, 호출 스택, IDE에 crash 표시도 생기지가 않습니다..!제가 Mac M1에서 가상 머신으로 띄운 Window의 Visual Studio를 사용하고 있는데, 환경의 문제일까요?원인을 모르겠어서 어떤 문제인지 서치하기가 어렵네요 ㅠArcher의 소멸자 delete pet;에 중단점을 찍고 실행 전 후 사진입니다!
-
미해결비전공자도 이해할 수 있는 AWS 입문/실전
인스턴스에 배포한 Express 서버 중지 시키고 삭제 하는 방법
[실습] 7. Express 서버를 EC2에 배포하기 를 다 따라하고 이제[보충 강의] 7-2. Spring Boot 서버를 EC2에 배포하기를 보면서 따라해보려고 하는데요이전 강의에서 인스턴스에 배포한 Express 서버를 끄고 삭제한 다음 그 인스턴스에 Spring Boot 서버 배포하고 싶은데 어떻게 해야하나요?
-
미해결Next + React Query로 SNS 서비스 만들기
process.env.NEXT_PUBLIC_BASE_URL를 인식하지 못합니다
위 사진 처럼 컴파일이 안됩니다.그리고 이렇게 바꾸고 실행을 시키면 실행은 되는데 코드 상에서 NEXT_PUBLIC_BASE_URL이 undefined로 확인이됩니다. 어떻게 해결할 수 있을까요.