Reputation: 65
I've written simpliest page using bootstrap. Now i want to run in using spring and gradle. I have added dependency
compile group: 'org.webjars', name: 'bootstrap', version: '3.2.0'
into my build.gradle file. The only think i can't solve is what should i put in simplePage.html to force thymeleaf to resolve it. I wonder how to add
<link href="../../../../../../../Documents/js/first/css/bootstrap.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../../../Documents/js/first/js/bootstrap.min.js"></script>
using external libraries added with Gradle. These imports above i used to make bootstrap project locally.
Upvotes: 0
Views: 2149
Reputation: 4558
From Webjars documentation for Sping Boot :
Instructions for Spring Boot
[...]
Then reference a WebJar asset like:
<link rel='stylesheet' href='/webjars/bootstrap/3.1.0/css/bootstrap.min.css'>
Upvotes: 1