See #11399 for background. The codebase has moved on quite bit since that issue was raised so we might be able to consider it.

Comment From: philwebb

We think it's worth investigating this a little more, but it might be prudent to do so alongside #20290 since we expect some of the actuator core to change.

In the meantime, the following code should work for testing Spring MVC apps:

@ImportAutoConfiguration({EndpointAutoConfiguration.class, WebEndpointAutoConfiguration.class, 
    BeansEndpointAutoConfiguration.class, ManagementContextAutoConfiguration.class})