don't dream your life, live your dreams !
Please read : Java spring – quickstart
If you use maven, add this to your pom.xml :
<dependency> <groupId>org.webjars</groupId> <artifactId>webjars-taglib</artifactId> <version>0.3</version> </dependency> <dependency> <groupId>org.webjars</groupId> <artifactId>jquery</artifactId> <version>3.1.1</version> </dependency> |
In WebMvcConfig.java, add the ressouce :
@Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/webjars/**").addResourceLocations("/webjars/"); } |
Import the following taglib:
<%@ taglib uri="http://www.webjars.org/tags" prefix="wj"%>
Then locate the file in the webjar :
<script src="<wj:locate path="jquery.min.js" />"></script> |
Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.
admin