19-09-02 19:20:16 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-02 19:20:16 org.springframework.test.context.web.WebTestContextBootstrapper =====>>> Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@51081592, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@7f9a81e8, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@9629756, org.springframework.test.context.support.DirtiesContextTestExecutionListener@62ee68d8]
19-09-02 19:20:16 org.springframework.beans.factory.xml.XmlBeanDefinitionReader =====>>> Loading XML bean definitions from class path resource [config/application.xml]
19-09-02 19:20:17 org.springframework.web.context.support.GenericWebApplicationContext =====>>> Refreshing org.springframework.web.context.support.GenericWebApplicationContext@2f686d1f: startup date [Mon Sep 02 19:20:17 CST 2019]; root of context hierarchy
19-09-02 19:20:18 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping =====>>> Mapped "{[/test],methods=[POST],consumes=[application/json;charset=UTF-8]}" onto public ocn.site.springmvc.domain.User ocn.site.springmvc.controller.Manicontroller.handler(ocn.site.springmvc.domain.User) throws java.lang.CloneNotSupportedException
19-09-02 19:20:18 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter =====>>> Looking for @ControllerAdvice: org.springframework.web.context.support.GenericWebApplicationContext@2f686d1f: startup date [Mon Sep 02 19:20:17 CST 2019]; root of context hierarchy
19-09-02 19:20:18 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter =====>>> Looking for @ControllerAdvice: org.springframework.web.context.support.GenericWebApplicationContext@2f686d1f: startup date [Mon Sep 02 19:20:17 CST 2019]; root of context hierarchy
19-09-02 19:20:18 org.springframework.mock.web.MockServletContext =====>>> Initializing Spring FrameworkServlet ''
19-09-02 19:20:18 org.springframework.test.web.servlet.TestDispatcherServlet =====>>> FrameworkServlet '': initialization started
19-09-02 19:20:18 org.springframework.test.web.servlet.TestDispatcherServlet =====>>> FrameworkServlet '': initialization completed in 33 ms
19-09-02 19:20:18 ocn.site.springmvc.controller.Manicontroller =====>>> User [id=34, name=hack]
19-09-02 19:20:18 ocn.site.springmvc.controller.Runtest =====>>> User [id=34, name=rose]
19-09-02 19:20:19 org.springframework.web.context.support.GenericWebApplicationContext =====>>> Closing org.springframework.web.context.support.GenericWebApplicationContext@2f686d1f: startup date [Mon Sep 02 19:20:17 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.jackson2Presentprivatestaticfinalboolean jackson2Present =
ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper",
WebMvcConfigurationSupport.class.getClassLoader())&&
ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator",
WebMvcConfigurationSupport.class.getClassLoader());// org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.addDefaultHttpMessageConverters(List<HttpMessageConverter<?>>)if(jackson2Present){
messageConverters.add(newMappingJackson2HttpMessageConverter(
Jackson2ObjectMapperBuilder.json().applicationContext(this.applicationContext).build()));}