Previously, some classes that were annotatated with
@ConditionalOnWebApplication assumed that, if the application was a
web application, Spring MVC (spring-webmvc) would be on the classpath.
If it was not, the application would fail to start, typically with an
error relating to WebMvcConfigurerAdapter being unavailable.
This commit updates the affected configuration classes and annotates
them with @ConditionalOnClass(WebMvcConfigurerAdapter.class) to
ensure that their auto-configuration only takes effect if its a web
application and Spring MVC is on the classpath.
Fixes gh-2345
The package names changed a bit from the prototype project, but wuth vanilla
autconfiguration usage that shouldn't matter. Follows closely the Groovy
templates support. Templates live in classpath:/templates/*.html by default.
Fixes gh-2242
Extended RelaxedDataBinder to include a case insensitive version of
SEPARATED_TO_CAMELCASE. This allow properties of the form TEST_THE_VALUE
to to bound to a @ConfigurationProperties class with a prefix of "test"
and a field of `theValue`.
Fixes gh-2304
Update the @SupportedSourceVersion annotation to RELEASE_8 since it
should indicate "the latest source version an annotation processor
supports".
Fixes gh-2302
Sadly, Gradle handle's exclusions differently to Maven even when it's
processing a Maven pom.
In this case groovy-all is pulled in via org.crashub:crash.shell where
we've excluded it. This is enough to prevent Maven from pulling in
groovy-all when you depend on the remote shell starter.
org.crashub:crash.shell is also pulled in as a transitive dependency
of a number of other dependencies and Gradle requires each of these
to also exclude groovy-all for it to actually be excluded.
This commit adds the additional exclusions that are required to make
Gradle's behaviour sane.
Fixes gh-2257
Update JettyEmbeddedServletContainerFactory to use the JarResource
class to create the base resource. This prevents a potential
"java.lang.NullPointerException: no !/ in spec" error which can occur
when using shaded executable jars.
Fixes gh-2245
Add `@WebIntegrationTest` which is similar to `@IntegrationTest` and
`@WebAppConfiguration`. The annotation using Spring's `@BootstrapWith`
annotation rather than `@TestExecutionListeners` which allows it to
work when `@TestExecutionListeners` (even ServletTestExecutionListener)
are declared on the test class.
This annotation is particularly useful for TestNG users that extend
Spring's `AbstractTestNGSpringContextTests` class.
Fixes gh-2299
See gh-1956
See gh-2135
Update ConfigurationMetadataAnnotationProcessor to find the additional
metadata json file using createResource rather than getResource. Prior
to this commit the file could be skipped when multiple files were
contained on the classpath.
Fixes gh-2271
Update InMemoryAuditEventRepository to consider the date when searching
for events. Also switch to a circular buffer implementation and update
the capacity to limit the total number of items rather than limiting
per principal.
Fixes gh-2291
Update EmbeddedWebApplicationContext to store then restore any existing
web scopes that may have been registered. This allows custom web scopes
to be registered in an ApplicationContextInitializer.
Fixes gh-2082
The "Customizing ConfigurableEmbeddedServletContainer directly"
section should use `HttpStatus.NOT_FOUND` and not `HttpStatus.404` in
the sample code.
Fixes gh-2258
Change the LoggingSystem load order so that Log4J2 has a higher priority
than Log4J. Also add system property support to allow a specific system
to be used.
Fixes gh-2274