묻고 답해요
169만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 핵심 원리 - 기본편
@Autowired에 대한 사용법이 궁금합니다.
// Test메서드 void AutowiredOption() { ApplicationContext ac = new AnnotationConfigApplicationContext(TestBean.class); // ac 객체를 생성할 때 오른쪽 인자의 클래스에는 @Component가 자동으로 붙음 } // 등록 클래스 static class TestBean { @Autowired(required = false) // 이렇게 해야 예외 안남, 아예 메서드가 호출 안됨 public void setNoBean1(Member member) { // Member는 스프링 빈에 없음 System.out.println("setNoBean1 = " + member); } //null 호출 @Autowired public void setNoBean2(@Nullable Member member) { System.out.println("setNoBean2 = " + member); } //Optional.empty 호출 @Autowired(required = false) public void setNoBean3(Optional<Member> member) { System.out.println("setNoBean3 = " + member); } } 질문1. @Autowired가 붙은 메서드의 정보가 빈으로 등록이 되나요?(setNoBean1, 2, 3이란 이름의 빈이 등록되나요?)질문2. 빈 등록 방법 중에 @Configuration을 사용할 때는 @Bean을 메서드에 붙어야 한다고 알고 있는데 @Bean을 메서드에 붙여도 될까요?
-
미해결스프링 핵심 원리 - 기본편
Test를 돌렸을 때 자바 결과 + 스프링 로그(?)도 출력하고 싶습니다.
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]안녕하세요, 좋은 강의 잘 듣고 있는 전진호 학생입니다.아래 사진은 싱글톤 컨테이너 강의 3분 26초에 나오는 SingletonTest의 springContainer를 돌렸을 때 제 결과입니다. 강사님의 결과는 아래처럼 나오고 그 이후에 결과가 나옵니다.강사님의 터미널 결과처럼 나오게 하려면 어떻게 해야 할까요.그리고 강사님의 결과처럼 저는 왜 "Test Results"가 안 보이는지 모르겠습니다. (아래 사진에 보면 Test Result가 안 보입니다.) 구글링을 해보니 log4j라고 하는데 application.xml을 만들어서 넣어보기도 하고, application.properties에 넣어보기도 하고, implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'를 빌드 해보기도 했는데 잘 안되어서 질문 드립니다. 관련 링크라도 주시면 감사하겠습니다.
-
미해결스프링 핵심 원리 - 기본편
Qualifier, 빈 이름 지정 등 OCP 위반
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]강의를 듣다보니 궁금한 점이 생겨서 질문 남깁니다.Interface에 대한 구현체가 여러개인 경우, 어떤 빈을 주입할지 결정하기 위해 @Qualifier를 이용하거나 빈 이름을 지정하는 방법등을 사용한다고 강의에 나오는데요.이것을 보다보니 구현체를 바꾸려면 결국 사용하는 서비스 layer에서 관련 코드 (구현체를 바꾸는)를 수정해야 하는 거 같은데 이러면 OCP를 위반하게 되는 거 같아서요.OCP 위반을 막으려면 AppConfig를 도입했을 때처럼 구현체를 설정하는 역할을 분리하고 수동 빈 등록으로 가야하는거 아닌가라는 생각이 들었는데 보통 실무에서는 어떻게 처리하는게 맞을까요??구현체를 바꾸는 코드 변경정도는 tradeoff로 감수하는 편인가요 역할 분리하는 편인가요??
-
해결됨스프링 핵심 원리 - 기본편
테스트 실행에 오류가 걸려요
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]main 아래의 코드들은 다 실행이 잘 되는데 test 아래의 코드가 실행이 안됩니다.무엇이 오류인지 모르겠습니다. 빨간 줄로 표시도 안되고 인터넷에 쳐도 못 찾겠어서 글 남깁니다.
-
미해결스프링 핵심 원리 - 기본편
userA와 userB에 대해
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]강의 내용 중 userA의 주문 금액은 10000원, userB의 주문 금액은 20000원인데 코드 실행 결과 20000원이 나오는 경우는 스프링 컨테이너에서 자동으로 싱글톤 패턴이 적용되어 객체 인스턴스가 하만 생성되기 때문인가요? 그래서 객체 인스턴스가 공유되서 그런가요?
-
미해결나도코딩의 자바 기본편 - 풀코스 (20시간)
super사용해봤는데 이해가 잘 안되네요
저는 super를 부모 클래스의 어떤 것을 사용하는 것으로 이해했습니다. package nodocoding; public class _18_ClassMethod { public static void main(String[] args) { Animal [] animals = new Animal[2]; animals[0] = new Animal(); animals[0].age = 10; animals[1] = new Lion(); ((Lion)animals[1]).name = "lion"; System.out.println(((Lion)animals[1]).name); ((Lion)animals[1]).cry(); } } class Animal { int age; String species; void cry (){ System.out.println("동물소리를 내며 울어요."); } } class Lion extends Animal{ String name; void lionCry() { super.cry(); System.out.println("라이언의 울음소리는 크아앙"); } } 제가 생각한 것은((Lion)animals[1]).cry();라고 코드를 작성했을 때결과가"동물소리를 내며 울어요." "라이언의 울음소리는 크아앙" 이라고 뜰 줄 알았는데 "동물소리를 내며 울어요."만 뜨더라구요.예상과 다르네요 ㅠ 왜 이런 걸까요??
-
해결됨Java/Spring 주니어 개발자를 위한 오답노트
강의와 크게 상관은 없지만 공부의 방향성에 대해서 질문합니다.
저는 올해 4월에 입사해서 이제 막 4개월차 주니어 개발자 입니다.퇴근 후에 공부를 하려고 하다가 매번 생각이 많아지는 주제인데요.저의 주요 업무는 전자정부프레임워크 기반의 jsp사이트를 ui유지보수하는 업무입니다.더 좋은 회사를 합격하지 못해서 아쉽긴하지만 그래도 신입받아주는 회사들이 많이 없어서 일단은 기분좋게 다니려고 하고 있습니다. 그런데 회사 업무를 하는 데 앞서서 공부를 하려고 하다보면 자꾸만 그런생각이 들더라구요. jsp/mybatis 를 이렇게 까지 공부해야하나? 전자정부프레임워크 어차피 다른 서비스 기업으로 이직하게 되면 안쓸텐데 굳이 이렇게 공부해야할까 하고요.그래서 회사기술스택에 맞춰서 해야할지 지금듣고 있는 김영한님 스프링강의를 들으면서 개인 포트폴리오를 보강하는 것이 나은지 둘다 하면 되지않냐고도 할수 있지만 그게 정말 맞는 방법인지 하는 의구심이 듭니다.최우선적으로 뭘 중점적으로 해야하는지 우선순위를 명확하게 알고싶습니다!!
-
해결됨나도코딩의 자바 기본편 - 풀코스 (20시간)
_Quiz_10 번 문제
저는 Customer 클래스를 선언할 때 name, age를 private 으로 선언하고 Getter, Setter를 이용하여 값을 접근할려고 짯습니다. 근데 map() 을 하는 과정에서 아래와 같은 오류가 떠서 setName()을 그냥 String 반환값으로 고쳐서 했더니 에러가 해결이 됐습니다. 근데 왜 이런 오류가 났는지 이해가 안갑니다 public class _Quiz_10 { public static void main(String[] args) { List<Customer> customerList = new ArrayList<>(); customerList.add(new Customer("챈들러",50)); customerList.add(new Customer("레이첼", 42)); customerList.add(new Customer("모니카", 21)); customerList.add(new Customer("벤자민", 18)); customerList.add(new Customer("제임스", 5)); System.out.println("미술관 입장료"); System.out.println("=================="); customerList.stream() .map(x->x.getAge()>=20 ? x.setName(x.getName() + " 5000원"):x.setName(x.getName()+ " 무료")) .forEach(System.out::println); } } class Customer{ private String name; private int age; public Customer(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
-
해결됨나도코딩의 자바 기본편 - 풀코스 (20시간)
퀴즈 11을 if~else 대신 swtich문으로 풀어도 똑같은 결과가 나오는데, 취사선택의 문제일까요??
package chap_11; public class _Quiz_11 { public static void main(String[] args) { //todo 사용자 정의 예외 클래스(extends Exception을 통해 가능) //todo 예외 객체 생성 메시지가 2개인 것을 보아, 클래스도 2개를 만들어야 할듯...? //todo 경우의 수가 3가지니까 if~else문으로 작성 int errorCode = 0; try { switch (errorCode) { case 0: System.out.println("상품 구매를 완료하였습니다."); break; case 1: throw new NotOnSaleException("상품 구매 가능 시간이 아닙니다."); case 2: throw new SoldOutException("해당 상품은 매진되었습니다."); default: throw new Exception("이외의 에러코드는 여기서 처리하였습니다."); } } catch (NotOnSaleException e) { System.out.println(e.getMessage()); System.out.println("상품 구매는 20시부터 가능합니다."); } catch (SoldOutException e) { System.out.println(e.getMessage()); System.out.println("다음 기회에 이용해주세요."); } catch (Exception e) { System.out.println(e.getMessage()); } } } class NotOnSaleException extends Exception { public NotOnSaleException(String msg) { super(msg); } } class SoldOutException extends Exception { public SoldOutException(String msg) { super(msg); } }위의 errorCode를 각각넣으면 퀴즈의 요구사항대로 정상적으로 출력이 됩니다. 또한, int errorCode = 99; 같이 default에 해당하는 다른 값을 넣어도 정상적으로 다음과 같이 출력이 되구요:제목과 같이 if~else문이나 swtich문으로 선택하는 것은 개인의 자유인가요? 아니면 특정 상황에 따라 다른가요?
-
미해결스프링 핵심 원리 - 기본편
oreApplicationTests 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 강의처럼 oreApplicationTests에서 오류가 나는데 오류내용이 달라서 질문드립니다 ,,ㅠㅠ오류내용Logging system failed to initialize using configuration from 'null'java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.ConsoleAppender[STDOUT] - No encoder set for the appender named "STDOUT". at org.springframework.boot.logging.logback.LogbackLoggingSystem.reportConfigurationErrorsIfNecessary(LogbackLoggingSystem.java:260) at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:247) at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:319) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:73) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:187) at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:332) at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:298) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81) at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:356) at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1406) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:545) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:187) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:119) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:127) at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:241) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:377) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:382) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:377) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:376) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:289) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:288) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:278) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:277) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:105) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:104) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:68) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) 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:1511) 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:147) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) 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:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@597f48df testClass = hello.core.CoreApplicationTests, locations = [], classes = [hello.core.CoreApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceLocations = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@6cc0bcf6, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@f5c79a6, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@49a64d82, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@37d3d232, org.springframework.boot.test.context.SpringBootTestAnnotation@a360168f], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:143) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:127) at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:191) at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:130) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:241) at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:377) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:382) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:377) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:376) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:289) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:288) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:278) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:277) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:105) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:104) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:68) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) 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:1511) 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:147) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) 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:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.ConsoleAppender[STDOUT] - No encoder set for the appender named "STDOUT". at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:347) at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:298) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81) at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:356) at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1406) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:545) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:187) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:119) ... 72 moreCaused by: java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.ConsoleAppender[STDOUT] - No encoder set for the appender named "STDOUT". at org.springframework.boot.logging.logback.LogbackLoggingSystem.reportConfigurationErrorsIfNecessary(LogbackLoggingSystem.java:260) at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:247) at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:319) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:73) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:187) at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:332) ... 97 more
-
미해결나도코딩의 자바 기본편 - 풀코스 (20시간)
b1.appendModelName 까망이(최신형)
void appendModelName(String modelName) { this.modelName += modelName }인데 어떻게 '까망이 + 까망이' 가 되는게 아니라b1.appendModelName 에 있는 (최신형) 이 붙게 되는걸까요....? append가 인텔리제이에서 제공하는 어떤 함수 같은건가요???
-
미해결스프링 핵심 원리 - 기본편
MemberRepository 인터페이스 부분 질문입니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.강의 화면을 캡쳐했습니다.제가 제대로 이해한 것이 맞는지 궁금하여 질문합니다.MemberRepository 인터페이스 부분인데 위 사진의 void save(Member member)에서 파라미터로 앞서 만든 Member 클래스와 member 변수를 새로 생성해준게 맞나요?
-
미해결Java/Spring 주니어 개발자를 위한 오답노트
진짜 객체지향과 테스트하기 쉬운 코드를 위헤서는 jpa가 의미없는게 아닌가하는 생각이 들어요
이전에 혼자 ddd, 헥사고날 아키텍처를 공부하면서 느꼈던게객체지향적인 코드 + 테스트하기 용이한 코드를 작성하기 위해서는 결국 domain layer와 persistence layer의 분리가 필수적인데jpa entity와 domain entity를 완전히 분리했을 때 JPA가 mybatis나 jdbc template를 사용하는 것과 비교해 가지는 강점이 있는지 잘 모르겠습니다..그나마 jpa entity와 domain entity를 분리하지 않는다면 어떻게든 온몸 비틀기로 그나마 테스트하기 용이하고 객체지향스러운 코드를 작성해볼 수는 있지만 결국 복잡한 로직에서는 쿼리 때문에 문제가 생기고 ㅜ지식 공유자님께서는 이 문제에 대해 어떻게 생각하시나요?
-
미해결나도코딩의 자바 기본편 - 풀코스 (20시간)
메소드 퀴즈6
/** 기능 : 인덱스번지부터 *로 개인정보를 가리는 메소드 * 매개변수 : String data, int index 리턴타입 : 처리된 개인정보 => String * 메소드명 : getHiddenData */ public static String getHiddenData(String data, int index) { String hiddenData = data.substring(0, index); for(int i = 0; i < data.length() - index; i++) { hiddenData += "*"; // System.out.print("*"); // 이렇게 하니까 *표가 앞으로 가버림.. 왜 그럴까요? } return hiddenData;가운데 주석처리한대로 *를 프린트하니까 ** 이름 : 나이런 식으로 출력이 됩니다. String hiddenData 에서 공개부분만큼만 자르고, 뒤에 비공개부분만큼 println 에서 line 빼고, for문 반복하면 **이 뒤로 붙어야 할 것 같은데 이해가 안됩니다.. 복습겸 문제풀기 + 강의 다시보기 까지 해당 문제를 3번은 풀었는데도 코드를 이해하고 푸는게 아니라 답이 뭐였더라...를 더듬 거리면서 푸는거같아요..
-
미해결자바 개발자를 위한 코틀린 입문(Java to Kotlin Starter Guide)
생성자 파라미터 콤마
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. class JavaHouse( private val address: String, private val livingRoom: LivingRoom, ) {생성자 파라미터 넣을시에address: String,livingRoom: LivingRoom 콤마를 넣으셨는데요콤마를 안넣어도 되는것 같은데요 굳이 넣는 이유가 무엇인지요?
-
해결됨Java/Spring 주니어 개발자를 위한 오답노트
c. Collection,Map 질문
Collection.Map의 Good 케이스를 알 수 있을까요?맵을 사용할 때 맵 안에 맵이 있고 이런 형태를 사용하지 않는게 좋은건지 아니면 따로 dto로 변환해서 사용해야하는건지 구분이 안 가서 질문 드립니다 ! 지정된 scope를 넘나들지 않는다는 것도 이해가 가지 않습니다 ㅠㅠ조금만 더 쉽게 설명 붙여주시면 감사드리겠습니다!
-
미해결나도코딩의 자바 기본편 - 풀코스 (20시간)
안녕하세요 지난 시간에 배운 인터페이스(후반전)을 함수형 인터페이스로 만들어보았습니다.
(메인 클래스 부분 아래로 내려가지지 않아서 실행 결과를 여기에 먼저 올립니다 😅)참고로, 함수형 인터페이스를 사용할 때는 아래와 같이 함수 시그니처(함수 이름, 반환형, 파라미터 타입)만 동일하고 바디 부분은 달라도 정상적으로 실행이 되더군요.📋Reportable 인터페이스package practice; @FunctionalInterface public interface Reportable { void report(int time); // 신고 }📋Detectable 인터페이스package practice.detector; @FunctionalInterface public interface Detectable { String name = "감지자"; // 인터페이스도 필드를 가질 수 있음 void detect(); // 감지 }💻NormalReporter 클래스package practice; public class NormalReporter implements Reportable { @Override public void report(int time) { System.out.println(time + " 초 동안 일반 화재 신고를 진행합니다."); } }💻VideoReporter 클래스package practice; public class VideoReporter implements Reportable { @Override public void report(int time) { System.out.println("직전 " + time + "초 영상과 함께 신고를 진행합니다."); } }💻FireDetector 클래스package practice.detector; public class FireDetector implements Detectable{ @Override public void detect() { System.out.println("일반 성능으로 화재를 감지합니다."); } }💻AdvancedFireDetector 클래스package practice.detector; public class AdvancedFireDetector implements Detectable{ @Override public void detect() { System.out.println("향상된 성능으로 화재를 감지합니다."); } }💻메인 클래스package practice; import practice.detector.Detectable; public class practice { public static void main(String[] args) { //* 함수형 인터페이스 실행 Reportable reportableNormal = (time) -> System.out.println(time + " 초 동안 일반 화재 신고를 진행합니다."); Reportable reportableVideo = (time) -> System.out.println("직전 " + time + "초 영상과 함께 신고를 진행합니다."); Detectable detectableFire = () -> System.out.println("일반 성능으로 화재를 감지합니다."); Detectable detectableAdvancedFire = () -> System.out.println("향상된 성능으로 화재를 감지합니다."); reportbyNormalReporter(reportableNormal, 20); reportbyVideoReporter(reportableVideo, 10); detectbyFireDetector(detectableFire); detectbyAdvancedFireDetector(detectableAdvancedFire); } public static void reportbyNormalReporter(Reportable reporter, int time) { reporter.report(time); } public static void reportbyVideoReporter(Reportable reporter, int time) { reporter.report(time); } public static void detectbyFireDetector(Detectable detector) { detector.detect(); } public static void detectbyAdvancedFireDetector(Detectable detector) { detector.detect(); } }
-
해결됨Java TPC (생각하고, 표현하고, 코딩하고)
call by reference 관련 자바는 call by value방식만 존재하지 않나요?
엄밀하게 따지면 JAVA는 모두 call by value로 알고 있습니다.call by reference 방식은 실제 메모리의 주소값을 전달하여 원본 자체의 주소가 바뀌는 방식으로 알고있습니다.반면 자바에서 reference type을 메서드로 전달하여 값이 바뀌는건, 메서드내에서 reference type 의 주소를 복사받아. 주소의 변화 없이 값만 조정하는걸로 압니다.즉 메서드 내에서 전달받은 복사된 주소값으로, 해당 객체나 배열의 값을 수정하는거지. 원본 자체의 변화는 없는걸로 학습했는데, 제가 학습한게 맞을까요?
-
미해결스프링 핵심 원리 - 기본편
null point가 계속 뜹니다...
3일내내 봐도 도저히 모르겠습니다.member를 인식을 못해서 나오는 오류같은데...왜그러는지 모르겠네요 https://drive.google.com/file/d/14g_0hPnQMDfxNpcRIfCwjEczhci0loYu/view?usp=drive_link 드라이브 링크 올리고 OrderApp 에서 실행시키면 null point 나옵니다. 도와주세요
-
해결됨스프링 핵심 원리 - 기본편
수정자 주입 관련 질문
섹션7 - 다양한 의존관계 주입 방법 수강 중입니다.수정자 주입 방식에서 주입할 파라미터가 없다면 오류가 발생한다는 부분에서 궁금한게 있습니다.주입할 파라미터가 Bean 객체 대상인데 아직 생성되지 않으면 그것을 먼저 생성해주고 주입하는 것이 맞나요?파라미터가 1개이고 Bean 객체 대상이 아니면 굳이 required = false해주지 말고 아예 Autowired 애노테이션을 작성하지 않아도 되는건가요?