묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
p6spy 성능 질문 드립니다.
안녕하세요. 강의를 듣고 사이드 프로젝트를 하면서 `p6spy` 를 잘 활용하고 있는데요. 강의 내용 중에 prod 에서는 성능 관련을 확인 후 사용해야 된다는 내용을 보고 궁금해졌습니다. 처음에는 그냥 `build.gradle` 에서 prod 설정에만 안뜨게 하면 되겠지 (dev, test 에서는 되는 것을 의도) 라고 생각했는데, profile 에 따라 `build.gradle` 이 동적으로 움직이는 건 application.xml 이랑은 다르게 좀 어렵더라구요; 그래서 질문은 2개 입니다. 1. profile 에 따라 `build.gradle` 의 설정 (특히 dependency) 이 동적으로 움직이게 하는 것을 어떻게 하면 좋을까요? 2. `p6spy` 와 같은 외부 라이브러리의 성능 검증은 어떻게 하는 것이 좋을까요?
-
미해결윤재성의 만들면서 배우는 Spring MVC 5
servlet-context.xml 질문입니다.
안에 beans 설정을 하시는데 어떻게 해야되는건가요?만약 개인 프로젝트를 만든다고 하면 이런 환경 설정은 어떻게 해야되는지 궁금합니다.
-
미해결PHP 7+ 프로그래밍
문의드립니다.
안녕하세요. 강의 잘 듣고 있습니다. 게시판만들기 파트에서 2.부트스트랩 강의 중간에 'show databases';를 하시고 데이터베이스 목록이 보여지고 'use phpblog '; 하셨는데 언제 phpblog를 만드셨나요..? 아님 제가 못 본건가요? 저는 show databases;를 하면 phpblog 목록이 없다고 나오는데 어떻게 만드는건가요? 초보적인 질문이지만ㅠ 문의드립니다. 저는 데이터베이스 조회하면 myapp_test랑 phpblog 목록이 없어서 6개만 조회됩니다. 강사님과 똑같이 phpblog 만드는 방법을 자세히 알려주셨으면 합니다.
-
미해결타입스크립트 시작하기
function add
console.log(add(1,'2')); 부분에서 에러가 발생하는데 , 발생하는 이유가 위의 타입 정의된 부분이 number , number string , string 이라서 그런걸까요 ?
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
jsp 질문입니다
7:33초 전송을 누르면 이런 창이 뜨는데 왜 그런건가요? ㅜㅜ Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Jun 10 19:01:17 KST 2021 There was an unexpected error (type=Not Found, status=404).
-
미해결실전! 스프링 데이터 JPA
Thread 처리 관련 질문이 있습니다
@Entity@Getterpublic class Member { @Id @GeneratedValue private Long id;} @SpringBootTest@Rollback(value = false)class MemberRepositoryTest { @Autowired MemberRepository memberRepository; @BeforeEach void prepareData() { memberRepository.save(new Member()); } @Test @Transactional void findMember() throws InterruptedException { Member findMember = memberRepository.findAll().get(0);// Optional<Member> newFindMember = memberRepository.findById(findMember.getId());// System.out.println("newFindMember.isEmpty() = " + newFindMember.isEmpty()); int threadCount = 1; int latchCount = 1; ExecutorService service = Executors.newFixedThreadPool(threadCount); CountDownLatch countDownLatch = new CountDownLatch(latchCount); for(int i = 0; i < latchCount; i++) { service.execute(() -> { Optional<Member> newFindMember = memberRepository.findById(findMember.getId()); System.out.println("newFindMember.isEmpty() = " + newFindMember.isEmpty()); countDownLatch.countDown(); }); } countDownLatch.await(); }} 위에 처럼 테스트 전에 BeforEach 에서 Member 1건을 생성하고 Thread 환경이라는 전제 하에서 가져오는 부분을 샘플로 짰는데요, 위 코드를 실행하면 궁금한 부분이 2가지 있습니다. 1. findById 를 할 경우 select 쿼리가 실행됩니다. @Transactional 로 선언되어 최초 findAll 에서 가져온 객체들이 영속성 컨텍스트에 남아있을테니 findById 시점에는 영속성컨텍스트의 대상을 가져올 것 같은데 왜 select 쿼리가 실행되는 건가요? 2. findById 를 통해 가져온 대상이 빈객체 입니다. isEmpty 가 true 로 나오는데요, 어찌됐건 DB에서 조회를 해왔을테니 대상을 정상적으로 가져와야 할 것 같은데, 왜 아무것도 가져오지 못하는 건가요? @Transactional 어노테이션을 제거하면 정상적으로 가져 옵니다. Thread 환경이 아닌 일반적인 코드에서는 예상대로 잘 실행이 되는데 Thread 환경에서는 왜 그런지 모르겠네요ㅠ
-
미해결작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
502 bad gateway가 뜹니다
https://github.com/hwd3004/clone_pinterest 오라클 클라우드로 하고 있고 포트 개방은 80, 443, 8080, 8000, 9000, 3306 해주었습니다. 도커 포테이너 - 서비스에서 django_container_gunicorn이 이상한거 같습니다. 이건 django_container_gunicorn 로그입니다. , 0 static files copied to '/home/clone_pinterest/staticfiles', 134 unmodified., Operations to perform:, Apply all migrations: accountapp, admin, articleapp, auth, commentapp, contenttypes, profileapp, projectapp, sessions, subscribeapp, Running migrations:, No migrations to apply., Your models in app(s): 'accountapp' have changes that are not yet reflected in a migration, and so won't be applied., Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them., [2021-06-10 09:42:42 +0000] [1] [INFO] Starting gunicorn 20.1.0, [2021-06-10 09:42:42 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:43 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:44 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:45 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:46 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:47 +0000] [1] [ERROR] Can't connect to ('0.0.0.0/8000', 8000), , 0 static files copied to '/home/clone_pinterest/staticfiles', 134 unmodified., Operations to perform:, Apply all migrations: accountapp, admin, articleapp, auth, commentapp, contenttypes, profileapp, projectapp, sessions, subscribeapp, Running migrations:, No migrations to apply., Your models in app(s): 'accountapp' have changes that are not yet reflected in a migration, and so won't be applied., Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them., [2021-06-10 09:42:58 +0000] [1] [INFO] Starting gunicorn 20.1.0, [2021-06-10 09:42:58 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:59 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:00 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:01 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:02 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:03 +0000] [1] [ERROR] Can't connect to ('0.0.0.0/8000', 8000), , 0 static files copied to '/home/clone_pinterest/staticfiles', 134 unmodified., Operations to perform:, Apply all migrations: accountapp, admin, articleapp, auth, commentapp, contenttypes, profileapp, projectapp, sessions, subscribeapp, Running migrations:, No migrations to apply., Your models in app(s): 'accountapp' have changes that are not yet reflected in a migration, and so won't be applied., Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them., [2021-06-10 09:43:29 +0000] [1] [INFO] Starting gunicorn 20.1.0, [2021-06-10 09:43:29 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:30 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:31 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:32 +0000] [1] [ERROR] Retrying in 1 second., , 0 static files copied to '/home/clone_pinterest/staticfiles', 134 unmodified., Operations to perform:, Apply all migrations: accountapp, admin, articleapp, auth, commentapp, contenttypes, profileapp, projectapp, sessions, subscribeapp, Running migrations:, No migrations to apply., Your models in app(s): 'accountapp' have changes that are not yet reflected in a migration, and so won't be applied., Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them., [2021-06-10 09:43:13 +0000] [1] [INFO] Starting gunicorn 20.1.0, [2021-06-10 09:43:13 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:14 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:15 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:16 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:17 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:43:18 +0000] [1] [ERROR] Can't connect to ('0.0.0.0/8000', 8000), , 0 static files copied to '/home/clone_pinterest/staticfiles', 134 unmodified., Operations to perform:, Apply all migrations: accountapp, admin, articleapp, auth, commentapp, contenttypes, profileapp, projectapp, sessions, subscribeapp, Running migrations:, No migrations to apply., Your models in app(s): 'accountapp' have changes that are not yet reflected in a migration, and so won't be applied., Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them., [2021-06-10 09:42:27 +0000] [1] [INFO] Starting gunicorn 20.1.0, [2021-06-10 09:42:27 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:28 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:29 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:30 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:31 +0000] [1] [ERROR] Retrying in 1 second., [2021-06-10 09:42:32 +0000] [1] [ERROR] Can't connect to ('0.0.0.0/8000', 8000), 이건 서비스 탭에 있는 nginx 로그입니다. /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration, /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/, /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh, 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf, 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf, /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh, /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh, /docker-entrypoint.sh: Configuration complete; ready for start up, 2021/06/10 09:30:42 [error] 34#34: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.2, server: , request: "GET / HTTP/1.1", upstream: "http://10.0.2.5:8000/", host: "140.83.62.96", 10.0.0.2 - - [10/Jun/2021:09:30:42 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", 2021/06/10 09:30:55 [error] 34#34: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.2, server: , request: "GET / HTTP/1.1", upstream: "http://10.0.2.5:8000/", host: "140.83.62.96", 10.0.0.2 - - [10/Jun/2021:09:30:55 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", 10.0.0.2 - - [10/Jun/2021:09:31:09 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", 2021/06/10 09:31:09 [error] 34#34: *1 connect() failed (113: No route to host) while connecting to upstream, client: 10.0.0.2, server: , request: "GET / HTTP/1.1", upstream: "http://10.0.2.5:8000/", host: "140.83.62.96", 2021/06/10 09:32:03 [error] 34#34: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.2, server: , request: "GET / HTTP/1.1", upstream: "http://10.0.2.5:8000/", host: "140.83.62.96", 10.0.0.2 - - [10/Jun/2021:09:32:03 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", 10.0.0.2 - - [10/Jun/2021:09:34:03 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36", 2021/06/10 09:34:03 [error] 34#34: *7 connect() failed (113: No route to host) while connecting to upstream, client: 10.0.0.2, server: , request: "GET / HTTP/1.1", upstream: "http://10.0.2.5:8000/", host: "140.83.62.96", /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration, /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/, /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh, 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf, 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf, /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh, /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh, /docker-entrypoint.sh: Configuration complete; ready for start up, 2021/06/10 09:30:05 [emerg] 1#1: host not found in upstream "django_container_gunicorn" in /etc/nginx/nginx.conf:21, nginx: [emerg] host not found in upstream "django_container_gunicorn" in /etc/nginx/nginx.conf:21, /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration, /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/, /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh, 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf, 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf, /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh, /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh, /docker-entrypoint.sh: Configuration complete; ready for start up, 2021/06/10 09:30:21 [emerg] 1#1: host not found in upstream "django_container_gunicorn" in /etc/nginx/nginx.conf:21, nginx: [emerg] host not found in upstream "django_container_gunicorn" in /etc/nginx/nginx.conf:21, 질문이 너무 이상해서 죄송합니다.
-
미해결
atom\styles.less Line number: 39 에러
아톰 설정 중 이와 관련한 에러에 대한 설명은 웹에서도 제대로 찾지 못해 질문 남깁니다.\ 기존에 뜨던 에러에 대해선 기존 질답을 보고 해결했는데 그 문제를 해결하자 새로 이런 문제가 생겼는데요ㅠㅠ vs code로 강의를 들을 때에도 지장이 없겠죠? 일단 아톰 에러가 난 라인은 아래와 같습니다... Line number: 39
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
JWT 다중 로그인 처리 질문
user-service에서 AuthenticationFilter를 거치기전 기존에 메모리나, DB에 해당 ID에대한 JWT토큰값이 존재할 경우 기존 토큰은 폐기하고 새로운 토큰값을 발급시켜 새로 로그인한 유저에게 할당해주는 방법으로 하면 괜찮을까요 ??
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
콘솔 검색 단축키 궁금합니다.ㅎㅎ
영상 7분 51초 콘솔 로그에서 검색 단축키가 혹시 뭔지 알려주실수 있나요???ㅎㅎ 항상 강의 잘 보고 있습니다.
-
미해결홍정모의 따라하며 배우는 C++
std::cin.clear() 의 기능에 대한 질문입니다.
안녕하세요. 좋은 강의와 매번 친절한 답변 덕분에 좋은 환경속에서 공부하고 있습니다. 감사합니다. 질문이 있어서 글을 남깁니다. std::cin.clear(); 의 기능에 대한 질문입니다. 해당 기능은 'cin으로 받은 것 중 버퍼에 쌓인 것을 지워준다.' 로 알고 있습니다. 그런데 아래와 같이 코드를 돌렸을 때 std::cin.clear();를 했음에도 불구하고 버퍼에 아직 쌓여있는것 같아서 이렇게 질문을 남깁니다. ---코드 --- #include <iostream> int main() { using namespace std; int x; int y; int z; // 예시로 123 456 789 를 입력함 cin >> x; std::cin.clear(); //퍼버에 쌓인것을 다 지워준다. // 버퍼에 있는 것을 모두 지웠으니 입력되지 않을 것으로 기대함 cin >> y; cin >> z; cout << x <<" " << y << " " << z <<endl; return 0; } 제가 혹시 잘 못 코딩한거라던지 cin.clear() 의 기능에 대해 잘 못 알고 있는게 있을까요?
-
미해결처음 시작하는 Infrastructure as Code: AWS & 테라폼
output의 역할 그리고 output 변수명이 다른 이유
질문 1 output.tf의 역할이 state file 에 변수를 저장하는 역할이고 그리고 변수가 잘 저장 되어 있는지 보기 위해서인가요? 질문 2 output 변수명{ } 에서의 변수명은 tf101_availability_zone_names라고 작성하셨습니다. 그리고 terraform.tfvars과 variable.tf 에서는 변수명을 availability_zone_names라고 작성하셧습니다. 편의상 구분을 하기 위해서 tf101_라고 붙이셨다고 하는데 변수를 이름 다르게 저장할 이유가 있는가요? 왜 차이를 두셨나요?
-
해결됨팝스타 공식 뮤비 제작 & 유튜브 2천만 뷰 크리에이터의 애니메이트 X 이모티콘 클래스
선생님 질문 있습니다~!
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 위 이미지 같이 한번은 이불 밖으로 한번은 이불 안으로 들어가는 손을 작업하기 위해 이불 레이어 기준에서 윗쪽과 아래쪽 레이어 2개를 만들어서 "오른손(1)"의 심볼을 수행한 후 파괴하고 "이불밑_오른손(2)"에서 심볼을 생성하고 수행 했는데요.. 이방법말고 다른 방법이 있는지 질문 드립니다. 그리고 위의 방법에서 "오른손 (1)"의 심볼을 수행한 후 파괴 했자나요? 파괴를 안하고 숨길 수 있는 방법이 있나요? 왜냐하면 심볼을 파괴하고 새로 생성하면 심볼의 크기나 위치를 다시 수정해야 되는 경우가 있어서 불편합니다. +_+; 그럼 오늘도 좋은 하루 보내세요~
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
Rising Temperature 질문
안녕하세요, 강사님 DATE_ADD를 이용하여 JOIN하는 Rising Temperature 문제 관련하여 문의드립니다. 풀이에서 전 날의 데이터를 알기 위해 DATE_ADD를 사용하셨는데요, 매일의 날짜가 없는 경우 (1월 2일 데이터가 없는 상태에서 1월 1일, 3일, 4일.... 이렇게 데이터가 있는) 에는 이전의 날짜의 온도와 비교하기 위해서는 어떤 식으로 쿼리를 구성하면 될까요? 쿼리문을 짜보려니 쉽지 않아 힌트라도 얻을 수 있을까하여 질문드립니다!
-
해결됨구글 애널리틱스4 (GA4) 미니 코스
GA4에서 UA처럼 추천제외 목록을 구성하는 방법이 있나요?
소셜로그인 리퍼러를 제외하고 싶은데 GA4에서 추천 제외 목록같은 기능을 찾고 싶습니다ㅜㅜ
-
해결됨코딩테스트 실전 모의고사(with C++) : 대기업 대비
질문드립니다.
자바로 코딩테스트를 준비하고 있는데 문제 알고리즘만 강의를 통해 학습하고 문제는 사이트에서 자바로 풀어도 진행하는데 무리가 없는지 궁금합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
안녕하세요 test부분 junit 에러때매 도저히 안되는데 이부분 넘어가도 될까요 ?
안녕하세요 test부분 junit 에러때매 도저히 안되는데 이부분 넘어가도 될까요 ?
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
HTTP 요청 파라미터 - HTML Form 관련해서 질문 드립니다.
POST - HTML Form 요청시 content-type이 application/x-www-form-urlencodeed 형식으로 보내면 비록 메세지 바디에 전송되지만 쿼리 파라미터 처럼 @RequestParam 으로 조회 및 @ModelAttribute 와 같이 객체안에 바인딩이 된다고 강조하면서 설명 해주셨는데요 content-type이 form-data 경우에도 동일하게 동작하는데요 이 내용에 대해서는 강의에 없는거 같아서요
-
미해결스프링 핵심 원리 - 기본편
equals 메서드도
Object 클래스의 equals() 메서드도 객체끼리 비교하면 같은 객체인지를 기본적으로(오버라이딩 하지 않았을 때) 객체의 주소로 비교해주니까 isEqualTo가 equals처럼 동작한다면 isSameAs말고 isEqualTo로 비교해도 되지 않나요? (영상 8:36)
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
npm run start 질문이요
처음에 npm run start 입력하니까 콘솔에 log 해서 적어둔 부분이 출력이 안되고 다시 또 명령 입력할 수 있는 > 이 부분이 계속 뜨더라구요. 그래서 hello world 라고 적은 뒤에 부분을 조금 수정해서 저장한 뒤에 다시 npm run start를 하니까 제대로 출력이 되는데 이게 저장하고 안하고의 차이때문에 발생한걸까요??