public static class WebJarsDialect.WebJars extends Object
WebJarsDialect.WebJars
Thymeleaf dialect expression object implementation.Constructor and Description |
---|
WebJars() |
Modifier and Type | Method and Description |
---|---|
Collection<String> |
assets(boolean useCdn,
String scheme,
String... patterns)
Method to return WebJar resources matching
AntPathMatcher
patterns. |
Collection<String> |
assets(String... patterns)
Method to return WebJar resources matching
AntPathMatcher
patterns. |
String |
cdn(String scheme,
String path)
Method to convert a WebJar resource (partial) path to its
corresponding CDN (URI) path.
|
Map<String,String> |
getJars()
|
public WebJars()
public Collection<String> assets(String... patterns)
AntPathMatcher
patterns.patterns
- The AntPathMatcher
patterns to
match.public Collection<String> assets(boolean useCdn, String scheme, String... patterns)
AntPathMatcher
patterns.useCdn
- true
to provide a CDN
URI
; false
for a local
path.scheme
- The URI
scheme.patterns
- The AntPathMatcher
patterns to
match.public String cdn(String scheme, String path)
@{${#webjars.cdn(#request.scheme, path)}}
.scheme
- The URI
scheme.path
- The (possibly partial) path.path
otherwise.public Map<String,String> getJars()
WebJarAssetLocator.getWebJars()
call.Copyright © 2015–2021. All rights reserved.