묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결Spring Boot JWT Tutorial
org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [FKASNMJAR8JR5GAXVD7966P19IR]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
안녕하세요? 이 강의를 보고, 이 강의를 토대로 토이 프로젝트를 진행하고 있습니다. 근데 계속 아래와 같은 Exception이 터지고 있습니다. 다수 회원을 생성 합니다! Hibernate: insert into member (member_id, modify_date, register_date, about_me, activated, email, name, nickname, password, phone) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?) Hibernate: insert into member_authority (member_id, authority_name) values (?, ?) 2022-02-09 23:42:57.821 WARN 11871 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 23506, SQLState: 23506 2022-02-09 23:42:57.821 ERROR 11871 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : Referential integrity constraint violation: "FKASNMJAR8JR5GAXVD7966P19IR: PUBLIC.MEMBER_AUTHORITY FOREIGN KEY(AUTHORITY_NAME) REFERENCES PUBLIC.AUTHORITY(AUTHORITY_NAME) ('ROLE_FAMILY')"; SQL statement: insert into member_authority (member_id, authority_name) values (?, ?) [23506-200] 2022-02-09 23:42:57.823 INFO 11871 --- [ main] o.h.e.j.b.internal.AbstractBatchImpl : HHH000010: On release of batch it still contained JDBC statements org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [FKASNMJAR8JR5GAXVD7966P19IR]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:276) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:233) at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:566) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:743) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:174) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) at com.sun.proxy.$Proxy142.save(Unknown Source) at org.comunity.hongga.repository.MemberRepositoryTest.lambda$회원_100명_생성_상세_조회$0(MemberRepositoryTest.java:76) at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104) at java.base/java.util.stream.IntPipeline$Head.forEach(IntPipeline.java:593) at org.comunity.hongga.repository.MemberRepositoryTest.회원_100명_생성_상세_조회(MemberRepositoryTest.java:57) 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:71) 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.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1352) at org.hibernate.action.internal.CollectionRecreateAction.execute(CollectionRecreateAction.java:50) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604) at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478) at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40) at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1402) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:493) at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3285) at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2420) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281) at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:562) ... 87 more Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Referential integrity constraint violation: "FKASNMJAR8JR5GAXVD7966P19IR: PUBLIC.MEMBER_AUTHORITY FOREIGN KEY(AUTHORITY_NAME) REFERENCES PUBLIC.AUTHORITY(AUTHORITY_NAME) ('ROLE_FAMILY')"; SQL statement: insert into member_authority (member_id, authority_name) values (?, ?) [23506-204] at org.h2.message.DbException.getJdbcSQLException(DbException.java:527) at org.h2.message.DbException.getJdbcSQLException(DbException.java:496) at org.h2.message.DbException.get(DbException.java:227) at org.h2.message.DbException.get(DbException.java:203) at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:311) at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:252) at org.h2.table.Table.fireConstraints(Table.java:1163) at org.h2.table.Table.fireAfterRow(Table.java:1181) at org.h2.command.dml.Insert.insertRows(Insert.java:188) at org.h2.command.dml.Insert.update(Insert.java:135) at org.h2.command.dml.DataChangeStatement.update(DataChangeStatement.java:61) at org.h2.command.CommandContainer.update(CommandContainer.java:173) 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:831) 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) ... 107 more @Test public void 회원_100명_생성_상세_조회() { // given System.out.println("다수 회원을 생성 합니다!"); // 50번까지 FAMILY // 100번까지 GUEST IntStream.rangeClosed(1, 100).forEach(i -> { if (i <= 50) { Authority authority = Authority.builder() .authorityName("ROLE_FAMILY") .build(); Member memberMany = Member.builder() .email("whoami"+i+"@hongga.com") .password(passwordEncoder.encode("1234")) .name("손님" + i) .nickname("손님이에영" + i) .phoneNumber("010-3948-4934") .activated(true) .authorities(Collections.singleton(authority)) .build(); // when Member saveManyFamily = memberRepository.save(memberMany); // then System.out.println(assertThat(memberMany).isEqualTo(saveManyFamily)); } else { Authority authority = Authority.builder() .authorityName("ROLE_GUEST") .build(); Member memberMany = Member.builder() .email("whoami"+i+"@hongga.com") .password(passwordEncoder.encode("1234")) .name("손님" + i) .nickname("손님이에영" + i) .phoneNumber("010-3948-4934") .activated(true) .authorities(Collections.singleton(authority)) .build(); // when Member saveManyGuest = memberRepository.save(memberMany); // then System.out.println(assertThat(memberMany).isEqualTo(saveManyGuest)); } // if-else 끝 }); System.out.println("==============================================================="); System.out.println("회원 조회를 시작 합니다!"); //given IntStream.rangeClosed(1, 100).forEach(i -> { String email = "whoami"+i+"@hongga.com"; // when Member byEmail = memberRepository.findByEmail(email); // then System.out.println(assertThat(email).isEqualTo(byEmail)); });} // 회원_상세_조회() 끝 이렇게 TEST 코드를 작성해서 여러 회원을 검색하고, 비교 해 보려고 하는데 안 됩니다. 의심 가는 건 저는 회원 등급을 GUEST, FAMILY, ADMIN으로 사용하고 싶은데, 혹시 이걸 Check하거나 뭐 그러는 곳이 있나요?? 조언 부탁 드리겠습니다! https://github.com/junyharang-personal-project/hongga-community-server
-
미해결딥러닝 CNN 완벽 가이드 - TFKeras 버전
안녕하세요! 권철민 교수님! 질문이 있습니다!
안녕하세요, 교수님. 필터수와 층 깊이 변경에 따른 모델 성능 비교를 직접 수행해보면서 이상적인 값이 나오지 않아서 질문을 드리게 되었습니다. 우선, 필터수와 층 깊이가 깊어짐에 따라 성능이 좋아져야하는데 3번 정도 학습을 시켜 그래프로 도시해본결과, 정확도면에서는 필터수를 늘리고 깊이가 깊은 모델이 더 성능이 좋아지만, loss면에서는 그렇지 못했습니다. 이 문제점이 어떠한 이유 떄문인지 아니면 원래 시각적으로는 확인해보기 힘든 부분인지 궁금하여 질문을 드리게 되었습니다. 재미있고 계속 듣고 싶어지는 강의 올려주셔서 정말 감사합니다.
-
미해결[원포인트 MBA] 연세대 신현한 교수의 재무관리 에센스
스프레드 시트 다운로드
안녕하세요. 강의 수강 도중 실습을 하려고 하는데 계속 오류가 발생합니다. 모바일에서도 동일하던데, 실습을 위한 파일은 어떻게 다운받아야 하나요?
-
미해결Jupyter Notebook으로 시작하는 Python
저도 자료형 제어문등의 파일이 나오지 않습니다.
안녕하세요 저도 위의 분과 똑같이 강의자료를 다운받아도 자료형 제어문 등의 파일이 나타나지 않습니다. 해결방법을 알 수 있을까요?
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
config module import
AuthModule 에서 환경 변수 사용하려면 ConfigModule 임포트가 필요한게 맞나요? 없어도 잘 동작하는것 같은데 궁금해서 여쭙니다.
-
미해결플렉스(Flex) 반응형 웹사이트 포트폴리오(The World's Best Cities)
제이쿼리 부드럽게 스크롤할때 제이쿼리에 밑줄오류가 있습니다.
제이쿼리로 네비게이션 a링크 누를때 부드럽게 스크롤 되는거 저렇게 강의영상이랑 똑같이 했는데 저렇게 click에 밑줄이 그어지면서 오류가 나는데 왜그런걸까요?ㅠㅠ
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part1: C# 기초 프로그래밍 입문
캐스트 다는 것 관련해서 질문드립니다.
static int add(int a, int b, int c = 0, float d = 2.0f, double e = 3.0) { return (int)(a + b + c + d + e); } static void Main(string[] args) { int tem = Program.add(1, 2, d:3.0f, e:4.0); Console.WriteLine(tem); } 위의 add함수 내용중에 return (int)(a + b + c + d + e);를 처음에는 그냥 return a + b + c + d + e; 로 적었거든요. 그랬더니 double 형식을 int 형식으로 바꿀 수 없다하여 캐스트를 달라고 오류 뜨더라구요. 워낙 기초가 없는지라 알트 엔터 도움을 받아서 위와같이 변경했는데 왜 오류가 떳는지 그리고 위와같이 해결이 되는건지 알려주실 수 있나요?
-
미해결
Strategy to connect to Chime Customer Service team:
Challenges with online platforms are the usual and this is why having the solution source is crucial. At all costs, the validity of the methods of contacting the Chime Customer Service team is critical. The digital platform is constantly prone to unanticipated technical challenges. As a result, you must be informed of the methods. The help from the experienced professional always proves quite helpful in terms of handling the support team.
-
미해결프로젝트로 배우는 Vue.js 3
placeholder 유지
분명 코드는 똑같은 것 같은데 리스트를 하나 입력하면 왜 입력input창에 "Type new To-Do"가 안뜰까요...? ㅠㅠ <template> <div class="container"> <h2>To-Do List</h2> <form @submit.prevent="onSubmit"> <div class="d-flex"> <div class="flex-grow-1 mr-2"> <input class="form-control" type="text" v-model="todo" placeholder="Type new To-Do" > </div> <div> <button class="btn btn-primary" type="submit" > Add </button> </div> </div> <div v-show="hasError" style="color: red"> This field cannot be empty </div> </form> <div v-for="todo in todos" :key="todo.id" class="card mt-2" > <div class="card-body p-2"> <div class="form-check"> <input class="form-check-input" type="checkbox" v-model="todo.completed" > <label class="form-check-label"> {{ todo.subject }} </label> </div> </div> </div> </div> </template> <script> import { ref } from 'vue'; export default { setup() { const todo = ref(''); const todos = ref([]); const hasError = ref(false); const onSubmit = () => { if (todo.value === '') { hasError.value = true; } else { todos.value.push({ id: Date.now(), subject: todo.value, completed: false, }); hasError.value = false; todo.value = " " } }; return { todo, todos, onSubmit, hasError, } } } </script> <style> .name { color: red; } </style>
-
미해결진짜 현업에서 쓰이는 직장인의 실무 엑셀 - 데이터 가공부터 분석까지
15강 크로스테이블-테이블화시키기
안녕하세요 강사님 15화 강의를 듣다가 궁금한 점이 있어서 질문 남깁니다. 첫 테이블을 가지고 마지막에 정제되 있는 테이블 형태로 만들기 위해서 전체적인 방법에 대한 로직을 설계할 때 어떻게 단계단계로 변환 해야하는지 궁금합니다. 단순이 강의에 나온 단계 단계 방법을 외우는것이 아니라 ex) 이 단계로 한번에 갈 수 없어서 이 단계 단계로 변환한 다음 이 중간단게로 간다 와 같은 디테일한 방법에 대해 설명을 듣고 싶습니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
getStaticProps
11:37 에 getStaticProps 가 이벤트페이지 같은거에 적합하다 하셨는데 getStaticProps 라는게 npm build 를 하거나 npm run dev 를해서 서버를 키면 getStaticProps가 html 을 정적으로 만드는것까지 이해가 가는데 만약 이벤트 페이지를 변경하거나 삭제하고싶을때 이벤트 정보가 담긴 DB 는 삭제 또는 수정해도 이미 html 로 만들어놔서 그대로 보여주고 서버를 껏다 켜야지만 삭제 또는 수정한 내용이 적용되는건가요?
-
미해결UIKit - iOS14 실무 가이드 <iOS앱 진짜 개발자 되기>
xcode 설정관련 질문있습니다.
안녕하세요. 강의 잘 듣고 있습니다. xcode가 쌤은 코드 라인에 화살표가 있어서 그것을 옮겨서 빌드를 할 수 있게 세팅되어 있으시던데요. 그렇게 세팅할려면 어떻게 해야되나요? 맥북 환경도 낯설고 개발하는 것도 처음이라 궁금해서 찾아봐도 모르겠네요. 좀 알려주시면 감사하겠습니다.
-
미해결[신규 개정판] 이것이 진짜 크롤링이다 - 기본편
준비운동 - (크롤링을 위한 정말 쉬운 HTML - 뉴스 해킹) 내용 중 질문
안녕하세요! 강의 내용 중 궁금한 것이 있어 질문드립니다. html 내용을 수정해 기사 제목을 수정하는 실습을 문제 없이 진행했는데, 사진도 교체해보고 싶어서 시도하니 안되네요. 보통 마크다운으로 작성 시 사진에 대한 주소를 해당 태그 안에 넣으면 될 것 같은데, 원래 안되는건지, 가능하게 하는 방법이 있는지 궁금합니다.
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
오탈자 발견입니다.!
강의자료 3.메시지,국제화.pdf 5페이지에 하단에 MessgaeSource 인터페이스를 보면 코드를 포함한 일부 파라미터로 메시지를 읽어오는 기능을 제공한다 Message < 메시지 부분 알파벳 순서 오탈자입니다.!
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
안녕하세요, 제로초님! 모델관련 질문이 있습니다.
myPage라는 페이지에 user가 Cart에 담은 product를 결제했을때 payment(결제내역)을 보여주려고 합니다. 이것을 처음에 payment(결제내역) 모델과 Cart 모델을 연결시켜서 결제내역을 보여주게 하였습니다. 그런데 user가 Cart에 있는 product를 삭제할때 Payment의 내역까지 같이 삭제되는 현상이 발생했습니다. 생각해낸 방법이 Cart모델의 같은 내용을 가진 recordCart 모델을 만들어서 연결시켰습니다. Payment내역을 불러올때는 recordCart모델과 연결, user가 Cart의 Produdct를 삭제하거나 할떄는 Cart모델과 연결 하는 식으로 하였는데 이렇게 모델을 복사하여 사용하는게 별로 좋지 않은 방법일까요??
-
미해결프론트엔드 개발환경의 이해와 실습 (webpack, babel, eslint..)
절대경로를 사용하는 이유는 무엇인가요?
loader 파일을 입력할때 절대경로를 사용하는 이유가 무엇인가요? 없어도 동작에는 문제없는것 같아서요! module: { rules: [ { test: /\.js$/ use: [path.resolve('./my-webpack-loader.js')], // './my-webpack-loader.js' }, ], }, };
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
BaseEntity를 사용하고싶은데
질문1. Active Record패턴이라 BaseEntity를 사용해야하는데, id, createdAt, updatedAt도 공통적으로 쓰고싶은경우는 export abstract class CommonEntity extends BaseEntity { @PrimaryGeneratedColumn() id: number; @CreateDateColumn({ type: 'timestamptz' }) createdAt: Date; @UpdateDateColumn({ type: 'timestamptz' }) updatedAt: Date; } 이렇게 하고 CommonEntity를 다른 Entity에 extend해주면 될까요?? 질문2. 규모가 좀 큰 서비스를 구상중인데, 지극히 개인적으로 Repository를 따로 만드는 것이 오히려 더 유지,보수가 힘들것같아서 Active Record 패턴을 사용하려고합니다. Active Record, Data Mapper패턴이 성능적으로 차이가 있거나 그렇진않죠?? 단지 유지보수 편하게 하려고 하는것 맞나요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
dependencies에 validation을 넣었는데도 @NotEmpty 어노테이션 인식이 안됩니다
안녕하세요 implementation 'org.springframework.boot:spring-boot-starter-validation' 위 코드를 build.gradle에 추가했는데도 MemberForm에서 NotEmpty 어느테이션 인식이 안됩니다 ㅠㅠ 해결 방법이 있을까요 ? 혹시 몰라서 구글 드라이브에 프로젝트 파일 압축해서 올립니다 ! https://drive.google.com/file/d/1FmlEJKWkcZjraOXn9A2nxDLwKVMlgdEw/view?usp=sharing
-
미해결Vue.js 시작하기 - Age of Vue.js
cli설치가 안됩니다
node -v 는 v16.13.2 라고 뜨구요, npm -v 는 8.1.2 라고 뜹니다. 거기까지는 잘 따라 했는데요 다음에 CLI 를 설치하니까 선생님 화면처럼 뜨질 않고 설치가 안되는거 같습니다. 명령어를 실행하면 아래처럼 뜨는데 설치가 안되거 같아서요 에러가 날수 있도 sudo 를 붙이고 해도 아래처럼 뜹니다. ㅠㅠ
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
gradle빌드설정 이클립스에도 적용하는 법
안녕하십니까. 초반수업중에 IntelliJ에서 gradle을 안거치고 빌드하는 방식을 알려주셨는데 혹시 이클립스에서도 적용하는 방법이나 링크좀 알려주실 수 있을까요? 아니면 혹시 이클립스는 안거치고 바로 빌드하는 걸까요?