@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface WebJarResource
ClientConnector
class, web resources referenced to this class
will be served by the specified URLs from WebJars declared as compile dependencies.
Example of a WebJar URL: "jquery/1.12.4/jquery.min.js"
To override a web resource, that was previously referenced by this annotation, put new files in the following path:
VAADIN/webjars/resourceName/version/resourceFile
.
Example: VAADIN/webjars/jquery/1.12.4/jquery.min.js
One more opportunity is the managing a version of a web resource by a web-app property. To declare that version should be resolved from the web-app.properties use a URL like this:
jquery/${webjar.jquery.customVersion}/jquery.min.js
Also if you want to set the default version of a resource, you can use Elvis operator '?:'. So the combination of a web-app property and the default version will be:
jquery/${webjar.jquery.customVersion?:1.12.4}/jquery.min.js
Modifier and Type | Required Element and Description |
---|---|
java.lang.String[] |
value
Web resources to load before initializing the client-side connector.
|