Package org.springframework.test.web.servlet.setup

# Class MockMvcConfigurerAdapter

java.lang.Object
org.springframework.test.web.servlet.setup.MockMvcConfigurerAdapter

All Implemented Interfaces:
  `MockMvcConfigurer`

public abstract class MockMvcConfigurerAdapter extends Object implements MockMvcConfigurer
An empty method implementation of `MockMvcConfigurer`.

Since:
  4.1
Author:
  Rossen Stoyanchev

## Constructor Summary

Constructors
Constructor
Description
`MockMvcConfigurerAdapter()`

## Method Summary

Modifier and Type
Method
Description
`void`
`afterConfigurerAdded(ConfigurableMockMvcBuilder<?> builder)`
Invoked immediately when this `MockMvcConfigurer` is added via `ConfigurableMockMvcBuilder.apply(org.springframework.test.web.servlet.setup.MockMvcConfigurer)`.
`RequestPostProcessor`
`beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, org.springframework.web.context.WebApplicationContext cxt)`
Invoked when the MockMvc instance is about to be created with the MockMvc builder and the Spring WebApplicationContext that will be passed to the `DispatcherServlet`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockMvcConfigurerAdapter

public MockMvcConfigurerAdapter()

## Method Details

### afterConfigurerAdded

public void afterConfigurerAdded(ConfigurableMockMvcBuilder<?> builder)
Description copied from interface: `MockMvcConfigurer`
Invoked immediately when this `MockMvcConfigurer` is added via `ConfigurableMockMvcBuilder.apply(org.springframework.test.web.servlet.setup.MockMvcConfigurer)`.

Specified by:
  `afterConfigurerAdded` in interface `MockMvcConfigurer`
Parameters:
  `builder` - the builder for the MockMvc

### beforeMockMvcCreated

@Nullable public RequestPostProcessor beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, org.springframework.web.context.WebApplicationContext cxt)
Description copied from interface: `MockMvcConfigurer`
Invoked when the MockMvc instance is about to be created with the MockMvc builder and the Spring WebApplicationContext that will be passed to the `DispatcherServlet`.

Specified by:
  `beforeMockMvcCreated` in interface `MockMvcConfigurer`
Parameters:
  `builder` - the builder for the MockMvc
  `cxt` - the Spring configuration
Returns:
  a post processor to be applied to every request performed through the `MockMvc` instance.