묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[취업폭격기] 공공기관 전산직(IT) 취업 준비를 위한 정규과정 (기초~고급)
권한 요청 확인 부탁드려요
안녕하세요.구글폼으로 권한요청 드렸습니다. 확인 부탁드립니다.-감사합니다.-
-
해결됨Microservice 설계(with EventStorming,DDD)
VO에 대해서 질문있습니다.
Entity를 설계 하다가 자주 변하지만 응집도가 높은 값들은 어떻게 해야할까요?자주 변하지만 응집도가 높은 값들은 VO를 사용한다.VO로 선언된 값의 수정은 불가능 하지만 생성으로 값을 초기화 한다.그냥 이러한 상황에서는 응집도가 높아도 VO를 고려하지 하지 않는다.수정 기능이 필요하다면 VO가 아닌 Entity를 고려해야 한다?
-
해결됨실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
OrderApiController
웹 개발 구조에서backend - repository - service - controller - frontend이런 식으로 이해를 하고 있었습니다. 강의를 수강 중 MemberApiController는 MemberService를 의존관계 주입을 받아 Api테스트를 진행하는데 OrderApiController는 왜 Service를 주입받지 않고 Repository를 주입받아 사용하는지 궁금합니다.
-
미해결[백문이불여일타] 데이터 분석을 위한 고급 SQL 문제풀이
set 1 - 2번 문제풀이
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.having total_score !=0 이라고 group by 결과값을 필터링해주셨는데실행 순서상 서브쿼리 ->메인쿼리(from/join -> (where) -> groupby -> having ->select -> orderby -> limit)이지 않나요?그런데 select 에 있는 total_score를 having에서 쓸 수 있는 이유가 궁금합니다.
-
미해결파이썬 동시성 프로그래밍 : 데이터 수집부터 웹 개발까지 (feat. FastAPI, async, await)
동시성과 병렬성
설명을 잘 해주셔서 이해가 잘 됐습니다.node js 에서는 싱글 스레드로 돌아가고 있고 ,코드를 작성하게 될때 , async await 를 붙여서동시성 작업을 많이 하는걸로 알고있습니다. 이는 싱글스레드라 할지라도 엔진상 속도가 잘 나오기 때문에 괜찮다고 들었는데요 python 입장에서는 어떤가요 ??
-
해결됨곰책으로 쉽게 배우는 최소한의 운영체제론
자료구조 공부
안녕하세요, 선생님.새해 복 많이 받으세요.좋은 강의 잘 보고 있습니다.운영체제 강의 수강하면서 운영체제 및 가상 메모리를 잘 이해하려면 C언어를 공부해야하는 게 전제 조건일까요.. ?저는 1년차(비전공자)백엔드 개발자로 자바스크립트를 사용하고 공부해오고 있는데요... 선생님의 로드맵으로 강의를 수강하면서 c언어 공부도 해야 이 강의를 좀 더 이해할 수 있는 건가 해서 문의드립니다. 감사합니다.
-
해결됨실전! Querydsl
페이징 처리 질문
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]지금 질문은 querydsl 뿐만 아니라 spring data jpa도 섞여있습니다. 여태 Spring Data JPA로 페이징을 처리할 때는Page<BoardEntity> findAllByItemItemId(Long itemId, Pageable pageable); @Query(value = "select b from board b " + " join fetch b.member " + " join fetch b.item " + "where b.item.itemId = :itemId" + " order by b.boardId desc ", countQuery = "select count(b) from board b where b.item.itemId = :itemId") Page<BoardEntity> findAllByItemItemId(@Param("itemId") Long itemId, Pageable pageable);이렇게 처리하고서비스에서 // 상품에 대한 문의글 보기 @Transactional(readOnly = true) @Override public Page<BoardDTO> getBoards(Pageable pageable, Long itemId, String email) { // 회원 조회 MemberEntity findUser = memberRepository.findByEmail(email); log.info("유저 : " + findUser); // 상품 조회 ItemEntity findItem = itemRepository.findById(itemId) .orElseThrow(EntityNotFoundException::new); log.info("상품 : " + findItem); // 조회해올 게시글을 넣을 곳 Page<BoardEntity> findAllBoards = boardRepository.findAllByItemItemId(itemId, pageable); // 댓글이 있으면 답변완료, 없으면 미완료 for(BoardEntity boardCheck : findAllBoards) { if(boardCheck.getCommentEntityList().isEmpty()) { boardCheck.changeReply(ReplyStatus.REPLY_X); } else { boardCheck.changeReply(ReplyStatus.REPLY_O); } } for (BoardEntity boardEntity : findAllBoards) { // 파라미터로 받아온 이메일이 있다면 if (email != null) { // 해당 게시글을 만들때 이메일과 조회한 이메일을 체크 // 그리고 맞다면 읽을 권한주고 없으면 잠가주기 if (boardEntity.getMember().getEmail().equals(findUser.getEmail())) { boardEntity.changeSecret(BoardSecret.UN_LOCK); } else { boardEntity.changeSecret(BoardSecret.LOCK); } } else { boardEntity.changeSecret(BoardSecret.LOCK); } } log.info("조회된 게시글 수 : {}", findAllBoards.getTotalElements()); log.info("조회된 게시글 : {}", findAllBoards); return findAllBoards.map(board -> BoardDTO.toBoardDTO( board, board.getMember().getNickName(), board.getItem().getItemId())); } // 상품에 대한 문의글 전체 보기 @GetMapping("") @Tag(name = "board") @Operation(summary = "문의글 전체 보기", description = "모든 상품에 대한 문의글을 봅니다.") public ResponseEntity<?> getBoards( // SecuritConfig에 Page 설정을 한 페이지에 10개 보여주도록 // 설정을 해서 여기서는 할 필요가 없다. @PageableDefault(sort = "boardId", direction = Sort.Direction.DESC) Pageable pageable, @PathVariable(name = "itemId") Long itemId, @RequestParam(value = "email", required = false) String email) { try { log.info("email : " + email); // 검색하지 않을 때는 모든 글을 보여준다. Page<BoardDTO> boards = boardService.getBoards(pageable, itemId, email); Map<String, Object> response = new HashMap<>(); // 현재 페이지의 아이템 목록 response.put("items", boards.getContent()); // 현재 페이지 번호 response.put("nowPageNumber", boards.getNumber()+1); // 전체 페이지 수 response.put("totalPage", boards.getTotalPages()); // 한 페이지에 출력되는 데이터 개수 response.put("pageSize", boards.getSize()); // 다음 페이지 존재 여부 response.put("hasNextPage", boards.hasNext()); // 이전 페이지 존재 여부 response.put("hasPreviousPage", boards.hasPrevious()); // 첫 번째 페이지 여부 response.put("isFirstPage", boards.isFirst()); // 마지막 페이지 여부 response.put("isLastPage", boards.isLast()); return ResponseEntity.ok().body(response); } catch (Exception e) { return ResponseEntity.badRequest().build(); } }이렇게 처리를 했습니다. Page 기능을 사용해서 구현했고 querydsl에서 페이징처리는 다음과 같이 했습니다. @Override public Page<MemberTeamDTO> searchPageComplex(MemberSearchCondition condition, Pageable pageable) { List<MemberTeamDTO> content = queryFactory .select(new QMemberTeamDTO( member.id.as("memberId"), member.userName, member.age, team.id.as("teamId"), team.name.as("teamName"))) .from(member) .leftJoin(member.team, team) .where(userNameEq(condition.getUserName()), teamNameEq(condition.getTeamName()), ageGoe(condition.getAgeGoe()), ageLoe(condition.getAgeLoe())) .offset(pageable.getOffset()) .limit(pageable.getPageSize()) .fetch(); // count 쿼리 (조건에 부합하는 로우의 총 개수를 얻는 것이기 때문에 페이징 미적용) long total = queryFactory // SQL 상으로는 count(member.id)와 동일 .select(member.count()) .from(member) // .leftJoin(member.team, team) .where(userNameEq(condition.getUserName()), teamNameEq(condition.getTeamName()), ageGoe(condition.getAgeGoe()), ageLoe(condition.getAgeLoe())) .fetchOne(); return new PageImpl<>(content, pageable, total); }fetchResult와 fetchCount가 지원을 안한다고 해서 조건에 따라 카운트를 구해서 총 개수를 구해서 하는 방식으로 했는데 이렇게 했을 때도 Map<String, Object> response = new HashMap<>(); // 현재 페이지의 아이템 목록 response.put("items", boards.getContent()); // 현재 페이지 번호 response.put("nowPageNumber", boards.getNumber()+1); // 전체 페이지 수 response.put("totalPage", boards.getTotalPages()); // 한 페이지에 출력되는 데이터 개수 response.put("pageSize", boards.getSize()); // 다음 페이지 존재 여부 response.put("hasNextPage", boards.hasNext()); // 이전 페이지 존재 여부 response.put("hasPreviousPage", boards.hasPrevious()); // 첫 번째 페이지 여부 response.put("isFirstPage", boards.isFirst()); // 마지막 페이지 여부 response.put("isLastPage", boards.isLast());이런식으로 뽑아서 프론트에 보낼 수 있는지와실무에서도 spring data jpa와 querydsl 방식으로 페이징 처리를 할 때 이렇게 하는지 아니면 다른 방식이 더있는지 궁금해서 질문드립니다.
-
해결됨[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
Common 폴더에 PDL.xml을 둬야만 작동합니다.
START ../../PacketGenerator/bin/PacketGenerator.exe ../../PacketGenerator/PDL.xmlServer/PacketGenerator/bin에 PacketGenerator.exe가 생성되고, Server/PacketGenerator에 PDL.xml을 둬도 실행이 되는 것 까지 성공하였습니다.하지만 이후 배치파일 작성 부분에서 PacketGenerator.exe을 실행하긴 하지만, PDL.xml을 찾는 경로를 Server/PacketGenerator이 아닌 Server/Common에서 찾고 있었고, 실제로 Common 폴더에 PDL.xml을 두니 정상 작동 하였습니다.해당 현상을 해결할 수 있을까요?
-
미해결블렌더 처음 시작부터 로우폴리 3D 애니메이션 까지
나무 만들기 중, 나뭇잎
안녕하세요, 나무만들기 중에 나뭇잎을 만드는 과정중에 설명대로 되지 않는 부분이 있어 글 남깁니다. F를 눌러 면을 매꾼 곳에, shft+오른쪽 클릭으로 나뭇잎이 이동할 곳으로 3D 커서를 옮겨줘야 하는데, 아무리 지정한 면 위로 옮기려해도, 해당 화면에서만 커서가 옮겨지고, 시야를 바꾸면 커서가 다른 공간에 옮겨져 있습니다. 제가 뭘 잘못한건지.. 아니면 설정이 잘못 된게 있는지 궁금합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
<p>태그 관련 질문
1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]여기에 질문 내용을 남겨주세요.프론트 p태그 관련 질문입니다.데이터를 집어 넣지 않고 단순하게 쓰는 p태그의 경우<p>인프런</p> 코드를 실행하면 인프런이 출력되는걸로 알고 있습니다. 강의를 듣다 호기심에 나이스 문자열을 추가해봤는데요나이스1은 타임리프 문법이 적용된 문장이고나이스는 단순한 p태그입니다.하지만 나이스1도 타임리프 관련 코드가 끝나고 괄호를 닫고 추가된 문자인데 왜 출력이 안 되는지 궁금합니다.
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
윈도우 gradlew.bat build 에러 발생
Microsoft Windows [Version 10.0.22621.2861] (c) Microsoft Corporation. All rights reserved. C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring>gradlew build FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'hello-spring'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 5s 안녕하세요 어제 동일한 질문을 올렸었는데 파일의 권한을 수정하고 다시 올렸습니다.우선 저는 윈도우 사용자이고, java --version으로 확인해봐도 Java 17버전이고, 설정 가능한 모든 부분에서 17버전으로 바꿨는데도 에러가 발생합니다. 모든 방법을 시도해봐도 cmd에서 "gradlew build" 명령어를 치면 build failed라는 메시지가 출력됩니다. plugins { id 'java' id 'org.springframework.boot' version '3.2.1' id 'io.spring.dependency-management' version '1.1.4' } group = 'hello' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '17' } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('test') { useJUnitPlatform() } 파일 링크: https://drive.google.com/file/d/1hnY1DJJ-9loR_mcQBum97NDgOErGgoMO/view?usp=sharing며칠째 이부분에서 막혀서 진도를 못 나가고 있습니다.. 도와주세요..ㅠㅠ------------------------------------------------------------------------------------------------java 17버전으로 설정해도 오류가 나시는 분들이 계시다면 아래 방법을 따라해보세요. 저는 이렇게 하니 해결되었습니다.인텔리제이 최신버전으로 재설치기존 JDK 삭제 후 최신버전으로 재설치 및 환경변수 등록 (재부팅 필수) 설치한 JDK를 프로젝트에 적용
-
해결됨FreeRTOS 프로그래밍
LCD 펌웨어 코드 질문입니다
안녕하세요. LCD 펌웨어 코드는 개발자가 일일이 작성해야하는 것인가요? 아니면 해당 제품을 사면 펌웨어 코드가 같이 오는 건가요?
-
해결됨디자인 시스템 with 피그마
토큰 네임 작성
토큰에서 네임을 작성할때 대문자와 소문자를 번갈아가면서 쓰시던데 기준이 있나요? 소문자로시작해서 띄어쓰기 대신 대문자가 들어가는 것까진 이해가 되는데 아예 대문자로 시작하는건 어떤 경우에 이런식으로 작성하는 건가요?
-
미해결Windows 시스템 프로그래밍 - 기본
게임 개발자를 희망하는 학생인데 질문이 있습니다!
게임 서버 프로그래머 지망생에게 이 강의를 추천 하신다기에 수강하게 되었는데요.아직 강의 초반이지만 winapi에서 쓰이는 구조체나 함수들이 계속 등장하는 것 같은데 해당 지식들이 실제로 게임 업계 실무에서 사용되는 지식들인가요? 그렇다면 강의에 나오는 내용을 꼼꼼히 머릿속에 넣어야 하겠지만지엽적인 개념보다 큰 틀(os와 관련된 지식들)이 중요한 것이라면 직접적인 winapi 사용법 보다는 os 관련된 지식을 중점으로 공부하려고 하는데 어떤 방법을 추천하시나요?
-
미해결초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지
CH01 가상환경 설정 관련 질문드립니다.
(1번 질문)이렇게 했는데, 터미널에 (ch01_env)가 생기지 않았고 하단에 파란 줄도 생기지 않았습니다..!해결방법이 궁금합니다.연결이 되었는지 어떻게 알 수 있을까요? (2번 질문)ch_02에서는 가상환경 (ch02_env)가 생겼는데 하단에 파란줄이 보이지 않습니다. 그리고 상단에 커널도 가상환경이 보이지 않습니다.답변 부탁드립니다. 감사합니다.
-
미해결파이썬을 활용한 머신러닝 딥러닝 입문
타이타닉 예제에서 혼동되는 개념이있습니다!
좋은 강의 잘 듣고있습니다!! 혹시 타이타닉 예제에서 Pclass 가 상관관계가 낮다고 표현하셨는데, 음의 상관관계도 절대값이 높으면 상관관계가 짙은거 아닌가하는 궁금증이 듭니다!!!survived 에 미치는 영향을 상관관계라고 하는것이라 한다면 양수 > 음수 측면이아니라 절대값으로 판단하여 SibSp 가 상관관계가 낮다고 봐야하는거 아닌가요!! 헷갈려서 질문드립니다
-
해결됨[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
assets 자료 어디서 받을 수 있습니까?
섹션 1, ui 강의 듣고 있는데요. 폰트 같은 자료는 어디서 받을 수 있습니까?
-
해결됨면접관 입장에서 작성하는 합격하는 이력서와 포트폴리오
이력서 프로젝트 아키텍처 질문
다음과 같은 양식으로 남겨주세요.질문을 한 배경 🙂 질문내용 : 현재 강의를 토대로 회사에서 진행했던 프로젝트와 개인적으로 진행했던 사이드 프로젝트에 대한 정리를 하던중 예시로 보니 간단한 아키텍처를 첨부하라고 말씀하셔서 아키텍처를 그리고 있었습니다. 그런데 떠오르는 질문이 사이드 프로젝트야 그렇다 치더라도 회사 프로젝트의 아키텍처를 이력서에 넣는것이 가능한지 적절한지 여쭤보고 싶습니다. 만약 부적절하다면 아키텍처 대신 무엇으로 대신하면 좋을지 여쭤보고싶습니다.
-
해결됨FreeRTOS 프로그래밍
뮤텍스 질문입니다.
안녕하세요. 뮤텍스 강의 수강중에 질문이 있습니다. 뮤텍스는 우선순위전도 문제를 해결하는 능력이 있는 세마포어라고 볼 수 있습니다. 이 우선순위전도 문제를 뮤텍스를 사용하면 저절로 해결되는 것인가요?
-
해결됨김영한의 실전 자바 - 기본편
static class
안녕하세요 강사님!static class는 후속강의에서 다뤄주시나요?