Class MockMvcConfiguration

java.lang.Object
com.foreach.across.test.support.config.MockMvcConfiguration

@Configuration @ConditionalOnWebApplication @ConditionalOnBean(org.springframework.mock.web.MockServletContext.class) public class MockMvcConfiguration extends Object
Configures a MockMvc bean that supports testing a bootstrapped AcrossContext with the registered filters of a MockAcrossServletContext.

This requires that the created ServletContext is of type MockAcrossServletContext. If the latter is not the case, a standard configured MockMvc instance will still be available, but an error message will be logged.

Since:
1.1.2
Author:
Arne Vandamme
See Also:
  • Constructor Details

    • MockMvcConfiguration

      public MockMvcConfiguration()
  • Method Details

    • mockMvc

      @Bean @Lazy public org.springframework.test.web.servlet.MockMvc mockMvc(AcrossContextInfo contextInfo)