묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
spring data jpa 질문 있어욥 !!
강사님 코드를 보면 SpringDataJpaMemberRepository.java클래스에 @Repository가 작성되어 있지 않아요 그런데 스프링 빈으로 등록이 되요 .... 왜 이런건가요 ?? import java.util.List; import javax.persistence.EntityManager; import org.springframework.data.domain.Example; import org.springframework.data.domain.Sort; import org.springframework.data.repository.NoRepositoryBean; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; /** * JPA specific extension of {@link org.springframework.data.repository.Repository}. * * @author Oliver Gierke * @author Christoph Strobl * @author Mark Paluch */ @NoRepositoryBean public interface JpaRepository<T, ID> extends PagingAndSortingRepository<T, ID>, QueryByExampleExecutor<T>@NoRepositoryBean 을 따라가다 보면 @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented public @interface NoRepositoryBean { }다음과 같이 되어있는데 어느 어노테이션이 스프링빈으로 등록을 시켜주나요 ?? 이전강의에서는 @Repository에 속해있는 @Component가 스프링 빈으로 올려준다고 확인했었는데 @NoRepository에는 @Component 없어서 질문드려요 !!
-
해결됨Vue3 완벽 마스터: 기초부터 실전까지 - "기본편"
ref vs reactive vs shallowRef
ref 안에 객체를 넣을 수 있다면 reactive를 굳이 사용하는 이유가 뭔가요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진
OnButtonClicked가 안나와요
UI_Button에 컴포넌트를 연결하고해당 스크립트에 public void OnButtonClicked를 만들었지만 PointButton의 Function에서 안나오네요이유가 뭘까요..
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
포트폴리오 과제3 boardId: ID! 에러
안녕하세요~ 챕터3 포폴 중에 에러 문의 드립니다결과는 잘 뜨는데 에러가 있어서 질문드립니다ID! was not provided 라고 하는데 이유가 뭔지 모르겠습니다 ㅠ
-
미해결홍정모의 따라하며 배우는 C언어
3.10 문자형 백스페이스 질문입니다!
강의 약 8분 18초 쯤, '\a'를 8진수와 16진수로 출력하는 과정에서 8진수앞에는 접두사 0을 붙혔는데 16진수앞에는 왜 x만 붙힌건가요..? 16진수 접두사는 0x라고 들었던것 같은데 직접해보니 '\0x7'은 그냥 7이 나오고 '\x7'은 백스페이스 소리가 나는 이유가 궁금합니다!
-
미해결따라하며 배우는 리액트 A-Z[19버전 반영]
netflix modal props 문의
강사님!강의 너무 잘 듣고 있습니다.netflix modal 강의중에 state를 props로 모달에 전달해 줄때 전개연산자(movieSelected)로 전달한 이유가 궁금합니다.테스트로 movieSelected = { movieSelected } 로 했을때 모달에 데이터가 제대로 넘어가지 않는것을 확인하였습니다. state 가 {} 객체인 경우라서 그런건지 문의 드립니다.{ modalOpen && <MovieModal {...movieSelected} setModalOpen={setModalOpen} /> } ... MovieModal : index.js function MovieModal({ backdrop_path, title, overview, name, release_date, first_air_date, vote_average, setModalOpen })
-
미해결[개념은 호옹~, 실습 빡] SQL 데이터 분석, 활용!
1:42 PHOTOS 테이블 질문입니다 ㅎㅎ
안녕하세요 홍팍님 잘 듣고있습니다이 테이블에서 photos 에 user_id를 빼도 되지 않나요 ?중간 likes 테이블로 연결하니깐..
-
미해결Vue3 완벽 마스터: 기초부터 실전까지 - "기본편"
script 태그는 컴포넌트를 처음 가져올때 한번만 실행된다는 게 잘 이해가 안됩니다
컴포넌트를 처음 가져올 때 한 번만 실행되는 일반 <script>와 달리, <script setup>는 컴포넌트의 인스턴스가 생성될 때마다 <script setup>내부 코드가 실행됩니다.라는 말이 정확하게 이해가 안돼요<!-- <Component.vue> --> <template><div>hi</div></template> <script> console.log('hi') export default{ setup(){ console.log(1) } }하고<Component /><Component /><Component />세번 쓰면 hi는 한번만 출력되고 1은 왜 3번 출력되는건가요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
h2 재접속시 오류
jdbc:h2:~/jpashop 로 데이터 베이스 파일 생성 후 ~/jpashop.mv.db 파일 생성 확인까지 하였습니다. 그리고 나서 jdbc:h2:tcp://localhost/~/jpashop 로 재접속하려고 하니 Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost" [90067-200] 90067/90067 (도움말) 이렇게 에러 메세지가 뜨네요.. ㅠㅠㅠ
-
미해결파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자
퀴즈를 return값을 다른 변수에 저장하지 않고 함수만 호출했을 때의 코드입니다(피드백 적극 문의 부탁드립니다^^)
man = 1 woman = 0 gender = man or woman # gender를 1 또는 0으로의 flag로 작성 def std_weight(height, gender): if gender == man: std_height = height / 100 # 1m = 100cm, 175cm = 1.75m weight = std_height * std_height * 22 print(f"키 {height}cm 남자의 표준 체중은 {weight:.2f}kg 입니다.") else: std_height = height / 100 weight = std_height * std_height * 21 print(f"키 {height}cm 여자의 표준 체중은 {weight:.2f}kg 입니다.") # f-string 소숫점 n째짜리까지 출력: 실수:.nf std_weight(175, man) std_weight(153, woman)
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
테이블 이름 order 질문
Order테이블인데 왜@Table(name="orders")라고 했는지 알 수 있을까요??아예 클래스 이름 만들때부터 Orders라고 했으면 되는거 아닌가요?
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
안녕하세요. 질문 있습니다.
안녕하세요 질문 있습니다. 노드 버드 react-query 폴더를 보면서 따라하고 있습니다. 현재 주소에서 storeId를 id 값으로 하여 서버에서 각기 다른 데이터를 받아오고 있습니다.그런데 아래와 같이 router.query로 값을 불러오거나 아래 getStaticProps에서 storeId를 보내도 컴포넌트 내부에서 storeId를 한번 undefined로 인식해서 오류가 나더라고요. 이럴 경우 어떤 방식으로 해결해 나가는게 좋을지 궁금합니다.서버에 요청 보내는 api에서 파라미터의 값이 undefined일 경우 실행을 안시키는 식으로 했는데 좋은 방법이 아닌거 같고 페이지 내부에서 해결해야 할거 같긴 한데 어떤 식으로 접근해야할지 잘 모르겠습니다ㅠ import React from 'react'; import { dehydrate, QueryClient, useInfiniteQuery, useQuery } from 'react-query'; import DefaultLayout from '@layouts/DefaultLayout'; // import InfiniteCarousel from '@components/Commons/InfiniteCarousel'; import { loadStoreAPI } from '@apis/store'; import { GetStaticProps } from 'next'; import { ParsedUrlQuery } from 'querystring'; import { useRouter } from 'next/router'; interface Params extends ParsedUrlQuery { storeId: string; } const Home: React.FC<Params> = () => { const router = useRouter(); const { storeId } = router.query as Params; console.log(storeId); const { data: storeInfo } = useQuery(['storeInfo', storeId], () => loadStoreAPI(storeId)); return ( <DefaultLayout> <h1>home123</h1> {/*<InfiniteCarousel></InfiniteCarousel>*/} </DefaultLayout> ); }; export const getStaticPaths = async () => { return { paths: ['/app/store/[storeId]'], fallback: true, }; }; export const getStaticProps: GetStaticProps = async ({ params }) => { const { storeId } = params as Params; if (!storeId) { return { redirect: { destination: '/', permanent: true, }, }; } console.log(storeId); const queryClient = new QueryClient(); await queryClient.prefetchQuery(['storeInfo', storeId], () => loadStoreAPI(storeId)); return { props: { dehydratedState: dehydrate(queryClient), storeId, }, }; }; export default Home;
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
2-Q 질문
http://boj.kr/26099a5957134d3c8954c7971fc64fbb질문게시판에 있는 모든 반례를 다 넣어봤는데도 16%에서 계속 실패하네요 접근 방법은 동 서 남 북 에서 바라봤을때 1을 만나기 전 까지 모든 0을 queue에 집어넣어 bfs를 돌리는 방법으로 했습니다. 반례 리스트10 120 0 0 0 0 0 0 0 0 0 0 00 1 1 1 1 1 1 1 1 1 1 00 1 1 0 0 1 0 0 0 1 1 00 1 0 1 0 1 0 1 1 0 1 00 1 0 1 0 1 0 0 0 0 0 00 1 0 1 0 0 1 1 1 0 1 00 1 0 1 1 1 1 1 1 0 1 00 1 0 0 0 0 0 0 0 0 1 00 1 1 1 1 1 1 1 1 1 1 00 0 0 0 0 0 0 0 0 0 0 0answer: 1 505 50 0 0 0 00 1 1 0 00 1 0 1 00 1 1 1 00 0 0 0 0answer 1,74 60 0 0 0 0 00 0 0 1 1 00 1 1 1 1 00 0 0 0 0 0answer 1,66 40 0 0 00 1 1 00 0 1 00 1 0 00 1 0 00 0 0 0answer 1,56 60 0 0 0 0 00 0 1 0 0 00 0 0 0 0 00 0 0 0 1 00 0 0 1 0 00 0 0 0 0 0answer 1,33 30 0 00 1 00 0 0answer 1,13 30 0 00 0 00 0 0answer 0,0
-
해결됨[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
SendBuffer Pooling 관련 질문있습니다.
여기서 다 썼으면 버리고 새거로 교체할 때 교체하지 않고 그냥 Reset만 호출해서 _usedSize를 0으로만 해줘도 되지 않을까 했었는데 WSASend를 호출하는 과정에서 아직 예전 버퍼가 날아가면 안되는 상황이 있기 때문에 새로 할당해준다. 가 맞게 이해한 부분인가요?
-
미해결워드프레스 기초부터 쇼핑몰까지
망보드 플러그인 설치 오류
김명준 강사님 안녕하세요 인프런 워드프레스 "워드프레스 기초부터 쇼핑몰까지" 라는 강의를 열공중입니다.. 제가 섹션3 플러그인 강의중 게시판만들기 편을 듣고 있는데요 강사님께서 망보드 플러그인 설치하는것과 똑같이 진행을 했습니다. 헌데 board setting 에 들어가면 Board_options setting does not exist 라는 메시지가 나옵니다. Dash board 를 제외하고 모든 메뉴에서 ~~ setting does not exist 라는 메시지가 나옵니다 이게 왜 이런거지요 ?
-
미해결데브옵스(DevOps)를 위한 쿠버네티스 마스터
kubeadm init error
안녕하세요. 다음과 같은 문제가 있어 문의드립니다.다음과 같은 에러가 발생하고 정상적으로 진행하지 못하고 있습니다.docker는 정상적으로 설치되어 있고, cgoups 드라이버는 systemd로 설정되어 있습니다.답변부탁드립니다.********************************************************************************************[kubelet-check] It seems like the kubelet isn't running or healthy.[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.[kubelet-check] It seems like the kubelet isn't running or healthy.[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.[kubelet-check] It seems like the kubelet isn't running or healthy.[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.[kubelet-check] It seems like the kubelet isn't running or healthy.[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.[kubelet-check] It seems like the kubelet isn't running or healthy.[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused.Unfortunately, an error has occurred: timed out waiting for the conditionThis error is likely caused by: - The kubelet is not running - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands: - 'systemctl status kubelet' - 'journalctl -xeu kubelet'Additionally, a control plane component may have crashed or exited when started by the container runtime.To troubleshoot, list all containers using your preferred container runtimes CLI.Here is one example how you may list all running Kubernetes containers by using crictl: - 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock ps -a | grep kube | grep -v pause' Once you have found the failing container, you can inspect its logs with: - 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock logs CONTAINERID'error execution phase wait-control-plane: couldn't initialize a Kubernetes clusterTo see the stack trace of this error execute with --v=5 or higher
-
미해결파이널 코딩테스트 : 프론트엔드
cart 페이지 피그마 로직관련 질문드립니다!
파이널 코딩 테스트 : 프론트엔드(추가문제-바닐라JS로SPA만들기및API비동기통신:스토어페이지만들기) 관련 질문 드립니다!현재 강의를 제작 중임에 먼저 figma를 보고 페이지를 만들어보던 중 이해가 잘 안되는 부분이 생겨 강의 전에 먼저 질문을 드리고자 글 남겨봅니다!현재 cart 페이지의 주문 상품 부분을 제작 중입니다만,, 구매 상품을 표시하는 부분이 가격이나 할인이 어떻게 표시되는 것인지 판단하기가 어려운거 같아서 어떤 식으로 이해하는게 맞는지 여쭤보고 싶습니다.첨부한 사진을 보면노트북 파우치의 경우 옵션이 2개인데 주문 금액에는 반영이 안되어있는것 같습니다.또한 구매할 상품들의 총 상품 금액또한 맞지 않는 것 같습니다.그리고 총 상품 금액에 부분에서 쿠폰 할인에는 선택된 쿠폰에서 받을 수 있는 할인 금액을 다 합치는 것으로 이해를 했는데 배송비에도 보니 무료 배송 쿠폰 내용이 적용이 되어있더라구요,, 배송이랑 상품 쿠폰이 따로 관리되어 적용되는 것인지 궁금합니다.질문 사항에 외에도 해당 페이지의 주문 상품 부분의 figma가 어떤 로직을 담고 있는건지 전체적인 동작 방식에 대해 답변 부탁드립니다!
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
엘리베이트 버튼을 눌렀는데 화면이 어두워집니다
색상 상태관리 강의에 isSelected 가 true 일때 테두리를 추가해주는 강의까지 따라왔는데 버튼을 누르면 바텀시트가 안뜨고 오류가 뜨면서 위 화면처럼 화면이 어둡게 뜹니다 에러 메세지가 너무 많아서 뭔지 모르겠네요...Failed assertion: line 2001 pos 12: 'hasSize'위와 같은 코드도 많이 보이고 그럽니다 설명이 부족할수있어서 작성한 코드 올려볼게요!import 'package:calendar_schedular/component/custom_text_field.dart'; import 'package:calendar_schedular/const/color.dart'; import 'package:calendar_schedular/database/drift_database.dart'; import 'package:calendar_schedular/model/category_color.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; import 'package:calendar_schedular/database/drift_database.dart'; class ScheduleBottomSheet extends StatefulWidget { const ScheduleBottomSheet({Key? key}) : super(key: key); @override State<ScheduleBottomSheet> createState() => _ScheduleBottomSheetState(); } class _ScheduleBottomSheetState extends State<ScheduleBottomSheet> { final GlobalKey<FormState> formKey = GlobalKey(); // 처음엔 값이 없기때문에 null 허용 '?' int? startTime; int? endTime; String? content; int? selectedColorId; @override Widget build(BuildContext context) { final bottomInset = MediaQuery.of(context).viewInsets.bottom; return GestureDetector( onTap: () { FocusScope.of(context).requestFocus(FocusNode()); }, child: Container( height: MediaQuery.of(context).size.height / 2 + bottomInset, color: Colors.white, child: Padding( padding: EdgeInsets.only(bottom: bottomInset), child: Padding( padding: const EdgeInsets.only(left: 8.0, right: 8.0, top: 16.0), child: Form( key: formKey, autovalidateMode: AutovalidateMode.always, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ _Time( onStartSaved: (String? val) { startTime = int.parse(val!); }, onEndSaved: (String? val) { endTime = int.parse(val!); }, ), SizedBox(height: 16.0), _Content( onSaved: (String? val) { content = val; }, ), SizedBox(height: 16.0), FutureBuilder<List<CategoryColor>>( future: GetIt.I<LocalDatabase>().getCategoryColors(), builder: (context, snapshot) { if (snapshot.hasData && selectedColorId == null && snapshot.data!.isNotEmpty) { selectedColorId = snapshot.data![0].id; } return _ColorPicker( colors: snapshot.hasData ? snapshot.data! : [], selectedColorId: selectedColorId!, ); }), SizedBox(height: 16.0), _SaveButton( onPressed: onSavePressed, ), ], ), ), ), ), ), ); } void onSavePressed() { // formKey는 생성을 했는데 // Form 위젯과 결합이 안했을때 if (formKey.currentState == null) { //우리는 formKey 값을 넣어줬기때문에 null 일수는 없다 return; } if (formKey.currentState!.validate()) { print('에러가 없습니다.'); formKey.currentState!.save(); print('------------'); print('startTime : $startTime'); print('endTime : $endTime'); print('content : $content'); } else { print('에러가 있습니다.'); } } } class _Time extends StatelessWidget { final FormFieldSetter<String> onStartSaved; final FormFieldSetter<String> onEndSaved; const _Time({ required this.onStartSaved, required this.onEndSaved, Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Row( children: [ Expanded( child: CustomTextField( label: '시작 시간', isTime: true, onSaved: onStartSaved, ), ), SizedBox(width: 16.0), Expanded( child: CustomTextField( label: '마감 시간', isTime: true, onSaved: onEndSaved, ), ), ], ); } } class _Content extends StatelessWidget { final FormFieldSetter<String> onSaved; const _Content({ required this.onSaved, Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Expanded( child: CustomTextField( label: '내용', isTime: false, onSaved: onSaved, ), ); } } class _ColorPicker extends StatelessWidget { final List<CategoryColor> colors; final int selectedColorId; const _ColorPicker({ required this.colors, required this.selectedColorId, Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Wrap( spacing: 8.0, runSpacing: 10.0, children: colors .map((e) => renderColor( e, selectedColorId == e.id, )) .toList(), ); } Widget renderColor(CategoryColor color, bool isSelected) { return Container( decoration: BoxDecoration( shape: BoxShape.circle, color: Color( int.parse( 'FF${color.hexCode}', radix: 16, ), ), border: isSelected ? Border.all( color: Colors.black, width: 4.0, ) : null, ), width: 32.0, height: 32.0, ); } } class _SaveButton extends StatelessWidget { final VoidCallback onPressed; const _SaveButton({ required this.onPressed, Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Row( children: [ Expanded( child: ElevatedButton( onPressed: onPressed, style: ElevatedButton.styleFrom( primary: PRIMARY_COLOR, ), child: Text('저장'), ), ), ], ); } }
-
해결됨스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
스프링 메시지 소스 사용 테스트 코드 오류
안녕하세요, 좋은 강의 잘 듣고 있습니다.다름이 아니라 제공해주신 메시지 소스 사용 테스트 코드가 정상적으로 작동하지 않아질문 드립니다. 강의 자료에 첨부해주신 질문 글도 참고하여 실행해보고여러 경로로 실행해보려 했으나 희한하게도 getMessage 메서드를 통해 메시지를호출하였을때 영문 테스트 코드는 제대로 통과가 되나 한글이 통과가 안되는현상이 발생합니다. 메시지가 제대로 넘어오지 못하는데 인코딩 옵션도 정상적으로UTF-8 로 설정되어있는 상황이라 답답한 마음에 문의드립니다. 감사합니다.Locale.KOREA 로도 시도해보았으나 실패했습니다.영문은 정상적으로 통과됩니다.
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
3-H 질문합니다
http://boj.kr/7b426c7a534b4d2fa7bc4a753d66c738왜 틀렸다는건지 모르겠네요..그리고 3-G에서는 수빈이와 동생의 위치가 같은 경우에 대해서 예외처리를 해주었는데왜 3-H에서는 안하는건가요??