묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 시큐리티
securityContext 삭제 질문
12:17 강의시간에서 SecurityContextLogoutHandler.java 의 logout 메소드에서 securityContextHolder.clearContext(); 호출이 있습니다.사용자 A, B, C 의 접속으로 인해 securityContextHolder에는 3개의 securityContext가 저장되어 있는 상황에서사용자 A만 /logout 요청을 진행했을 때,위 clearContext() 메소드로 사용자A의 securityContext만 삭제할 수 있는 원리가 궁금합니다.언뜻 봐서 메소드명에서 느껴지는 의미로는 securityContextHolder안에 있는 모든 securityContext를 삭제하라 라고 해석되기 떄문입니다.
-
해결됨Flutter 앱 개발 기초
안드로이드 스튜디오 설치방법
https://open.kakao.com/me/devstory로 문의주시면 더 빠르게 답변 받으실 수 있어요 :)안드로드 스튜디오가 안드로이드 스튜디오 돌핀으로 되어있던데 다운로드 방법이 다른데 어떻게 설치하면 되나요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진
3D 사운드 관련 질문드려요
안녕하세요.강의 열심히 듣는중 상황이 다른점에 대해 조치하고자 문의드립니다.오브젝트에 3D 사운드 효과 적용해도 영상처럼 멀어진다고해서 작게 들리지 않던데 방법이 있을까요?영상을 제작하신지 오래되어서 헷갈리실 수 있는거 알지만..답답한 마음에 올려봅니다! ! 메일로 프로젝트 보내드렸습니다
-
해결됨Slack 클론 코딩[실시간 채팅 with React]
해당에러는 백엔드 문제인가요?
proxy서버를 켜도 404에러가 뜹니다.. 들어가면 존재하지 않는 워크페이스라고 합니다 조언을 얻을 수 있을까요,, 어느 파일에서 잘못된건지 모르겠어요밑 코드는 workspace 코드입니다. 프록시서버가 안먹혀서 http는 수동으로 다 붙여놓은 상태입니다. import ChannelList from '@components/ChannelList'; import DMList from '@components/DMList'; import InviteChannelModal from '@components/InviteChannelModal'; import InviteWorkspaceModal from '@components/InviteWorkspaceModal'; import Menu from '@components/Menu'; import Modal from '@components/Modal'; import useInput from '@hooks/useInput'; import { AddButton, Channels, Chats, Header, LogOutButton, MenuScroll, ProfileImg, ProfileModal, RightMenu, WorkspaceButton, WorkspaceModal, WorkspaceName, Workspaces, WorkspaceWrapper, } from '@layouts/Workspace/styles'; import loadable from '@loadable/component'; import { Button, Input, Label } from '@pages/SignUp/styles'; import { IChannel, IUser } from '@typings/db'; import fetcher from '@utils/fetcher'; import axios from 'axios'; import React, { VFC, useCallback, useState, useEffect } from 'react'; import { Navigate, Routes, useParams } from 'react-router'; import { Link, Route } from 'react-router-dom'; import useSWR from 'swr'; import gravatar from 'gravatar'; import { toast } from 'react-toastify'; import CreateChannelModal from '@components/CreateChannelModal'; const Channel = loadable(() => import('@pages/Channel')); const DirectMessage = loadable(() => import('@pages/DirectMessage')); const Workspace: VFC = () => { const [showUserMenu, setShowUserMenu] = useState(false); const [showCreateWorkspaceModal, setShowCreateWorkspaceModal] = useState(false); const [showInviteWorkspaceModal, setShowInviteWorkspaceModal] = useState(false); const [showInviteChannelModal, setShowInviteChannelModal] = useState(false); const [showWorkspaceModal, setShowWorkspaceModal] = useState(false); const [showCreateChannelModal, setShowCreateChannelModal] = useState(false); const [newWorkspace, onChangeNewWorkspace, setNewWorkpsace] = useInput(''); const [newUrl, onChangeNewUrl, setNewUrl] = useInput(''); const { workspace } = useParams<{ workspace: string }>(); const { data: userData, error, mutate, } = useSWR<IUser | false>('http://localhost:3095/api/users', fetcher, { dedupingInterval: 2000, // 2초 }); const { data: channelData } = useSWR<IChannel[]>( userData ? `http://localhost:3095/api/workspaces/${workspace}/channels` : null, fetcher, ); const { data: memberData } = useSWR<IUser[]>( userData ? `http://localhost:3095/api/workspaces/${workspace}/members` : null, fetcher, ); const onLogout = useCallback(() => { axios .post('http://localhost:3095/api/users/logout', null, { withCredentials: true, }) .then(() => { mutate(false, false); }); }, []); const onCloseUserProfile = useCallback((e) => { e.stopPropagation(); setShowUserMenu(false); }, []); const onClickUserProfile = useCallback(() => { setShowUserMenu((prev) => !prev); }, []); const onClickCreateWorkspace = useCallback(() => { setShowCreateWorkspaceModal(true); }, []); const onCreateWorkspace = useCallback( (e) => { e.preventDefault(); if (!newWorkspace || !newWorkspace.trim()) return; if (!newUrl || !newUrl.trim()) return; axios .post( 'http://localhost:3095/api/workspaces', { workspace: newWorkspace, url: newUrl, }, { withCredentials: true, }, ) .then(() => { mutate(); setShowCreateWorkspaceModal(false); setNewWorkpsace(''); setNewUrl(''); }) .catch((error) => { console.dir(error); toast.error(error.response?.data, { position: 'bottom-center' }); }); }, [newWorkspace, newUrl], ); const onCloseModal = useCallback(() => { setShowCreateWorkspaceModal(false); setShowCreateChannelModal(false); setShowInviteWorkspaceModal(false); setShowInviteChannelModal(false); }, []); const toggleWorkspaceModal = useCallback(() => { setShowWorkspaceModal((prev) => !prev); }, []); const onClickAddChannel = useCallback(() => { setShowCreateChannelModal(true); }, []); const onClickInviteWorkspace = useCallback(() => { setShowInviteWorkspaceModal(true); }, []); if (!userData) { return <Navigate to="/login" />; } return ( <div> <Header> <RightMenu> <span onClick={onClickUserProfile}> <ProfileImg src={gravatar.url(userData.email, { s: '28px', d: 'retro' })} alt={userData.nickname} /> {showUserMenu && ( <Menu style={{ right: 0, top: 38 }} show={showUserMenu} onCloseModal={onCloseUserProfile}> <ProfileModal> <img src={gravatar.url(userData.nickname, { s: '36px', d: 'retro' })} alt={userData.nickname} /> <div> <span id="profile-name">{userData.nickname}</span> <span id="profile-active">Active</span> </div> </ProfileModal> <LogOutButton onClick={onLogout}>로그아웃</LogOutButton> </Menu> )} </span> </RightMenu> </Header> <WorkspaceWrapper> <Workspaces> {userData?.Workspaces.map((ws) => { return ( <Link key={ws.id} to={`/workspace/${123}/channel/일반`}> <WorkspaceButton>{ws.name.slice(0, 1).toUpperCase()}</WorkspaceButton> </Link> ); })} <AddButton onClick={onClickCreateWorkspace}>+</AddButton> </Workspaces> <Channels> <WorkspaceName onClick={toggleWorkspaceModal}>Sleact</WorkspaceName> <MenuScroll> <Menu show={showWorkspaceModal} onCloseModal={toggleWorkspaceModal} style={{ top: 95, left: 80 }}> <WorkspaceModal> <h2>Sleact</h2> <button onClick={onClickInviteWorkspace}>워크스페이스에 사용자 초대</button> <button onClick={onClickAddChannel}>채널 만들기</button> <button onClick={onLogout}>로그아웃</button> </WorkspaceModal> </Menu> <ChannelList /> <DMList /> </MenuScroll> </Channels> <Chats> <Routes> <Route path="/workspace/channel/:channel" element={Channel} /> <Route path="/workspace/dm/:id" element={DirectMessage} /> </Routes> </Chats> </WorkspaceWrapper> <Modal show={showCreateWorkspaceModal} onCloseModal={onCloseModal}> <form onSubmit={onCreateWorkspace}> <Label id="workspace-label"> <span>워크스페이스 이름</span> <Input id="workspace" value={newWorkspace} onChange={onChangeNewWorkspace} /> </Label> <Label id="workspace-url-label"> <span>워크스페이스 url</span> <Input id="workspace" value={newUrl} onChange={onChangeNewUrl} /> </Label> <Button type="submit">생성하기</Button> </form> </Modal> <CreateChannelModal show={showCreateChannelModal} onCloseModal={onCloseModal} setShowCreateChannelModal={setShowCreateChannelModal} /> <InviteWorkspaceModal show={showInviteWorkspaceModal} onCloseModal={onCloseModal} setShowInviteWorkspaceModal={setShowInviteWorkspaceModal} /> <InviteChannelModal show={showInviteChannelModal} onCloseModal={onCloseModal} setShowInviteChannelModal={setShowInviteChannelModal} /> </div> ); }; export default Workspace;
-
해결됨[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
controller!.loadUrl(homeUrl);
IconButton( onPressed: () { if (controller == null) { return; } controller!.loadUrl(homeUrl); }, icon: Icon( Icons.home, ), )안드로이드 스튜디오에서는 좀바보? 같아서 null이 아닌것을 인식을 못한다고 하셨는데요 안드로이드 스튜디오에서만 그런건가요?
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
XGBOOST 파라미터 질문
안녕하세요. 수업 잘 듣고 있습니다 :) Q1XGBoost를 이용한 위스콘신 유방암 예측(파이썬 Native XGBoost 사용) 강의 14분16초 objective 파라미터에 대한 설명을 하는 부분이 있는데요.여기선 0또는 1을 예측하는 것이므로 binary : logistic으로 설정하셨는데 만약 이진 분류가 아닌 라벨값이 0, 1, 2 처럼 2가지를 넘는 경우는 어떻게 설정해야 되나요? Q2사이킷런 래퍼 XGBoost 에선 목적함수 파라미터를 따로 지정한 부분이 없는데 사이킷런 래퍼에선 어떻게 지정해줄 수 있나요?
-
미해결Vue.js 중급 강좌 - 웹앱 제작으로 배워보는 Vue.js, ES6, Vuex
깃헙 권한 요청 드립니다.
인프런 아이디 : plokmpl12@naver.com인프런 이메일 : plokmpl12@naver.com깃헙 아이디 : agravict@gmail.com깃헙 Username : agravict
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
Node.js 기반 어플리케이션 배포
안녕하세요. Jenkins를 통한 노드js기반 어플리케이션 배포 강의를 기다리고 있는 1인입니다. 궁금한 점이 코드를 깃에 푸쉬하고 Jenkins에서 pooling을 가져올 때, 만약 테스트 코드들이 있다면, Jenkins에서 Continuous Build 작업을 할 때 unit test들은 성공적으로 통과가 되었는지 자동으로 체크를 해주는건가요? 그리고 나서 정적인 테스트 도구인 sonarQube까지 설치해서 진행하면 될까요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
괄호 처리로 인한 기능 가능/불가능
안녕하세요 제로초님강의를 듣다가, post를 업로드 했을 때 post list에 글은 추가되지만 이미지가 추가되지 않는 현상이 발생해 코드를 보다보니 해당 부분에 문제가 있음을 확인했습니다.바로 중괄호 부분인데요,제 지식으로는 ES6부터 추가된 arrow function 문법을 사용하려면 => 이후 { } 중괄호가 들어가야 하는데,위처럼 중괄호를 넣고 코드를 짜면 정상적으로 기능이 작동하지 않고제로초님 코드처럼 중괄호가 없이 그대로 작성해야 작동합니다.이유가 뭘까요?
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
serve -s build가 되지 않습니다..
Windows PowerShellCopyright (C) Microsoft Corporation. All rights reserved.PS C:\Users\PC\Desktop\emotion diary> npm install -g servechanged 89 packages, and audited 90 packages in 10s23 packages are looking for funding run npm fund for detailsPS C:\Users\PC\Desktop\emotion diary> cd helloPS C:\Users\PC\Desktop\emotion diary\hello> serve -g buildserve : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\PC\AppData\Roaming\npm\ser ve.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_Policies(https://go.mic rosoft.com/fwlink/?LinkID=135170)를 참조하십시오.위치 줄:1 문자:1+ serve -g build+ ~~~~~ + CategoryInfo : 보안 오류: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccessPS C:\Users\PC\Desktop\emotion diary\hello> npm run build> hello@0.1.0 build> react-scripts buildCreating an optimized production build...Compiled with warnings.[eslint] src\components\DiaryItem.js Line 32:16: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-textsrc\components\DiaryList.js Line 1:15: 'useEffect' is defined but never used no-unused-varssrc\components\EmotionItem.js Line 6:13: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-textsrc\pages\Diary.js Line 20:7: React Hook useEffect has a missing dependency: 'id'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 37:7: React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 58:25: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-textsrc\pages\Edit.js Line 5:9: 'getStringDate' is defined but never used no-unused-vars Line 22:7: React Hook useEffect has a missing dependency: 'id'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 39:7: React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array react-hooks/exhaustive-depsSearch for the keywords to learn more about each warning.To ignore, add // eslint-disable-next-line to the line before.File sizes after gzip: 54.79 kB build\static\js\main.544a876e.js 1.42 kB build\static\css\main.b7fc6af2.cssThe project was built assuming it is hosted at /.The build folder is ready to be deployed.You may serve it with a static server: serve -s buildFind out more about deployment here: https://cra.link/deploymentPS C:\Users\PC\Desktop\emotion diary\hello> serve -s buildserve : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\PC\AppData\Roaming\npm\serve.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_Policies(https://go.mic rosoft.com/fwlink/?LinkID=135170)를 참조하십시오.위치 줄:1 문자:1+ serve -s build+ ~~~~~ + CategoryInfo : 보안 오류: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccessPS C:\Users\PC\Desktop\emotion diary\hello> npm install -g serve와npm run build를 했습니다 you may serve it with a static server라는 메시지와함께 serve -s build라는 메세지도 떴는데 serve -s build라고 명령어를 입력했는데도 입력이 되지 않습니다... 루트폴더 문제인가요? 문제가 무엇인가요
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
getDiaryAnalysis 함수에 useMemo 사용 시 경고가 떠요.
강의 12:00부터 진행되는 useMemo 사용 시,두 번째 인자로 [data.length] 를 입력하니 아래와 같은 경고창이 뜹니다. 아마 state 이름이 아니라서 뜨는 것 같은데 문제가 없을까요? React Hook useMemo has a missing dependency: 'data'. Either include it or remove the dependency array react-hooks/exhaustive-depswebpack compiled with 1 warning
-
미해결스프링 시큐리티
AbstractUserDetailsAuthenticaationProvider 질문
11:30 에서 ProviderManager.java 에서 AbstractUserDetailsAuthenticaationProvider.java 로 d이동하실 때 로직의 흐름이 발생할 수 있게 만드는 코드가 어디에 있는지 알 수 있을까요?강의에서는 '다음 중단점으로 이동' 기능을 이용 하셔서 인지하기가 어려웠습니다.
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
junit
혹시 junit5를 안쓰고 4를 쓰는 이유가 있을까요?
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
동일한 트랜잭션 의미
동일한 트랜잭션에서 조회한 엔티티는 같음을 보장 이뜻에서 동일한 트랜잭션은 한명의 유저가 특정 컴퓨터로 보낸 모든 요청을 동일한 트랜잭션이라고 보나요? 아니면 한명의 유저가 보낸 한번의 요청내에서만을 동일한 트랜잭션이라고 보나요?
-
미해결React 기반 Gatsby로 기술 블로그 개발하기
배포 후 포스트 업로드 방법
안녕하세요, 현도님덕분에 좋은 강의를 보고 블로그를 배포까지 완료하게 되었습니다. 다만 배포가 다 완료된 시점이후로게시글을 작성하여서 업로드 하려면 develop branch에서 md파일 작성후에 계속 배포를 한번 씩 진행을 해주는 것이 맞는건가요..? 현재 상태로는 배포자동화가 안되어있으니 배포를 매번 해주는것이 맞다고 판단되는데 branch의 위치가 꼭 develop 이어야하나요?
-
미해결스프링 시큐리티
인텔리제이에서 구현클래스로의 이동
강의 09:30 에서AbstractAuthenticationProcessingFilter의 authResult = attemptAuthentication(req, res); 구문에서 어떤 단축키를 사용해서UsernamePasswordAuthenticationFilter의attemptAuthentication(req, res) 메소드로 이동하셨는지 궁금합니다.
-
미해결PWA 시작하기 - 웹 기술로 앱을 만들자
깃헙 레포 권한 요청드립니다.
인프런 아이디 : jxl05@hitit.xyz인프런 이메일 : jxl05@hitit.xyz깃헙 아이디 : substantiation@naver.com깃헙 Username : hokidoki
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
edowon0623/ansible:latest 컨테이너에서 docker 서비스 실행 실패
안녕하세요.edowon0623/ansible:latest 이미지를 아래 명령어로 컨테이너를 실행 후, 컨테이너 안에서 docker 서비스를 실행하면 오류가 발생되면서 docker 서비스가 실행되지 않습니다. docker run --privileged -itd --name ansible-server -p 20022:22 -e container=docker -v /sys/fs/cgroup:/sys/fs/cgroup edowon0623/ansible:latest /usr/sbin/init#systemctl status 메시지 [root@ace67f7bf994 ~]# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2022-10-03 15:22:47 UTC; 19s ago Docs: https://docs.docker.com Process: 43266 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE) Main PID: 43266 (code=exited, status=1/FAILURE) Oct 03 15:22:47 ace67f7bf994 systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart. Oct 03 15:22:47 ace67f7bf994 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3. Oct 03 15:22:47 ace67f7bf994 systemd[1]: Stopped Docker Application Container Engine. Oct 03 15:22:47 ace67f7bf994 systemd[1]: docker.service: Start request repeated too quickly. Oct 03 15:22:47 ace67f7bf994 systemd[1]: docker.service: Failed with result 'exit-code'. Oct 03 15:22:47 ace67f7bf994 systemd[1]: Failed to start Docker Application Container Engine. [root@ace67f7bf994 ~]# 이전 챕터에서 docker+ssh 컨테이너와 달리 아래의 파일이 존재하지 않는데요,/etc/sysconfig/docker/etc/sysconfig/docker-storage 잘문입니다. 이전 장에서 사용한 docker+ssh 컨테이너에 Ansible을 설치할 수 있을까요? edowon0623/ansible:latest 로 실행한 컨테이너에서 docker 서비스를 정상 실행할 수 있도록 확인 해주실 수 있을까요? 감사합니다
-
미해결홍정모의 따라하며 배우는 C언어
(1:24) 제가 작성한 코드와 교수님께서 작성한 코드의 차이를 모르겠습니다.
아래 코드가 제가 작성한 코드입니다. 교수님께서 작성한 코드는 이렇습니다.그런데, 제가 작성한 코드는 정상적으로 출력되지 않습니다.무엇이 다른걸까요..?그리고 후에 함수 배울 때 설명해주시리라고 생각하지만, 지역변수와 전역변수의 개념을 모르겠습니다. 이 개념을 알고있어야 함수 구현할 때 제대로 알고 작성을 할 수 있을거라고 생각하는데, 어떤 차이가 있는지 알려주신다면 감사하겠습니다.
-
미해결
java
???a