inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

스프링 웹 MVC

WebMvcConfigurer 1부 Formatter

질문입니다.

57

Sujin Huh

작성한 질문수 10

0

삭제된 글입니다

java spring MVC

답변 1

0

Sujin Huh

interfaces.

2019-12-14 21:18:12.650  INFO 18076 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-12-14 21:18:13.699  INFO 18076 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...

2019-12-14 21:18:14.828  INFO 18076 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.

2019-12-14 21:18:15.410  INFO 18076 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]

2019-12-14 21:18:16.071  INFO 18076 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.4.9.Final}

2019-12-14 21:18:17.067  INFO 18076 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}

2019-12-14 21:18:19.091  INFO 18076 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

2019-12-14 21:18:21.888  INFO 18076 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]

2019-12-14 21:18:21.910  INFO 18076 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'

2019-12-14 21:18:23.158  WARN 18076 --- [           main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

2019-12-14 21:18:26.218  INFO 18076 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'

2019-12-14 21:18:28.148  INFO 18076 --- [           main] o.s.b.t.m.w.SpringBootMockServletContext : Initializing Spring TestDispatcherServlet ''

2019-12-14 21:18:28.148  INFO 18076 --- [           main] o.s.t.web.servlet.TestDispatcherServlet  : Initializing Servlet ''

2019-12-14 21:18:28.196  INFO 18076 --- [           main] o.s.t.web.servlet.TestDispatcherServlet  : Completed initialization in 48 ms

2019-12-14 21:18:28.263  INFO 18076 --- [           main] m.w.demobootweb.SampleControllerTest     : Started SampleControllerTest in 25.474 seconds (JVM running for 34.479)

2019-12-14 21:18:29.421  WARN 18076 --- [           main] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.bind.MissingServletRequestParameterException: Required Person parameter 'id' is not present]

MockHttpServletRequest:

      HTTP Method = GET

      Request URI = /hello

       Parameters = {id =[1]}

          Headers = []

             Body = null

    Session Attrs = {}

Handler:

             Type = me.whiteship.demobootweb.SampleController

           Method = me.whiteship.demobootweb.SampleController#hello(Person)

Async:

    Async started = false

     Async result = null

Resolved Exception:

             Type = org.springframework.web.bind.MissingServletRequestParameterException

ModelAndView:

        View name = null

             View = null

            Model = null

FlashMap:

       Attributes = null

MockHttpServletResponse:

           Status = 400

    Error message = Required Person parameter 'id' is not present

          Headers = []

     Content type = null

             Body = 

    Forwarded URL = null

   Redirected URL = null

          Cookies = []

MockHttpServletRequest:

      HTTP Method = GET

      Request URI = /hello

       Parameters = {id =[1]}

          Headers = []

             Body = null

    Session Attrs = {}

Handler:

             Type = me.whiteship.demobootweb.SampleController

           Method = me.whiteship.demobootweb.SampleController#hello(Person)

Async:

    Async started = false

     Async result = null

Resolved Exception:

             Type = org.springframework.web.bind.MissingServletRequestParameterException

ModelAndView:

        View name = null

             View = null

            Model = null

FlashMap:

       Attributes = null

MockHttpServletResponse:

           Status = 400

    Error message = Required Person parameter 'id' is not present

          Headers = []

     Content type = null

             Body = 

    Forwarded URL = null

   Redirected URL = null

          Cookies = []

java.lang.AssertionError: Response content 

Expected :Hi 

Actual   :

 <Click to see difference>

at org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:59)

at org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:122)

at org.springframework.test.web.servlet.result.ContentResultMatchers.lambda$string$4(ContentResultMatchers.java:136)

at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:196)

at me.whiteship.demobootweb.SampleControllerTest.hello(SampleControllerTest.java:37)

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:68)

at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)

at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)

at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

2019-12-14 21:18:29.556  INFO 18076 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

2019-12-14 21:18:29.561  INFO 18076 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'

2019-12-14 21:18:29.564  INFO 18076 --- [extShutdownHook] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'

2019-12-14 21:18:29.591  INFO 18076 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...

2019-12-14 21:18:29.625  INFO 18076 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

Process finished with exit code -1

    

에러부분 입니다.

이부분만 주석 처리하고 코드를 실행시키면 정싱 작동을 합니다.

//.andExpect(content().string("Hi"));

7:58 예제 코드 찾는 법

0

256

2

PATCH의 Idempotent에 대한 질문

0

257

1

2:51초 질문입니다.

0

324

1

만약 어플리케이션컨텍스트에 필터를 설정하지 않으면 어떻게되나요?

0

361

0

web.xml에 위치한 애플리케이션 web.xml 내에서 파싱 오류 발생

0

515

0

Spring Boot 2.6 이상 버전에서의 DispatcherServlet

0

366

1

Event`Xxx`Controller 분리할때의 기준에 관한 질문입니다.

0

634

1

11분 57초 쯤, `returnValueHandlers` 들의 네이밍컨벤션 관련 질문입니다.

0

379

1

@EnableWebmvc 설정을 하면

0

415

1

springframework와의 차이점

0

283

1

@RequestBody의 바인딩에러를 잡는 방법

1

1655

2

안녕하세요 기선님 강의를 보다 서블릿에 궁금증이 생겨 질문 드립니다

1

237

1

HelloService의 값을 전달을 못 받습니다.

0

296

1

ServletContext와 WebApplicationContext의 관계 질문

1

740

1

하나의 서비스에, 두개의 리포지토리도 연결이 되나요?

0

365

1

view name 리턴에 대해

0

290

2

Formatter print 질문 드립니다.

0

232

1

에리 메시지가 한글입니다.

0

294

1

java 클래스파일로 설정되어 있던 것을 web.xml로 바꾸는 경우

0

338

1

@RequestParam

0

255

1

@Retention 질문

0

229

1

Event.builder() 관련 mac에서 lombok 문제 있으신 분들

0

198

1

스프링 부트 사용시 WebMvcConfigurerSupport 클래스

0

253

1

http://localhost:8080/hello 입력시 오류

0

492

4