ErrorMvcAutoConfiguration creates a BeanNameViewResolver bean in case
the user has used @EnabledWebMvc and disabled WebMvcAutoConfiguration.
If the user hasn’t used @EnabledWebMvc, WebMvcAutoConfiguration will
creates its BeanNameViewResolver and override the one that’s already
been defined by ErrorMvcAutoConfiguration.
This commit makes WebMvcAutoConfiguration’s BeanNameViewResolver
definition conditional on there being no existing BeanNameViewResolver
bean definition.
Closes gh-5354
Previously, tests annotated with @WebMvcTest would use Spring
Framework’s WebDelegatingSmartContextLoader. This meant that
SpringApplication was not used to create the application context. One
effect of this was that Spring Boot’s logging system was not initialized
and large quantities of debug log output was produced due to Logback’s
default behaviour.
This commit updates WebMvcTestContextBootstrapper so that it uses
SpringBootContextLoader. This aligns the behaviour of @WebMvcTest
with the behaviour of @SpringBootTest and @DataJpaTest.
Closes gh-5847
to stop it from being included in the enclosing @Configuration.
That way, if the app is not a web app, then there really is a
client_credentials OAuth2 resource (as claimed in the user guide).
Fixes gh-5735
A recent Spring Framework change in `CharacterEncodingFilter` allows to
configure the force flag separately for requests and responses. This
commit enables the flag only for requests which should provide a better
default with binary content.
Closes gh-5459
Previously, the auto-configured
`OAuth2ClientAuthenticationProcessingFilter` instance had no
`ApplicationEventPublisher`. As a result, no event was fired. This commit
makes sure to associate the event publisher instance.
Closes gh-5853
Add @AutoConfigureCache annotation to configure the specific cache
manager to use with a test. By default the NoOpCacheManager is used.
The @JsonTest, @DataJpaTest and @WebMvcTests have also been updated to
use the annotation.
Fixes gh-5765
Add additional @ConditionalOnMissingBean guards to session
configurations to ensure that the first wins. Also reorder imports
to prefer Redis over JDBC.
See gh-5158