Skip to content

Commit 8cb8edc

Browse files
committed
proper sample
1 parent 8ab28ce commit 8cb8edc

File tree

4 files changed

+54
-6
lines changed

4 files changed

+54
-6
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
</dependency>
3232
<dependency>
3333
<groupId>org.webjars</groupId>
34-
<artifactId>swagger-ui</artifactId>
35-
<version>3.6.1</version>
34+
<artifactId>bootstrap</artifactId>
35+
<version>2.1.1</version>
3636
</dependency>
3737
<dependency>
3838
<groupId>org.webjars</groupId>
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55

66
@SpringBootApplication
7-
public class SampleSpringBootApplication {
7+
public class WebApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(WebApplication.class, args);
11+
}
812

9-
public static void main(String[] args) {
10-
SpringApplication.run(SampleSpringBootApplication.class, args);
11-
}
1213
}

src/main/resources/application.properties

Whitespace-only changes.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Play2 WebJars Demo</title>
5+
<link rel='stylesheet' media='screen' href='/webjars/bootstrap/css/bootstrap.min.css'>
6+
<script type='text/javascript' src='/webjars/jquery/jquery.min.js'></script>
7+
<script type='text/javascript' src='/webjars/bootstrap/js/bootstrap.min.js'></script>
8+
<style type="text/css">
9+
body {
10+
margin-top: 50px;
11+
}
12+
</style>
13+
<script type="text/javascript">
14+
$(function() {
15+
$("#showModalButton").bind('click', function(event) {
16+
$('#myModal').modal()
17+
})
18+
})
19+
</script>
20+
</head>
21+
<body>
22+
<div class="navbar navbar-fixed-top">
23+
<div class="navbar-inner">
24+
<div class="container-fluid">
25+
<a id="titleLink" class="brand" href="/">hello, bootstrap</a>
26+
</div>
27+
</div>
28+
</div>
29+
30+
<div class="container">
31+
<button id="showModalButton" class="btn btn-primary btn-large"><i class="icon-exclamation-sign icon-white"></i> Show a Modal</button>
32+
</div>
33+
34+
<div id="myModal" class="modal hide fade">
35+
<div class="modal-header">
36+
<button class="close" data-dismiss="modal">&times;</button>
37+
<h3>This is a Modal</h3>
38+
</div>
39+
<div class="modal-body">
40+
<p>Bootstrap depends on jQuery. So when you specify Bootstrap as a dependency you get jQuery too.</p>
41+
</div>
42+
<div class="modal-footer">
43+
<a href="#" class="btn" data-dismiss="modal">Close</a>
44+
</div>
45+
</div>
46+
</body>
47+
</html>

0 commit comments

Comments
 (0)