Skip to content

Commit b77945c

Browse files
Łukasz PolatowskiŁukasz Polatowski
authored andcommitted
Main Page
1 parent c91ff25 commit b77945c

File tree

4 files changed

+160
-8
lines changed

4 files changed

+160
-8
lines changed

.idea/uiDesigner.xml

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.Polodz.WebController;
2+
3+
import org.springframework.stereotype.Controller;
4+
import org.springframework.web.bind.annotation.GetMapping;
5+
import org.springframework.web.servlet.ModelAndView;
6+
7+
/**
8+
* Created by Łukasz on 07.09.2016.
9+
*/
10+
11+
@Controller
12+
public class MainPageController {
13+
14+
@GetMapping("/")
15+
public ModelAndView getMainPage() {
16+
return new ModelAndView("mainPage");
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
package com.Polodz.webController;
1+
package com.Polodz.WebController;
22

33
import com.Polodz.service.WebService;
44
import org.springframework.beans.factory.annotation.Autowired;
55
import org.springframework.stereotype.Controller;
6+
import org.springframework.ui.Model;
67
import org.springframework.web.bind.annotation.GetMapping;
78
import org.springframework.web.servlet.ModelAndView;
89

@@ -11,14 +12,14 @@
1112
*/
1213

1314
@Controller
14-
public class WebMovieListController {
15+
public class MovieListController {
1516

16-
@Autowired
17-
private WebService service;
17+
@Autowired
18+
private WebService service;
1819

19-
@GetMapping("/movieList")
20-
public ModelAndView getMovieList() {
21-
return new ModelAndView("movieList").addObject("string", service.getMovieListString());
22-
}
20+
@GetMapping("/movieList")
21+
public ModelAndView getMovieList() {
22+
return new ModelAndView("movieList").addObject("string", service.getMovieListString());
23+
}
2324

2425
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html xmlns:th="http://www.thymeleaf.org">
3+
<head>
4+
<title>Main Page</title>
5+
</head>
6+
<body>
7+
<a th:href="@{/movieList}">Movie List</a>
8+
</body>
9+
</html>

0 commit comments

Comments
 (0)