Mention WebJarsResourceResolver in ref doc

Issue: SPR-12323
master
Brian Clozel 9 years ago
parent 89cc8e0401
commit e72b821a73
  1. 7
      src/asciidoc/web-mvc.adoc

@ -5026,7 +5026,12 @@ the response `encodeURL` method. Alternatively, an application can also inject a
use directly the `ResourceUrlProvider` bean, which is automatically declared with the MVC use directly the `ResourceUrlProvider` bean, which is automatically declared with the MVC
Java config and the MVC namespace. Java config and the MVC namespace.
Webjars are also supported with `WebJarsResourceResolver`, which is automatically registered
when the ``"org.webjars:webjars-locator"` library is on classpath. This resolver allows
the resource chain to resolve version agnostic libraries from HTTP GET requests
`"GET /jquery/jquery.min.js" will return resource "/jquery/1.2.0/jquery.min.js"`.
It also works by rewriting resource URLs in templates
`<script src="/jquery/jquery.min.js"/> -> <script src="/jquery/1.2.0/jquery.min.js"/>`.
[[mvc-default-servlet-handler]] [[mvc-default-servlet-handler]]

Loading…
Cancel
Save