File tree Expand file tree Collapse file tree 6 files changed +70
-1
lines changed
java/guru/springframework Expand file tree Collapse file tree 6 files changed +70
-1
lines changed Original file line number Diff line number Diff line change 4040 <groupId >org.springframework.boot</groupId >
4141 <artifactId >spring-boot-starter-web</artifactId >
4242 </dependency >
43-
43+
44+ <!-- WebJars-->
45+ <dependency >
46+ <groupId >org.webjars</groupId >
47+ <artifactId >bootstrap</artifactId >
48+ <version >3.3.4</version >
49+ </dependency >
50+ <dependency >
51+ <groupId >org.webjars</groupId >
52+ <artifactId >jquery</artifactId >
53+ <version >2.1.4</version >
54+ </dependency >
55+
4456 <dependency >
4557 <groupId >com.h2database</groupId >
4658 <artifactId >h2</artifactId >
Original file line number Diff line number Diff line change 1+ package guru .springframework .configuration ;
2+
3+ import org .springframework .context .annotation .Configuration ;
4+ import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
5+ import org .springframework .security .config .annotation .web .configuration .WebSecurityConfigurerAdapter ;
6+
7+ @ Configuration
8+ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
9+
10+ @ Override
11+ protected void configure (HttpSecurity httpSecurity ) throws Exception {
12+ httpSecurity .authorizeRequests ().antMatchers ("/" ).permitAll ();
13+ }
14+
15+ }
Original file line number Diff line number Diff line change 1+ package guru .springframework .controllers ;
2+
3+ import org .springframework .stereotype .Controller ;
4+ import org .springframework .web .bind .annotation .RequestMapping ;
5+
6+ @ Controller
7+ public class IndexController {
8+ @ RequestMapping ("/" )
9+ String index (){
10+ return "index" ;
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html xmlns:th ="http://www.thymeleaf.org ">
3+ < head lang ="en ">
4+
5+ < title > Spring Framework Guru</ title >
6+ < 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.4/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/guru.css "
16+ th:href ="@{css/guru.css} " rel ="stylesheet " media ="screen "/>
17+ </ head >
18+ < body >
19+ < div class ="container ">
20+ < div class ="jumbotron ">
21+ < img src ="../static/images/FBcover1200x628.png " width ="1000 "
22+ th:src ="@{images/FBcover1200x628.png} "/>
23+ < h1 > Hello</ h1 >
24+
25+ < h2 > Fellow Spring Framework Gurus!!!</ h2 >
26+ </ div >
27+ </ div >
28+
29+ </ body >
30+ </ html >
You can’t perform that action at this time.
0 commit comments