19-09-03 10:37:24 org.springframework.test.context.web.WebTestContextBootstrapper =====>>> Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [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]
19-09-03 10:37:24 org.springframework.test.context.web.WebTestContextBootstrapper =====>>> Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@402f32ff, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@573f2bb1, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@5ae9a829, org.springframework.test.context.support.DirtiesContextTestExecutionListener@6d8a00e3]
19-09-03 10:37:24 org.springframework.beans.factory.xml.XmlBeanDefinitionReader =====>>> Loading XML bean definitions from class path resource [config/application.xml]
19-09-03 10:37:25 org.springframework.web.context.support.GenericWebApplicationContext =====>>> Refreshing org.springframework.web.context.support.GenericWebApplicationContext@77cd7a0: startup date [Tue Sep 03 10:37:25 CST 2019]; root of context hierarchy
19-09-03 10:37:25 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping =====>>> Mapped "{[/test],methods=[POST],consumes=[application/xml]}" onto public ocn.site.springmvc.domain.User ocn.site.springmvc.controller.Manicontroller.handler(ocn.site.springmvc.domain.User) throws java.lang.CloneNotSupportedException,javax.xml.bind.JAXBException
19-09-03 10:37:25 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter =====>>> Looking for @ControllerAdvice: org.springframework.web.context.support.GenericWebApplicationContext@77cd7a0: startup date [Tue Sep 03 10:37:25 CST 2019]; root of context hierarchy
19-09-03 10:37:25 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter =====>>> Looking for @ControllerAdvice: org.springframework.web.context.support.GenericWebApplicationContext@77cd7a0: startup date [Tue Sep 03 10:37:25 CST 2019]; root of context hierarchy
19-09-03 10:37:25 org.springframework.mock.web.MockServletContext =====>>> Initializing Spring FrameworkServlet ''
19-09-03 10:37:25 org.springframework.test.web.servlet.TestDispatcherServlet =====>>> FrameworkServlet '': initialization started
19-09-03 10:37:25 org.springframework.test.web.servlet.TestDispatcherServlet =====>>> FrameworkServlet '': initialization completed in 19 ms
19-09-03 10:37:25 ocn.site.springmvc.controller.Runtest =====>>> <?xml version="1.0" encoding="UTF-8"?>
<book>
<id>33</id>
<name>hack</name>
</book>
19-09-03 10:37:26 ocn.site.springmvc.controller.Manicontroller =====>>> User [id=33, name=hack]
19-09-03 10:37:26 org.springframework.web.context.support.GenericWebApplicationContext =====>>> Closing org.springframework.web.context.support.GenericWebApplicationContext@77cd7a0: startup date [Tue Sep 03 10:37:25 CST 2019]; root of context hierarchy
// @EnableWebMvc doc reference
If WebMvcConfigurer does not expose some advanced setting that needs to be configured,
consider removing the @EnableWebMvc annotation and extending directly from WebMvcConfigurationSupport or DelegatingWebMvcConfiguration, e.g.:// org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.jaxb2Presentprivatestaticfinalboolean jaxb2Present =
ClassUtils.isPresent("javax.xml.bind.Binder",
WebMvcConfigurationSupport.class.getClassLoader());// org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.jackson2XmlPresentprivatestaticfinalboolean jackson2XmlPresent =
ClassUtils.isPresent("com.fasterxml.jackson.dataformat.xml.XmlMapper",
WebMvcConfigurationSupport.class.getClassLoader());// org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.addDefaultHttpMessageConverters(List<HttpMessageConverter<?>>)if(jackson2XmlPresent){
messageConverters.add(newMappingJackson2XmlHttpMessageConverter(
Jackson2ObjectMapperBuilder.xml().applicationContext(this.applicationContext).build()));}elseif(jaxb2Present){
messageConverters.add(newJaxb2RootElementHttpMessageConverter());}