In Spring Boot, to use WebJars,
add a dependency to a build.gradle file as follows:
compile("org.webjars:jquery:2.1.3")
and use it as follows:
<script th:src="@{/webjars/jquery/2.1.3/jquery.min.js}"></script>
Reference:
http://spring.io/blog/2014/01/03/utilizing-webjars-in-spring-boot
No comments:
Post a Comment