묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
혹시 영한선생님께 1:1 질문이나 비밀 질문 같은 것은 할 수 없나요 ??
공개된 커뮤니티 말고 질문할 수 있는 방법은 없나요 ? 영한 선생님께 1:1로 직접 질문하고 싶은 내용이 있어서요
-
해결됨리눅스 커널 해킹. A부터 Z까지
boot.sh 실행시
boot.sh실행시 fail to initialize ptp_kvm이라고 나오는데 문제 없는 건가요?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
jpa junit 돌아가는 와중에 오류
Member서비스 통합테스트 에서 회원가입 런 시켰는데, em.persist 메소드에서 오류가 생깁니다.id가 null Now allowed 한다고 뜨는데, 강사님이랑 똑같은 쿼리임에도 불구하고 그러네요.. 뭘까요 javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:766) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:746) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:311) at com.sun.proxy.$Proxy88.persist(Unknown Source) at hello.hellospring.repository.JpaMemberRepository.save(JpaMemberRepository.java:19) at hello.hellospring.service.MemberService.join(MemberService.java:24) at hello.hellospring.service.MemberService$$FastClassBySpringCGLIB$$530c61b7.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698) at hello.hellospring.service.MemberService$$EnhancerBySpringCGLIB$$9583fd7c.join(<generated>) at hello.hellospring.service.MemberServiceIntegrationTest.회원가입(MemberServiceIntegrationTest.java:30) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200) at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:58) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:43) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3279) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3885) at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:84) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645) at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282) at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317) at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330) at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287) at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123) at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:185) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:128) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55) at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:760) ... 91 moreCaused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "ID"; SQL statement:insert into member (id, name) values (null, ?) [23502-214] at org.h2.message.DbException.getJdbcSQLException(DbException.java:508) at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) at org.h2.message.DbException.get(DbException.java:223) at org.h2.message.DbException.get(DbException.java:199) at org.h2.table.Column.validateConvertUpdateSequence(Column.java:365) at org.h2.table.Table.convertInsertRow(Table.java:926) at org.h2.command.dml.Insert.insertRows(Insert.java:167) at org.h2.command.dml.Insert.update(Insert.java:135) at org.h2.command.CommandContainer.executeUpdateWithGeneratedKeys(CommandContainer.java:242) at org.h2.command.CommandContainer.update(CommandContainer.java:163) at org.h2.command.Command.executeUpdate(Command.java:252) at org.h2.server.TcpServerThread.process(TcpServerThread.java:408) at org.h2.server.TcpServerThread.run(TcpServerThread.java:191) at java.base/java.lang.Thread.run(Thread.java:834) at org.h2.message.DbException.getJdbcSQLException(DbException.java:459) at org.h2.engine.SessionRemote.done(SessionRemote.java:611) at org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:237) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:191) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:152) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ... 109 more
-
미해결배달앱 클론코딩 [with React Native]
강사님 질문있습니다
강의 잘보고 있습니다 강사님리액트 네이티브 보다는 리액트 질문인데 const [detail, setDetail] = useState<boolean>(false); const toggleDetail = useCallback(() => { setDetail(!detail); }, [detail]);해당 부분에서 의존배열을 빈배열로 하면 토글이 안되는이유가useCallback 에 빈배열을 넣었을때 toggleDetail 함수가 기억하는 detail은 false 라서 계속 눌러도 토글 기능을 하지못하는 것이고 의존배열에 detail 에 넣어줘야 정상작동을 하는데제가 생각한게 맞는건가요?
-
미해결유니티 머신러닝 에이전트 완전정복 (기초편)
DroneSetting 컴포넌트가 안보여요~
안녕하세요~Drone 환경 만들때 DroneSetting.cs 스크립트 힘들게 작성하였는데 Area -> Add Component 에서 Drone Setting 컴포넌트가 보이지 않습니다. 확인 부탁드리겠습니다. DroneSetting.cs 코드는 아래와 같습니다. using System.Collections;using System.Collections.Generic;using UnityEngine;public class DroneSetting : MonoBehaviour{ public GameObject DroneAgent; public GameObject Goal; private Vector3 areaInitPos; private Vector3 droneInitPos; private Quaternion droneInitRot; private Transform AreaTrans; private Transform DroneTrans; private Transform GoalTrans; private Rigidbody DroneAgent_Rigidbody; void Start() { AreaTrans = gameObject.transform; DroneTrans = DroneAgent.transform; GoalTrans = Goal.transform; areaInitPos = AreaTrans.position; droneInitPos = DroneTrans.position; droneInitRot = DroneTrans.rotation; DroneAgent_Rigidbody = DroneAgent.GetComponent<Rigidbody>(); } public void AreaSetting() { DroneAgent_Rigidbody.velocity = Vector3.zero; DroneAgent_Rigidbody.angularVelocity = Vector3.zero; DroneTrans.position = droneInitPos; DroneTrans.rotation = droneInitRot; GoalTrans.position = areaInitPos + new Vector3(Random.Range(-5f, 5f), Random.Range(-5f, 5f), Random.Range(-5f, 5f)); }}
-
미해결홍정모의 따라하며 배우는 C언어
(5:15) exit( ) 함수에 대해 추가적인 설명 부탁드립니다.
강의에서 교수님께서 작성한 코드를 보여주시며 exit(1);에 대해 설명해주셨습니다.그런데 exit( )함수는 처음 보는 함수였기에 잘 이해가 되질 않아 질문드립니다.헤더파일 <stdlib.h>를 include하여 사용하는 것까지는 알고있습니다. 다만 정확히 어떤 역할을 하길래,교수님께서 "프로그래밍이 완성된 후에는 이런 일이 발생하면 안된다. 디버깅이나 개발과정 중에 exit(1)로 인해 종종 문제가 발생할 수 있다. 프로그래밍을 해나갈 때 '여기는 정말 실행되면 안되는 코드다' 하는 것들을 exit(1)로 표기해두면 디버깅에 시간을 많이 아낄 수 있다"라고 하셨었는데... 정확히 어떤 말씀이신지 잘 이해가 되질 않습니다.exit( )함수는 어떤 역할을 하나요?그리고, 안에 들어간 숫자는 false 0, true의 1을 의미하는 것인가요? 이것들이 들어갔을 때 각각 어떤 동작을 하는지 실제 코드에 입력해봐도.. 잘 모르겠습니다.exit( )함수에 대해 추가적인 설명 부탁드립니다.
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
애저 배포 에러 질문드립니다.
CSRF verification failed. Request aborted.More information is available with DEBUG=True.도커컨테이너로 업로드 후 장고 admin Login 하면 csrf가 뜨는데 배포전 로컬 서버에서는 잘돼었는데왜 에러가 뜨는지 궁굼합니다그리고 애저 버전이 달라서 그런지 컨테이너 셋팅창을 찾을수 없어서 app server 삭제하고 다시 도커 업로드를 했습니다. 이 기능이 어느 페이지로 변경됐는지 알고싶습니다
-
미해결스프링 핵심 원리 - 기본편
자바 표준이 스프링에 어떻게 적용되는지 질문
안녕하세요 항상 강의 잘 보고 있는 학생입니다!강의를 보면 자바 표준을 쓰면 다른 컨테이너에서도 사용 할 수 있다고 하는데 그렇다면 컨테이너들은 컨테이너만의 표준이 있는건가요? 어떻게 자바 표준에서는 스프링에 의존적이지 않으면서 스프링 컨테이너의 빈들을 사용할 수 있는지 잘 이해가 되지 않습니다.
-
해결됨파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
input case 2번 질문드립니다.
test case 2 번의 경우 10 3 6 5 8 5 6 8 7 6 6 7 로 주어지는데주어진 수의 리스트를 정렬하면 [5 5 6 6 6 6 7 7 8 8]이 되고이분 탐색 알고리즘에 의해 해를 구하면최소 크기가 23일때[5 5 6 6],[6 6 7],[7 8 8]을 만족하므로 주어진 output인 24가 아닌 23이 정답이라고 생각했는데 어느 부분에서 잘못생각하였는지 궁금합니다.
-
미해결Vue.js + TypeScript 완벽 가이드
안녕하세요 첫번째 두번째 프로젝트 권한 요청 드립니다.
첫번째 두번째 프로젝트 권한 요청 드립니다. 인프런 : kth31815@naver.com깃허브 : kth31815@naver.com 확인 부탁 드립니다.감사합니다
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
antd 적용시 질문드립니다
antd install 받고, doc 보면서 적용을 해보려고 합니다.기존 영상에는 doc에 class 형식으로 예제 소스가 되어있었지만, 현재는 일단은 함수형(?)으로 되어있는것으로 보입니다.그런데, 처음 보는 문법들이 많이 등장하지만 검색 키워드를 정의하기가 난해하여 질문드립니다.(처음 보는 문법은 강조 표시하였습니다.)*antd 예제 소스입니다.import { AppstoreOutlined, MailOutlined, SettingOutlined } from '@ant-design/icons'; import type { MenuProps } from 'antd'; import { Menu } from 'antd'; import React from 'react'; type MenuItem = Required<MenuProps>['items'][number]; function getItem( label: React.ReactNode,key?: React.Key | null,icon?: React.ReactNode, children?: MenuItem[],type?: 'group',): MenuItem { return { key, icon, children, label, type, } as MenuItem; } 질문 1: 매개 변수가 key, value 형식으로 들어간 부분질문 2: 매개 변수 key값에 '?'가 들어간 부분(객체값 추출시 obj.?key랑 비슷한걸까요...?)질문 3: return값에 'as'를 붙인 부분(해당 함수 위에 type이라는 object가 있는데, typescipt같은 걸까요? 해당 타입으로 반환한다는 거 같기는합니다.)const items: MenuItem[] = [ getItem('Navigation One', 'sub1', <MailOutlined />, [ getItem('Item 1', null, null, [getItem('Option 1', '1'), getItem('Option 2', '2')], 'group'), getItem('Item 2', null, null, [getItem('Option 3', '3'), getItem('Option 4', '4')], 'group'), ]), getItem('Navigation Two', 'sub2', <AppstoreOutlined />, [ getItem('Option 5', '5'), getItem('Option 6', '6'), getItem('Submenu', 'sub3', null, [getItem('Option 7', '7'), getItem('Option 8', '8')]), ]), getItem('Navigation Three', 'sub4', <SettingOutlined />, [ getItem('Option 9', '9'), getItem('Option 10', '10'), getItem('Option 11', '11'), getItem('Option 12', '12'), ]), ];질문 4: 변수명 뒤에 ': MenuItem[]' 역시 해당 변수의 타입을 정의한걸까요?? const onClick: MenuProps['onClick'] = e => { console.log('click', e); }; const App: React.FC = () => ( <Menu onClick={onClick} style={{ width: 256 }} mode="vertical" items={items} /> ); export default App;
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part1: C++ 프로그래밍 입문
end 관련 질문(list#2)
안녕하세요, 궁금한 점이 있어서 이렇게 글을 씁니다! 24:13분에 li.insert(li.end(), i);를 이용해 i가 50일 때의 iterator를 반환해주었습니다. 이 부분에서 end()는 list<int>::iterator itRemember가 접근할 수 없는 더미로드를 가리키는 걸로 알고 있는데, 50에 접근하려면 end의 바로 앞에 있는 부분을 50으로 대체해야 되지 않을까요.. 이 부분이 애매하게 와닿아서 그런데 답변주시면 감사하겠습니다.
-
해결됨스프링 시큐리티
AjaxSecurityConfig 에러에 관해 질문드립니다.
AjaxSecurityConfig 제작 중 authenticationManager must be specified 오류가 발생합니다.@Configuration @Order(0) public class AjaxSecurityConfig { private AuthenticationConfiguration authenticationConfiguration; @Autowired private void setAjaxSecurityConfig(AuthenticationConfiguration authenticationConfiguration) { this.authenticationConfiguration = authenticationConfiguration; } @Bean public AuthenticationManager authenticationManager(AuthenticationConfiguration authenticationConfiguration) throws Exception { return authenticationConfiguration.getAuthenticationManager(); } @Bean public AccessDeniedHandler ajaxAccessDeniedHandler() { return new AjaxAccessDeniedHandler(); } @Bean public AuthenticationProvider ajaxAuthenticationProvider(){ return new AjaxAuthenticationProvider(passwordEncoder()); } @Bean public AjaxAuthenticationSuccessHandler ajaxAuthenticationSuccessHandler(){ return new AjaxAuthenticationSuccessHandler(); } @Bean public AjaxAuthenticationFailureHandler ajaxAuthenticationFailureHandler(){ return new AjaxAuthenticationFailureHandler(); } @Bean public PasswordEncoder passwordEncoder() { return PasswordEncoderFactories.createDelegatingPasswordEncoder(); } @Bean public SecurityFilterChain FilterChain(HttpSecurity http) throws Exception { AuthenticationManagerBuilder authenticationManagerBuilder = http.getSharedObject(AuthenticationManagerBuilder.class); authenticationManagerBuilder.authenticationProvider(ajaxAuthenticationProvider()); http .antMatcher("/api/**") .authorizeRequests() .antMatchers("/api/messages").hasRole("MANAGER") .antMatchers("/api/login").permitAll() .anyRequest().authenticated() .and() .exceptionHandling() .authenticationEntryPoint(new AjaxLoginAuthenticationEntryPoint()) .accessDeniedHandler(ajaxAccessDeniedHandler()); // http.csrf().disable(); ajaxConfigurer(http); return http.build(); } private void ajaxConfigurer(HttpSecurity http) throws Exception { http .apply(new AjaxLoginConfigurer<>()) .successHandlerAjax(ajaxAuthenticationSuccessHandler()) .failureHandlerAjax(ajaxAuthenticationFailureHandler()) .loginPage("/api/login") .loginProcessingUrl("/api/login") .setAuthenticationManager(authenticationManager(authenticationConfiguration)); } // @Bean // public AjaxLoginProcessingFilter ajaxLoginProcessingFilter() throws Exception { // AjaxLoginProcessingFilter ajaxLoginProcessingFilter = new AjaxLoginProcessingFilter(); // ajaxLoginProcessingFilter.setAuthenticationManager(authenticationManager(authenticationConfiguration)); // ajaxLoginProcessingFilter.setAuthenticationSuccessHandler(ajaxAuthenticationSuccessHandler()); // ajaxLoginProcessingFilter.setAuthenticationFailureHandler(ajaxAuthenticationFailureHandler()); // return ajaxLoginProcessingFilter; // } } public final class AjaxLoginConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractAuthenticationFilterConfigurer<H, AjaxLoginConfigurer<H>, AjaxLoginProcessingFilter> { private AuthenticationSuccessHandler successHandler; private AuthenticationFailureHandler failureHandler; private AuthenticationManager authenticationManager; public AjaxLoginConfigurer() { super(new AjaxLoginProcessingFilter(), null); } @Override public void init(H http) throws Exception { super.init(http); } @Override public void configure(H http) { if(authenticationManager == null){ authenticationManager = http.getSharedObject(AuthenticationManager.class); } getAuthenticationFilter().setAuthenticationManager(authenticationManager); getAuthenticationFilter().setAuthenticationSuccessHandler(successHandler); getAuthenticationFilter().setAuthenticationFailureHandler(failureHandler); SessionAuthenticationStrategy sessionAuthenticationStrategy = http .getSharedObject(SessionAuthenticationStrategy.class); if (sessionAuthenticationStrategy != null) { getAuthenticationFilter().setSessionAuthenticationStrategy(sessionAuthenticationStrategy); } RememberMeServices rememberMeServices = http .getSharedObject(RememberMeServices.class); if (rememberMeServices != null) { getAuthenticationFilter().setRememberMeServices(rememberMeServices); } http.setSharedObject(AjaxLoginProcessingFilter.class,getAuthenticationFilter()); http.addFilterBefore(getAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class); } @Override public AjaxLoginConfigurer<H> loginPage(String loginPage) { return super.loginPage(loginPage); } public AjaxLoginConfigurer<H> successHandlerAjax(AuthenticationSuccessHandler successHandler) { this.successHandler = successHandler; return this; } public AjaxLoginConfigurer<H> failureHandlerAjax(AuthenticationFailureHandler authenticationFailureHandler) { this.failureHandler = authenticationFailureHandler; return this; } public AjaxLoginConfigurer<H> setAuthenticationManager(AuthenticationManager authenticationManager) { this.authenticationManager = authenticationManager; return this; } @Override protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) { return new AntPathRequestMatcher(loginProcessingUrl, "POST"); } } Intellij 에서 AjaxLoginConfigurer에서 setAuthenticationManager 메소드 쪽에 Return value of the method is never used 라고 하는 것을 보면 Manager의 return 값이 없는 것 같습니다. @Bean public AjaxLoginProcessingFilter ajaxLoginProcessingFilter() throws Exception { AjaxLoginProcessingFilter ajaxLoginProcessingFilter = new AjaxLoginProcessingFilter(); ajaxLoginProcessingFilter.setAuthenticationManager(authenticationManager(authenticationConfiguration)); ajaxLoginProcessingFilter.setAuthenticationSuccessHandler(ajaxAuthenticationSuccessHandler()); ajaxLoginProcessingFilter.setAuthenticationFailureHandler(ajaxAuthenticationFailureHandler()); return ajaxLoginProcessingFilter; } 에서는 정상적으로 authenticationManager가 등록이 되었습니다. 오류가 왜 일어나는지는 알 것 같지만, 해결 방법이 도저히 이해가 가지 않습니다. 아니면 전에 올린 ajaxAuthenticationProvider가 등록되지 않은 것이 문제인지 생각했지만. Filter로는 잘 되어서 그 문제는 아닐 거라 생각해 질문을 올립니다.전체 코드는 Othkkartho/SpringSecurityLearn at ch4.7 (github.com) 입니다. 좋은 강의와 질문 대답 항상 감사합니다.
-
미해결홍정모의 따라하며 배우는 C++
5:59 friend로 처리하는 부분에 질문이 있습니다.
friend로 함수 처리를 하시면서 하신 말씀이불편함을 조금더 없애기 위하여 파라미터의 getCents()를 안통하게 하기위해 friend로 함수 처리를 하면된다고 하시는데friend로 처리를 하나 안하나 똑같이 작동하며 아래 출력 코드에서 고친것이 하나도 없으신데 getCents()를 안통한다고 하신것이 이해가 안가 질문을 드립니다처음에는 getCents()를 쓰는것이 코드가 길어보이고 귀찮으니까 코드를 줄이기위해 getCents()를 제거하기위해 하신줄 알았습니다.operator + 함수 내부의 return 코드를return Cents(c1 + c2); 처럼요.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
key
final DateTime selectedDate; _TopPart({required this.selectedDate, Key? key}) : super(key: key); 여기서 key가 무엇을 의미하나요?
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
Clock 신호를 logic으로 건드렸을 때
Clock gating model 강의를 듣다가 중간에 Clock 신호를 Logic으로 건드렸을 때 다양한 문제가 발생하기 때문에 주의를 요한다고 하셨는데왜 문제가 발생하는지 궁금합니다.또 다양한 문제는 어떤 것들이 있는지도 궁금합니다.
-
미해결
VSCode에서 유니코드 인코딩 관련 오류 궁금합니다.
vscode로 C언어 입출력에 대해 공부중인 학생입니다. 유니코드 특수문자가 출력되도록 코드를 설계한 후 컴파일하여 실행할때 .\"파일이름".exe를 터미널에 입력할 때는 정상적으로 출력이 되나 키보드 단축키로 "작업: 테스트 작업 실행" 명령을 수행하면 문자가 깨져서 출력됩니다. 인코딩은 모두 UTF-8로 설정된 상태입니다. 같은 방식으로 컴파일해도 두 실행 명령이 각각 다른 결과를 나타내는 것은 무슨 이유인지, 그리고 테스트 작업 실행 명령을 통해 정상적으로 출력되는 유니코드 특수문자를 얻을 수 있는지 궁금합니다.
-
해결됨생산성을 향상시키는 스프링부트 기반의 API 템플릿 프로젝트 구현
전역 에러 처리(2) 8분 27초에 디버깅 포인트 찍어도 안걸려시는분들 참고하세요
아래 코드 2번째 줄에 디버깅 포인트 걸고 실행해도 안걸리시는분들@ExceptionHandler(MethodArgumentTypeMismatchException.class) protected ResponseEntity<ErrorResponse> handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e) { log.error("handleMethodArgumentTypeMismatchException", e); ErrorResponse errorResponse = ErrorResponse.of(HttpStatus.BAD_REQUEST.toString(), e.getMessage()); return ResponseEntity.status(HttpStatus.BAD_REQUEST) .body(errorResponse); } 디버깅 모드로 실행 해야 걸려요 그냥 실행 하면 안걸려요
-
해결됨실전! Querydsl
QueryDSL 사용 시 order by case 구문 질문 드립니다!
=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 안녕하세요 혼자 프로젝트를 만들다가 특정 Type 별로 정렬을 수행해야 하는 경우가 생겨 검색하다 QueryDSL을 이용하여 orderBy Case 구문을 사용하는 방법이 궁금하여 질문을 남기게 되었습니다.정확하게는 OneToMany 관계인 경우, Many 쪽의 요소를 정렬하고자 할 때의 방법을 잘 모르겠어서 질문드려요!Store < === > Menu위의 두 엔티티가 OneToMany 관계로 연관되어 있고, 매장 상세 정보에서 메뉴를 출력하는 경우, Menu의 Type 필드( MAIN, DESSERT, DRINK, BEVERAGE)를 기준으로 orderBy를 수행하려고 합니다.현재 제가 구현한 방식은< 특정 매장에 속한 메뉴 조회하는 로직 >< 매장의 정보를 조회하는 코드 >매장을 조회하는 로직에서 한 번에 처리하려고 하니 방법이 생각나지 않아 두 쿼리를 분리하여 메뉴는 위의 코드에서 조회하고, 아래에서는 매장의 나머지 정보만 불러오는 형식으로 구현돼있습니다.또한 매장 정보 조회 시, DTO에선 순수 매장 정보만을 불러오는 형식이라 메뉴를 조회하는 쿼리가 중복으로 나가진 않습니다!연관 관계에 놓여 있는 엔티티를 별도의 조회 쿼리를 작성하여 불러오는 것이 이런 경우 맞는 방법인지 아니면 제가 아직 부족하여 놓친 하나로 합쳐서 조회할 수 있는 좋은 방법이 있는지 궁금합니다!!긴 글 읽어주셔서 감사합니다!
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
회원가입 오류 관련 질문
안녕하세요 선생님. 백서버를 프론트와 연결하고 회원가입 테스트를 하고 있는데 네트워크 탭을 보니까 Method가 POST가 아닌 OPTIONS로 나오는 경우에는 어느 부분을 봐야 할까요?signup요청이 보내져서 콘솔에 요청이 보내진 것을 확인했지만 그 다음으로 네트워크 탭에서 다음과 같이 나오고 콘솔 창에는 다음과 같이 나옵니다. 500번대 에러라 서버 오류라는것은 알겠는데, 라우터에서 post로 썼는데도 저런 에러가 떠서 어디를 확인해야 할지 모르겠습니다..ㅠㅠㅠback 폴더의 routes디렉토리의 user.js는 이렇고 saga폴더에서 user.js의 signup부분은이렇습니다.