Skip to content

Commit ab33273

Browse files
Added Web Jars
1 parent d806ca9 commit ab33273

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@
3232
<groupId>org.springframework.boot</groupId>
3333
<artifactId>spring-boot-starter-web</artifactId>
3434
</dependency>
35+
36+
<!--WebJars-->
37+
<dependency>
38+
<groupId>org.webjars</groupId>
39+
<artifactId>bootstrap</artifactId>
40+
<version>3.3.5</version>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.webjars</groupId>
44+
<artifactId>jquery</artifactId>
45+
<version>2.1.4</version>
46+
</dependency>
3547

3648
<dependency>
3749
<groupId>org.springframework.boot</groupId>

src/main/resources/static/css/spring-core.css

Whitespace-only changes.

src/main/resources/templates/index.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,24 @@
44

55
<title>Spring Core Online Tutorial</title>
66
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
7+
8+
<link href="http://cdn.jsdelivr.net/webjars/bootstrap/3.3.4/css/bootstrap.min.css"
9+
th:href="@{/webjars/bootstrap/3.3.5/css/bootstrap.min.css}"
10+
rel="stylesheet" media="screen" />
11+
12+
<script src="http://cdn.jsdelivr.net/webjars/jquery/2.1.4/jquery.min.js"
13+
th:src="@{/webjars/jquery/2.1.4/jquery.min.js}"></script>
14+
15+
<link href="../static/css/spring-core.css"
16+
th:href="@{css/spring-core.css}" rel="stylesheet" media="screen"/>
717
</head>
818
<body>
9-
<h1>Hello World</h1>
19+
<div class="container">
20+
<h1>Hello World</h1>
21+
22+
<h2>This is my Thymeleaf index page. This is my changed.</h2>
23+
24+
</div>
1025

11-
<h2>This is my Thymeleaf index page. This is my changed.</h2>
1226
</body>
1327
</html>

0 commit comments

Comments
 (0)