java - webjars -> HTTP 406 -
i creating basic little web application using spring boot, thymeleaf , webjars.
what want: include jquery , bootstrap using webjars
what did: included dependencies pom.xml
<dependency> <groupid>org.webjars</groupid> <artifactid>bootstrap</artifactid> <version>3.2.0</version> </dependency> <dependency> <groupid>org.webjars</groupid> <artifactid>jquery</artifactid> <version>2.1.1</version> </dependency>
i added jquery template index.html:
<script src="/webjars/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
problem: although thymeleaf jars in /lib directory , looks right me, not work. html file shown in browser shows script line, trying fetch jquery library straight (click on source in chrome browser) ends http 406 error, while path shown http://localhost:8080/webjars/jquery/2.1.1/jquery.min.js
:
whitelabel error page application has no explicit mapping /error, seeing fallback. fri oct 17 09:34:32 cest 2014 there unexpected error (type=not acceptable, status=406). not find acceptable representation
how configure webmvc?
here can find introduction how utilize webjars spring webmvc.
java spring-boot thymeleaf webjars
No comments:
Post a Comment