Configure Spring MVC resource handler to deliver WebJar static content

This is very simple. We need to add the following mapping to the spring context:

    <mvc:resources mapping="/webjars/**" location="/webjars/"/>

With this configuration, ResourceHttpRequestHandler makes the content from WebJars available as static content.

As discussed in the section on static content, we can specifically cache a period if we want to cache the content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset