askSomeone 함수의 somone 파라미터를 유니온 타입(Developer | Person)으로 작성하고 해당 함수를 호출 할 때 askSomeone({ name: ‘디벨로퍼‘, skill: ‘웹 개발’, age: 34}) 로도 파라미터 주입이 가능한데요. 타입 구조체에 유니온 타입을 적용하게 될 경우 보장된 타입(공통된 타입)만 추론 가능한 것으로 이해했는데, Developer의 타입 구조체에 Person 타입 구조체의 속성인 age가 결합이 되어도 되는 건가요?
안녕하세요. 개발자님 제가 전 강의때 enum을 처음보게되서 구글검색으로 간단히 상수를 정렬해서 표현하는 것이라는 느낌은 알았습니다. 더 강의를 보려고 했는데 궁금한점이 생겨서 질문남깁니다. 1. enum Grade의 BASIC, VIP가 상수로 회원 등급을 지정해 준 것이라고 판단이 듭니다. 이때 BASIC, VIP가 상수로 지정된 값이 무엇인지 궁금합니다. 예를들면 String Basic에 BASIC이라는 String이 들어가 있는 것인지, String Basic이라는 공간만 할당되어 있는 것인지 이런 것입니다. 제가 main 에서 테스트 해봤을때, VIP값이 "VIP"와 비교해봤을때는 false이고 Grade.VIP 와 비교해봤을때는 true가 나온것을 봤을때 enum의 VIP는 문자열 값이 아닌 것 같다 정도입니다. 또 System.out.println으로 Grade.VIP를 출력해봤을때 VIP가 출력되므로 Grade안의 VIP에는 VIP라는 값이 담겨져 있다 정도입니다. 결과적으로 제가 알고 싶은 것은 enum으로 저렇게 선언 시 어떤 동작이 이루어져서 무슨 값이 안에 들어가 있는건지 궁금합니다. 제가 추정해보기에는 enum Grade안에 선언한 BASIC, VIP라는 코드는 실제로 private final Grade BASIC = new Grade(); private final Grade VIP = new Grade(); 라는 변수 안에 BASIC은 "BASIC"이라는 String이 setting 되어 있고, VIP는 "VIP라는 String 값이 setting 되어 있는 것 아닌가 싶습니다. 솔직히 필드를 클래스로 선언하는것 부터가 헷갈려서 위의 코드를 적고도 잘 이해가 안가긴 하네요.. 열심히 공부해야겠습니다.
유니온 타입의 장점 에서 전달받는 value를 any로 써도 똑같이 추천 api/메서드로 숫자나 string 관련 api가 나오던데 유니온타입의 장점이라기보단 if 문 안에 조건이 평가되서 (typeof value === 'number') 그에 따른 메서드를 추천해주는 타입스크립트의 장점이 아닌가요?
맥스 배워보려고 목마하임님 초급부터 전문가까지 - 한방에 끝내는 3dsmax 강좌 끊었다가 들어도 잘 모르겠고 기초는 어느정도 쌓아야 할 거 같아서 기초부터 나름 배우고 있는데요. 지금 캐릭터 메쉬에 바이패드 넣다가 엉뚱한 결과가 나와버려서 이거 어떻게 해야할지도 모르겠고 처음이라 메쉬안에 바이패드 넣는것도 겨우 했는데 다시 처음부터 해야한다면 맙소사~입니다. nif 파일을 처음 맥스에 불러오니 캐릭터가 바라보는 시점이 정면이 아니라 후면을 바라보고 있어서 전체 메쉬파일 선택해서 z축으로 180도 틀고 바이패드 작업했는데, 나중 결과는 반대쪽 메쉬가 움직이고 관절도 반대 방향으로 움직여요. 이런 결과는 왜 발생하는 건가요? nif 메쉬파일 불러올 때 정면을 바라보게 하는 옵션이 맥스에 따로 존재하는 건가요? 지금까지 작업한 결과를 바로 잡을 수 있는 방법이 있는지 궁금합니다. 01. 처음 nif 파일을 불러오면 캐릭터는 정면을 바라보지 않습니다. 02. 바이패드 넣어주고 관절 움직여보니 이런 결과가 발생합니다.
안녕하세요. 개발자님 3:00정도에 회원 도메인 협력관계에 보면 회원 저장소는 인터페이스 구현이 되어있지만 회원서비스는 구현이 안되어있는데, 회원 클래스 다이어그램에서는 회원 서비스도 인터페이스로 구현이 되어있네요. 회원 저장소는 아직 저장소가 선정되어 있지 않기때문에 인터페이스로 구현해서 나중에 갈아끼우려는 의도를 알겠는데, 회원 서비스는 회원가입, 회원조회 정해진 기능이 있는데 인터페이스를 만들고 구현체를 사용하는 이유를 모르겠습니다. 회원가입, 회원조회에 관련된 로직도 서비스단에서 바뀔수 있다고 생각하고 인터페이스를 만든건가요..? 요구사항에는 없었던거 같은데 어떤 의도인지 잘 모르겠어서 질문남깁니다. 질문 읽어주셔서 감사하고, 좋은하루 되시길 바랍니다!
안녕하세요. 개발자님 수업을 듣다보니 조금 헷갈리는 부분이 있습니다. 수업에서 역할과 구현은 인터페이스와 클래스 또는 인터페이스와 클래스로 구현한 인스턴스를 지칭하는 것 같습니다. 근데 이것을 역할과 구현으로 표현하는게 약간 헷갈립니다. 자바에서 클래스라는 것 자체가 인스턴스들의 공통부분을 모아서 추상화 시킨 것이 아닌가요? 그렇다면 클래스와 인스턴스 간의 관계가 역할과 구현이 아닌가 싶습니다. 근데 클래스 or 클래스를 구현한 인스턴스와 인터페이스 관계가 역할과 구현/추상화라고 표현되는게 조금 헷갈립니다. 제가 알고 있는게 잘못된건지, 또는 제가 알고 있는 내용도 맞지만 더 나아가 클래스와 인터페이스 의 관계에서는 또다른 역할과 구현 + 추상화가 된 것을 표현하고 있는지에 대해서 궁금합니다. 좋은하루되시고 항상 답변해주셔서 감사합니다.
선생님 항상 좋은 강의 많은 도움이 되고있습니다. 감사합니다!! 우선 제 전체 코드는 다음주소에 (깃허브)에 올렸습니다. https://github.com/minkook92/jpahsop/tree/master/src 제 나름대로 상품주문 test-code를 작성하였으나, 오류가 납니다. 혹시 어디서 잘못 되었는지 봐 주시면 감사하겠습니다! package jpabook.jpashop.service; import jpabook.jpashop.domain.*; import jpabook.jpashop.domain.item.Book; import jpabook.jpashop.domain.item.Item; import jpabook.jpashop.repository.OrderRepository; import org.assertj.core.api.Assertions; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import javax.persistence.EntityManager; import static org.junit.Assert.*; @RunWith(SpringRunner.class) @SpringBootTest @Transactional public class OrderServiceTest { @Autowired MemberService memberService; @Autowired ItemService itemService; @Autowired OrderService orderService; @Test public void 상품주문() throws Exception { //given //멤버저장 Member member = new Member(); member.setName("kim"); member.setAddress(new Address("city", "street", "zipcode")); memberService.join(member); //책 저장 Book book = new Book(); book.setIsbn("12345"); book.setAuthor("kim"); book.setStockQuantity(100); book.setPrice(10000); book.setName("바람과함께 사라지다."); itemService.saveItem(book); //when //멤버 찾기 Member findMember = memberService.findOne(member.getId()); //아이템 찾기 Item findItem = itemService.findOne(book.getId()); //배달 정보 저장 Delivery delivery = new Delivery(); delivery.setStatus(DeliveryStatus.READY); delivery.setAddress(member.getAddress()); //주문 아이템 저장 OrderItem orderItem = OrderItem.createOrderItem(findItem, findItem.getPrice(), 10); //주문 생성 Order order = Order.createOrder(findMember, delivery, orderItem); //주문 찾기 Long orderId = orderService.order(order.getMember().getId(), order.getOrderItems().get(0).getId(), order.getOrderItems().get(0).getCount()); Order findOrder = orderService.findOne(orderId); //then //재고 수량 검증 , 100개의 stockQuantity에서 주문을 10개를 하였고, 이를 주문에 반영하였으니, 주문을 한다면 stockQuantity는 90개가 되어야 함. Assertions.assertThat(findOrder.getOrderItems().get(0).getCount()).isEqualTo(90); } @Test public void 주문취소() throws Exception { //given //when //then } @Test public void 상품주문_재고수량초과() throws Exception{ //given //when //then } } 오류 내용 2021-06-07 05:47:02.587 INFO 9712 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@3f67593e testClass = OrderServiceTest, testInstance = jpabook.jpashop.service.OrderServiceTest@17541204, testMethod = 상품주문@OrderServiceTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@1ab06251 testClass = OrderServiceTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@394df057, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@6ab778a, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@58ea606c, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@63070bab, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@3098cf3b, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@1189dd52], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]]; transaction manager [org.springframework.orm.jpa.JpaTransactionManager@34001c5d]; rollback [true] 2021-06-07 05:47:03.188 DEBUG 9712 --- [ main] org.hibernate.SQL : select member0_.member_id as member_i1_2_, member0_.city as city2_2_, member0_.street as street3_2_, member0_.zipcode as zipcode4_2_, member0_.name as name5_2_ from member member0_ where member0_.name=? 2021-06-07 05:47:03.203 INFO 9712 --- [ main] p6spy : #1623012423203 | took 4ms | statement | connection 4| url jdbc:h2:mem:787fed49-3533-4ca4-b5e2-6e76bef929f6 select member0_.member_id as member_i1_2_, member0_.city as city2_2_, member0_.street as street3_2_, member0_.zipcode as zipcode4_2_, member0_.name as name5_2_ from member member0_ where member0_.name=? select member0_.member_id as member_i1_2_, member0_.city as city2_2_, member0_.street as street3_2_, member0_.zipcode as zipcode4_2_, member0_.name as name5_2_ from member member0_ where member0_.name='kim'; 2021-06-07 05:47:03.219 DEBUG 9712 --- [ main] org.hibernate.SQL : call next value for hibernate_sequence 2021-06-07 05:47:03.220 INFO 9712 --- [ main] p6spy : #1623012423220 | took 0ms | statement | connection 4| url jdbc:h2:mem:787fed49-3533-4ca4-b5e2-6e76bef929f6 call next value for hibernate_sequence call next value for hibernate_sequence; 2021-06-07 05:47:03.281 DEBUG 9712 --- [ main] org.hibernate.SQL : call next value for hibernate_sequence 2021-06-07 05:47:03.282 INFO 9712 --- [ main] p6spy : #1623012423282 | took 0ms | statement | connection 4| url jdbc:h2:mem:787fed49-3533-4ca4-b5e2-6e76bef929f6 call next value for hibernate_sequence call next value for hibernate_sequence; 2021-06-07 05:47:03.365 INFO 9712 --- [ main] p6spy : #1623012423365 | took 0ms | rollback | connection 4| url jdbc:h2:mem:787fed49-3533-4ca4-b5e2-6e76bef929f6 ; 2021-06-07 05:47:03.377 INFO 9712 --- [ main] o.s.t.c.transaction.TransactionContext : Rolled back transaction for test: [DefaultTestContext@3f67593e testClass = OrderServiceTest, testInstance = jpabook.jpashop.service.OrderServiceTest@17541204, testMethod = 상품주문@OrderServiceTest, testException = org.springframework.dao.InvalidDataAccessApiUsageException: id to load is required for loading; nested exception is java.lang.IllegalArgumentException: id to load is required for loading, mergedContextConfiguration = [WebMergedContextConfiguration@1ab06251 testClass = OrderServiceTest, locations = '{}', classes = '{class jpabook.jpashop.JpashopApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@394df057, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@6ab778a, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@58ea606c, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@63070bab, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@3098cf3b, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@1189dd52], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true, 'org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]] org.springframework.dao.InvalidDataAccessApiUsageException: id to load is required for loading; nested exception is java.lang.IllegalArgumentException: id to load is required for loading at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:374) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:235) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:551) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) at jpabook.jpashop.repository.ItemRepository$$EnhancerBySpringCGLIB$$18b1a0a2.findOne(<generated>) at jpabook.jpashop.service.OrderService.order(OrderService.java:32) at jpabook.jpashop.service.OrderService$$FastClassBySpringCGLIB$$ad373727.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) 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:750) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) at jpabook.jpashop.service.OrderService$$EnhancerBySpringCGLIB$$da7a4323.order(<generated>) at jpabook.jpashop.service.OrderServiceTest.상품주문(OrderServiceTest.java:64) 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.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53) Caused by: java.lang.IllegalArgumentException: id to load is required for loading at org.hibernate.event.spi.LoadEvent.<init>(LoadEvent.java:96) at org.hibernate.event.spi.LoadEvent.<init>(LoadEvent.java:64) at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.doLoad(SessionImpl.java:2783) at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.lambda$load$1(SessionImpl.java:2767) at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.perform(SessionImpl.java:2723) at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2767) at org.hibernate.internal.SessionImpl.find(SessionImpl.java:3322) at org.hibernate.internal.SessionImpl.find(SessionImpl.java:3284) 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.$Proxy96.find(Unknown Source) at jpabook.jpashop.repository.ItemRepository.findOne(ItemRepository.java:26) at jpabook.jpashop.repository.ItemRepository$$FastClassBySpringCGLIB$$dc3fed7a.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ... 48 more
풀스택을 위한 도커와 최신 서버 기술(리눅스, nginx, AWS, HTTPS, 배포까지) [풀스택 Part3]
다른 강의에서 도커 설치를 하는 것을 보고 갑자기 궁금해서 질문드립니다. centos 환경에서 도커설치시 yum install docker 이렇게 간단하게 설치하던데 ubuntu도 그냥 sudo apt-get install docker 이렇게 안하고 강의처럼 복잡?하게 설치하는 이유가 있을까요?
강사님 안녕하세요, 강의를 듣다 궁금한 점이 있어서 글 올립니다. 보통 ItemService 같은 서비스 클래스는 구현체를 만드는 것으로 알고 있는데, 혹시 강의처럼 ItemServiceImpl 클래스를 안만들고 바로 구현해도 크게 문제되지는 않는건지 궁금합니다. (JPA라서 그런건지 아니면 예제이기 때문에 단순화 시키신건지 등 ..) 답변 부탁드리겠습니다! 감사합니다!!
handleChangeInput 함수에서 handleReset 함수를 실행하는 것은 이해가 되는데요. 왜 return 구문을 쓰신건지 잘 모르겠습니다 ^^;; handleChangeInput 함수 자체도 별도의 return을 해주는 것이 없는것 같아서요. handleChangeInput(e) { const searchKeyword = e.target.value; if (searchKeyword.length <= 0) { return this.handleReset(); // 이 부분 입니다! } this.setState({ searchKeyword }); }
[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 28.021 s [INFO] Finished at: 2021-06-06T23:21:18+09:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project spring-petclinic: There are test failures. [ERROR] [ERROR] Please refer to C:\Users\User\JavaProject\spring-petclinic\target\surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called? [ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk-16\bin\java" -javaagent:C:\\Users\\User\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.5\\org.jacoco.agent-0.8.5-run time.jar=destfile=C:\\Users\\User\\JavaProject\\spring-petclinic\\target\\jacoco.exec -jar C:\Users\User\AppData\Local\Temp\surefire13409109640807335750\surefirebooter17835205775616496 159.jar C:\Users\User\AppData\Local\Temp\surefire13409109640807335750 2021-06-06T23-21-16_829-jvmRun1 surefire6151291350789010891tmp surefire_012945399030963262607tmp" [ERROR] Error occurred in starting fork, check output in log [ERROR] Process Exit Code: 1 [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? [ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk-16\bin\java" -javaagent:C:\\Users\\User\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.5\\org.jacoco.agent-0.8.5-run time.jar=destfile=C:\\Users\\User\\JavaProject\\spring-petclinic\\target\\jacoco.exec -jar C:\Users\User\AppData\Local\Temp\surefire13409109640807335750\surefirebooter17835205775616496 159.jar C:\Users\User\AppData\Local\Temp\surefire13409109640807335750 2021-06-06T23-21-16_829-jvmRun1 surefire6151291350789010891tmp surefire_012945399030963262607tmp" [ERROR] Error occurred in starting fork, check output in log [ERROR] Process Exit Code: 1 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567) [ERROR] at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39) [ERROR] at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122) [ERROR] at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:61) [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 안녕하세요. 프로젝트를 git clone한 뒤 mvnw package 명령어를 실행했는데 다음과 같은 에러가 발생했네요. JDK16버전을 지원을 하지 않나해서 JDK 11로 재설정하고 재실행했는데도 동일한 에러가 발생하네요.
안녕하세요! 기본문제는 직접풀고 강의까지 들었습니다! 이번에 자료구조, 알고리즘을 공부한지 얼마 안됬는데, 코딩테스트 까지 얼마 남지 않았습니다.(3주~한달) 테스트는 프로그래머스로 진행된다고하는데, 테스트 난이도가 프로그래머스 1~2 정도라고합니다. 어떤식으로 공부를 진행해야 빠르게 준비 할수 있을까요!! 강의를 먼저 들으면서, 각 강의에 해당되는 주제를 프로그래머스 문제에서 찾아서 푸려고하는데;; 개념 공부도 따로 해야하겠죠?ㅠㅠ 조언 부탁드립니다...