This commit introduces integration between MockMvc and HtmlUnit, thus
simplifying end-to-end testing when using HTML-based views and enabling
developers to do the following.
- Easily test HTML pages using tools such as HtmlUnit, WebDriver, & Geb
without the need to deploy to a Servlet container
- Test JavaScript within pages
- Optionally test using mock services to speed up testing
- Share logic between in-container, end-to-end tests and
out-of-container integration tests
Issue: SPR-13158
Prior to this commit, WebJars users needed to use versioned links within
templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`.
This can be rather cumbersome when updating libraries - all references
in templates need to be updated.
One could use version-less links in templates, but needed to add a
specific MVC Handler that uses webjars.org's webjar-locator library.
While this approach makes maintaing templates easier, this makes HTTP
caching strategies less optimal.
This commit adds a new WebJarsResourceResolver that search for resources
located in WebJar locations. This ResourceResolver is automatically
registered if the "org.webjars:webjars-locator" dependency is present.
Registering WebJars resource handling can be done like this:
```java
@Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:META-INF/resources/webjars")
.resourceChain(true)
.addResolver(new WebJarsResourceResolver());
}
```
Issue: SPR-12323
polish
This commit introduces support for OkHttp
(http://square.github.io/okhttp/) as a backing implementation for
ClientHttpRequestFactory and AsyncClientHttpRequestFactory.
Issue: SPR-12893
Commit 5648fbfc3155ddf4ead7388cfd7bc9e90b86f9d8 introduced a
compile-time dependency on spring-beans-groovy in the spring-context
module which breaks the build on the CI server since the Animal Sniffer
task cannot find a JAR file for spring-beans-groovy.
This commit reverts that change so that the "sniffer" task once again
succeeds.
This commit introduces a messaging.converter.MessageConverter that
marshals to/from XML using the abstractions provided in the OXM module.
Issue: SPR-12726