월 22,000원
5개월 할부 시다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 해결됨스프링 부트 개념과 활용
로그 커스텀마이징 logback-spring.xml 설정 후 오류 발생
제 프로젝트 구조는 아래와 같고, 본 강의에서 logback-spring.xml 파일을 생성하여 <?xml version="1.0" encoding="UTF-8"?><configuration> <include resource="org/springframework/boot/logging/logback/base.xml"/> <logger name="com.example" level="DEBUG"/></configuration> 으로 설정한 후 구동시켜보면 와 같이 debug 레벨의 로그가 출력되지 않네요; 어떻게 해결해야하는지 도움 부탁드립니다... * 추가 내용 올려주신 링크 레퍼런스를 참고해보니, <?xml version="1.0" encoding="UTF-8"?><configuration> <include resource="org/springframework/boot/logging/logback/defaults.xml"/> <include resource="org/springframework/boot/logging/logback/console-appender.xml" /> <root level="INFO"> <appender-ref ref="CONSOLE" /> </root> <logger name="com.example" level="DEBUG"/></configuration> 로 바껴져있어 로그파일을 수정해보았으나, 결과는 똑같았습니다..
- 해결됨스프링 부트 개념과 활용
로깅 퍼사드(Facade)와 로거의 관계에 대해...
로깅 파서드이 무엇인지 찾아보려고 구글링 했는데, 로깅 프레임워크 등 다른 용어가 나타나 더 혼란이 오는 것 같아 질문드립니다. 먼저 로깅 퍼사드라는 것이 무엇인지 궁금합니다. 그리고, 본강의에서 '로그 퍼사드를 통해서 로거를 사용한다'라고 이해했는데 맞는 건가요??
- 미해결스프링 부트 개념과 활용
개인 블로그 포스팅 관련 질문입니다
안녕하세요? 공부하면서 정리한 내용으로 개인 블로그 글을 작성해도 될까요? 개인 블로그 글 작성 시, 강의해주시는 백기선 님 성함과 강의명, 강의 url까지 모두 명시하였습니다. 확인해주셔서 감사합니다.
- 미해결스프링 부트 개념과 활용
application.properties 관련 질문
application.properties를 사용할 때 저는 하면 저렇게 가이드? 식으로 나오지 않는데 이 부분은 InteliJ Ulimate와 Community 차이 인 건가요 아니면 InteliJ의 플러그인을 설치해서 사용할 수 있는건가요?? 제가 현재 인텔리제이 커뮤니티를 사용하고 있습니다.
- 해결됨스프링 부트 개념과 활용
테스트 코드 작성에 대해 질문있습니다
최근에 IntelliJ를 처음 사용하면서 적응 단계에 있는데요, 그 전에 이클립스 ide sts를 이용하면서 테스트 코딩을 작성해 본 적이 없어 이번 강의가 생소하고 이해하기 힘든 부분(Junit의 assertThat, assertJ 등)이 많았습니다. 혹시 이 부분을 이해하기 위해서 어디부터 공부하면 좋을까요??
- 미해결스프링 부트 개념과 활용
안녕하세요 강사님
테스트 관련 강의를 보다가 OutputCapture를 테스트 해보려고헀는데 하기와 같은 에러가 발생해서 질문드리고싶습니다.. Test Source package me.survivalking.spring_test;import me.survivalking.spring_test.sample.SampleController;import me.survivalking.spring_test.sample.SampleService;import org.junit.Rule;import org.junit.jupiter.api.Test;import org.junit.jupiter.api.extension.ExtendWith;import org.junit.runner.RunWith;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient;import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;import org.springframework.boot.test.context.SpringBootTest;import org.springframework.boot.test.mock.mockito.MockBean;import org.springframework.boot.test.system.OutputCaptureRule;import org.springframework.boot.test.web.client.TestRestTemplate;import org.springframework.test.context.junit.jupiter.SpringExtension;import org.springframework.test.context.junit4.SpringRunner;import org.springframework.test.web.reactive.server.WebTestClient;import org.springframework.test.web.servlet.MockMvc;import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;import static org.assertj.core.api.Assertions.assertThat;import static org.mockito.Mockito.when;import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;@RunWith(SpringRunner.class)@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)@AutoConfigureMockMvc@AutoConfigureWebTestClientclass SpringTestApplicationTests {// WebEnvironment이 Mock일 떄 사용 @Autowired private MockMvc mockMvc; @Autowired private TestRestTemplate testRestTemplate; //Controller단만 가서 확인하고 싶다 @MockBean SampleService sampleService; // 위에 것들은 Sync 방식 WebClient는 Async 응답이 오면 Callback이 옴 나머지는 기다림 @Autowired WebTestClient webTestClient; @Rule public OutputCaptureRule outputCapture = new OutputCaptureRule(); //@Test public void contextLoads() throws Exception{ mockMvc.perform(MockMvcRequestBuilders.get("/hello")) .andExpect(status().isOk()) .andExpect(content().string("hello heesuk")) .andDo(print()); } //@Test public void Test2() throws Exception{ String result = testRestTemplate.getForObject("/hello", String.class); assertThat(result).isEqualTo("hello heesuk"); } //@Test public void Test3() throws Exception{ when(sampleService.getName()).thenReturn("heesuk"); String result = testRestTemplate.getForObject("/hello",String.class); assertThat(result).isEqualTo("hello heesuk"); } @Test public void Test4() throws Exception{ when(sampleService.getName()).thenReturn("heesuk"); webTestClient.get().uri("/hello").exchange() .expectStatus().isOk() .expectBody(String.class).isEqualTo("hello heesuk"); assertThat(outputCapture.toString()) .contains("holoman") .contains("skip"); }} OutputCapture가 - 표시가 되어있어서 OutputCaptureRule을 사용헀더니 하기와 같은 에러가 나옵니다. Connected to the target VM, address: '127.0.0.1:13028', transport: 'socket' 21:50:12.485 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] 21:50:12.510 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)] 21:50:12.557 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [me.survivalking.spring_test.SpringTestApplicationTests] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper] 21:50:12.572 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [me.survivalking.spring_test.SpringTestApplicationTests], using SpringBootContextLoader 21:50:12.577 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [me.survivalking.spring_test.SpringTestApplicationTests]: class path resource [me/survivalking/spring_test/SpringTestApplicationTests-context.xml] does not exist 21:50:12.578 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Did not detect default resource location for test class [me.survivalking.spring_test.SpringTestApplicationTests]: class path resource [me/survivalking/spring_test/SpringTestApplicationTestsContext.groovy] does not exist 21:50:12.578 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [me.survivalking.spring_test.SpringTestApplicationTests]: no resource found for suffixes {-context.xml, Context.groovy}. 21:50:12.579 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [me.survivalking.spring_test.SpringTestApplicationTests]: SpringTestApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 21:50:12.662 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [me.survivalking.spring_test.SpringTestApplicationTests] 21:50:12.758 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [D:\Spring_Pjt\IntelliJ_WorkSpace\spring_test\target\classes\me\survivalking\spring_test\SpringTestApplication.class] 21:50:12.760 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration me.survivalking.spring_test.SpringTestApplication for test class me.survivalking.spring_test.SpringTestApplicationTests 21:50:12.863 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [me.survivalking.spring_test.SpringTestApplicationTests]: using defaults. 21:50:12.864 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener] 21:50:12.877 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Skipping candidate TestExecutionListener [org.springframework.test.context.transaction.TransactionalTestExecutionListener] due to a missing dependency. Specify custom listener classes or make the default listener classes and their required dependencies available. Offending class: [org/springframework/transaction/interceptor/TransactionAttributeSource] 21:50:12.877 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Skipping candidate TestExecutionListener [org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener] due to a missing dependency. Specify custom listener classes or make the default listener classes and their required dependencies available. Offending class: [org/springframework/transaction/interceptor/TransactionAttribute] 21:50:12.878 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@cb191ca, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@42f48531, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@a776e, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@792bbc74, org.springframework.test.context.support.DirtiesContextTestExecutionListener@79145d5a, org.springframework.test.context.event.EventPublishingTestExecutionListener@1f2f9244, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@4c4d27c8, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@6821ea29, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@338494fa, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@505a9d7c, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@758c83d8, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@129b4fe2] 21:50:12.884 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@e077866 testClass = SpringTestApplicationTests, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@ed3068a testClass = SpringTestApplicationTests, locations = '{}', classes = '{class me.survivalking.spring_test.SpringTestApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true, server.port=0}', contextCustomizers = set[[ImportsContextCustomizer@7c2b6087 key = [org.springframework.boot.test.autoconfigure.web.servlet.MockMvcAutoConfiguration, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcWebClientAutoConfiguration, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcWebDriverAutoConfiguration, org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration, org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcSecurityConfiguration, org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration, org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration, org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration, org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration, org.springframework.boot.test.autoconfigure.web.reactive.WebTestClientAutoConfiguration]], org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@5026735c, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@10f7f7de, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@383e320a, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@488d1cd7, org.springframework.boot.test.web.reactive.server.WebTestClientContextCustomizer@d278d2b, org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@6e005dc9, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@3794467c, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@82ea68c, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@eb21112], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> false]], class annotated with @DirtiesContext [false] with mode [null]. 21:50:12.926 [main] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true, server.port=0} . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.4.0) 2020-12-10 21:50:13.200 INFO 6952 --- [ main] m.s.s.SpringTestApplicationTests : Starting SpringTestApplicationTests using Java 1.8.0_261 on DESKTOP-4OCTHFN with PID 6952 (started by uesr in D:\Spring_Pjt\IntelliJ_WorkSpace\spring_test) 2020-12-10 21:50:13.206 INFO 6952 --- [ main] m.s.s.SpringTestApplicationTests : No active profile set, falling back to default profiles: default 2020-12-10 21:50:14.743 INFO 6952 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 0 (http) 2020-12-10 21:50:14.754 INFO 6952 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2020-12-10 21:50:14.755 INFO 6952 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39] 2020-12-10 21:50:14.864 INFO 6952 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2020-12-10 21:50:14.864 INFO 6952 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1637 ms 2020-12-10 21:50:15.282 INFO 6952 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2020-12-10 21:50:15.666 INFO 6952 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring TestDispatcherServlet '' 2020-12-10 21:50:15.666 INFO 6952 --- [ main] o.s.t.web.servlet.TestDispatcherServlet : Initializing Servlet '' 2020-12-10 21:50:15.667 INFO 6952 --- [ main] o.s.t.web.servlet.TestDispatcherServlet : Completed initialization in 1 ms 2020-12-10 21:50:15.730 INFO 6952 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 13033 (http) with context path '' 2020-12-10 21:50:15.740 INFO 6952 --- [ main] m.s.s.SpringTestApplicationTests : Started SpringTestApplicationTests in 2.811 seconds (JVM running for 4.224) 2020-12-10 21:50:16.576 INFO 6952 --- [o-auto-1-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2020-12-10 21:50:16.577 INFO 6952 --- [o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2020-12-10 21:50:16.577 INFO 6952 --- [o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms 2020-12-10 21:50:16.594 INFO 6952 --- [o-auto-1-exec-1] m.s.spring_test.sample.SampleController : holoman skip java.lang.IllegalStateException: No system captures found. Please check your output capture registration. at org.springframework.util.Assert.state(Assert.java:76) at org.springframework.boot.test.system.OutputCapture.get(OutputCapture.java:129) at org.springframework.boot.test.system.OutputCapture.getAll(OutputCapture.java:100) at org.springframework.boot.test.system.OutputCapture.toString(OutputCapture.java:90) at org.springframework.boot.test.system.OutputCaptureRule.toString(OutputCaptureRule.java:101) at me.survivalking.spring_test.SpringTestApplicationTests.Test4(SpringTestApplicationTests.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688) 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$6(TestMethodTestDescriptor.java:210) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:206) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:65) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at java.util.ArrayList.forEach(ArrayList.java:1259) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at java.util.ArrayList.forEach(ArrayList.java:1259) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) 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:96) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71) 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) 2020-12-10 21:50:18.898 INFO 6952 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' Disconnected from the target VM, address: '127.0.0.1:13028', transport: 'socket' Process finished with exit code -1 어떤부분이 잘못되었거나.. 잘못사용됬을까요.. 궁금합니다.
- 미해결스프링 부트 개념과 활용
Failed to start component, 포트 사용 오류
지난 어느 강의에서 이미 8080포트를 사용 중인 프로세스를 조회하는 명령어로 찾아봤는데 8080포트를 사용하는 프로세스가 없어요; 그래서 차선책으로 properties 파일에서 다른 포트 번호로 지정해서(server.port=8090 등) 구동을 시켜봐도 바꾼 포트번호 또한 사용 중이라는 오류가 뜹니다 어떻게 해결해야할까요 ㅜㅜ *추가 내용 3달 전 어느 수강생 질문을 참고하여 server.ssl.key-alias의 value 값을 'spring' 대신 'tomcat'으로 바꾸었더니 정상적으로 동작이 됩니다.. 원래 keytstore 생성 작업 중 설정했던 별칭 spring으로 작성해야하는 거 아닌가요?
- 해결됨스프링 부트 개념과 활용
spring-boot-autoconfigure에 대해서 자세히 알고 싶습니다.
본 강의에서 프로젝트 모듈 중에 'Xxx-Spring-Boot-Autoconfigure 모듈: 자동 설정, Xxx-Spring-Boot-Starter 모듈: 필요한 의존성 정의' 에 대해 가볍게 넘어가셨는데, 본 강의에서 실습한 프로젝트 중 spring.factories 파일을 설정한 Xxx-Spring-Boot-Starter 프로젝트는 저 둘 중에 어디에 해당하는 건가요?? ~Starter 모듈과 ~Autoconfigure 모듈의 상세한 차이점을 알고 싶습니다!
- 미해결스프링 부트 개념과 활용
@RestController 과 @Controller의 차이가 모가 있을까요..?
강의 초반에 보다가 궁금해서 질문드립니다!
- 미해결스프링 부트 개념과 활용
안녕하세요 !
안녕하세요 백기선님 제 블로그에 출처를 남기고 정리하면서 공부를 하고싶은데 출처남기고 정리를 해도 될까요??
- 미해결스프링 부트 개념과 활용
안녕하세요 강사님!
안녕하세요. 우선 부족한 부분을 채우고 복습하기 위해 강의를 듣고있는데 매 강의마다 정말 많은 것을 얻어갑니다. 감사합니다. 한가지 여쭤보고 싶은 점이 있어서 글을 남기게 되었습니다. https http2설정을 지우고 jar로 실행을 했을 땐 잘 동작하는 것을 확인할 수 있었는데 설정을 했을 땐 에러가 났습니다. keystore때문이지 않을까? 라는 생각을 해봤지만 정확한 이유를 알고싶어 여쭤보게 되었습니다. 혹시 수업에서 다뤄주셨는데 제가 놓쳤다면 죄송합니다;; ㅎㅎ
- 미해결스프링 부트 개념과 활용
mvn install시 오류뜨시는 분들 참조
오류 [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [INFO] 2 errors 해결책 pom.xml에 밑에 내용 추가. <properties> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target></properties>
- 미해결스프링 부트 개념과 활용
커뮤니티 버전에선 mvn명령어가 실행 안되나요?
메이븐 설치도 하고 인텔리제이에서 메이븐 경로도 설정했지만 mvn 명령어를 찾을수 없다고 하더군요. 그래서 우측에있는 명령으로 package를 실행했더니 이제야 됩니다. 이것도 버전 문제인걸까요?
- 미해결스프링 부트 개념과 활용
EntityModel로 작성시
EntityModel에 취소선이 생기는데, 왜이런건지 모르겠어요.
- 미해결스프링 부트 개념과 활용
@WebMvcTest 할때 질문입니다.
WebMvcTestContextBootstrapper.determineResourceBasePath에러를 따라가다 보니까. cannot resolve mehod determineResponse....라고 나오는데...처음부터 다시 만들어도보고...한줄씩 변경해가면서. 하는데 ...어떻게 해결해야할지 모르겠어요.
- 미해결스프링 부트 개념과 활용
spring.profiles.include=proddb ..
application-prod.properties에spring.profiles.include=proddb이 include되지 않아요. 어떤 것을 확인해보면될까요? 구글링해봐도 관련 내용이 없어요. ㅠ
- 미해결스프링 부트 개념과 활용
mvn install 오류가 뜹니다.
이런 오류가 뜹니다, 자바 버전도 고쳐보고 메이븐도 깔아보려고 했지만 실패... 뭐가 문제인걸까요?
- 미해결스프링 부트 개념과 활용
Cannot find template location 문의 드립니다.
강의를 보았을 때 Spring-boot 기본 생성 후 아래와 같이 진행 했는데. view 파일을 찾지를 못하고 있습니다. - Controller 클래스에 @Controller 어노테이션 지정 - 요청을 처리하는 함수에서 view 이름을 String 타입으로 리턴 - resources/templates/ 하위에 view 이름으로 html 생성 view 이름에 오타가 있는지도 찾아보고 properties 파일에 spring.thymeleaf.prefix 설정도 넣어 봤는데 해결을 하지 못했습니다. 선생님의 도움을 부탁드립니다.
- 해결됨스프링 부트 개념과 활용
SPRINGBOOT HTTPS 적용 중 에러
안녕하세요. 강의를 보면서 SSL 적용중 에러가 있어서 문의드립니다. 위와 같이 keystore를 등록 후 위 사진과 같이 properties를 설정하여 https를 적용 시키려고하는데 Failed to start bean 'webServerStartStop' 이라는 에러가 발생하면서 실행이 되지않습니다. 구글링을 해보고 있는데 별다른 해결책이안보여서 혹시 제가 놓친 부분이 있는건지.. 아니면 무언가를 추가해야하는건지 궁금합니다.. 로그상를 봤을때는 password가 incorrect라고 나오는데 keytool -v -list -keystore ..로 확인시 해당 패스워드로 확인이 되었습니다. jdk 1.8을 사용중에 있습니다. --- CONSOLE LOG --- error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-11-18 00:09:31.709 ERROR 17520 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.1.jar:5.3.1] at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.1.jar:5.3.1] at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.1.jar:5.3.1] at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_261] at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.1.jar:5.3.1] at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.1.jar:5.3.1] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:942) ~[spring-context-5.3.1.jar:5.3.1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591) ~[spring-context-5.3.1.jar:5.3.1] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) [spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) [spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) [spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) [spring-boot-2.4.0.jar:2.4.0] at me.survivalking.springstudy1.Springstudy1Application.main(Springstudy1Application.java:12) [classes/:na] Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:229) ~[spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.web.servlet.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:43) ~[spring-boot-2.4.0.jar:2.4.0] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.1.jar:5.3.1] ... 15 common frames omitted Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed at org.apache.catalina.core.StandardService.addConnector(StandardService.java:231) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:282) ~[spring-boot-2.4.0.jar:2.4.0] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:213) ~[spring-boot-2.4.0.jar:2.4.0] ... 17 common frames omitted Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:1067) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227) ~[tomcat-embed-core-9.0.39.jar:9.0.39] ... 19 common frames omitted Caused by: java.lang.IllegalArgumentException: keystore password was incorrect at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:99) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:216) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1141) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1227) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:592) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.catalina.connector.Connector.startInternal(Connector.java:1064) ~[tomcat-embed-core-9.0.39.jar:9.0.39] ... 21 common frames omitted Caused by: java.io.IOException: keystore password was incorrect at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2068) ~[na:1.8.0_261] at java.security.KeyStore.load(KeyStore.java:1445) ~[na:1.8.0_261] at org.apache.tomcat.util.security.KeyStoreUtil.load(KeyStoreUtil.java:67) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:216) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:207) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:282) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246) ~[tomcat-embed-core-9.0.39.jar:9.0.39] at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97) ~[tomcat-embed-core-9.0.39.jar:9.0.39] ... 27 common frames omitted Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. ... 35 common frames omitted
- 해결됨스프링 부트 개념과 활용
NoSQL cluster 질문
안녕하세요. 강의 1:25초에 NoSQL은 클러스터를 만들기 쉽다고 하셨는데 클러스터의 의미가 레플리카 인스턴스를 추가 하기 쉽다는 말씀인가요?? 맞다면 보통 데이터베이스는 데이터를 영속화하는 계층이라 클러스터링이 어려운 컴포넌트로 알고 있습니다. NoSQL 역시 데이터를 저장하는 컴포넌트이기 때문에 클러스터링을 하면 데이터의 정합성이 문제가 생길것 같은데 NoSQL은 왜 클러스터링이 쉬운지 알 수 있을까요?? 답변이 어렵다면 레퍼런스나 키워드만 알려주셔도 좋을 것 같아요.