<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>4.5.0</version>
</dependency>
String cssPath = WebJarAssetLocator.getFullPath("bootstrap/4.5.0/css/bootstrap.min.css");
properties
webjars.locator.directory=static/webjars/
properties
mylibrary.priority=100
import org.webjars.WebJarAssetLocator;
public class WebJarsLocatorExample {
public static void main(String[] args) {
WebJarAssetLocator locator = new WebJarAssetLocator();
String cssPath = locator.getFullPath("bootstrap/4.5.0/css/bootstrap.min.css");
String jsPath = locator.getFullPath("jquery/3.5.1/jquery.min.js");
}
}