Last change
on this file since 2b0a4db was a436340, checked in by Gjoko Kostadinov <gjoko.kostadinov@…>, 17 months ago |
Adding customer registration
|
-
Property mode
set to
100644
|
File size:
636 bytes
|
Line | |
---|
1 | package edu.gjoko.schedlr.controllers;
|
---|
2 |
|
---|
3 | import org.springframework.stereotype.Controller;
|
---|
4 | import org.springframework.ui.Model;
|
---|
5 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
6 | import org.springframework.web.bind.annotation.PostMapping;
|
---|
7 |
|
---|
8 | import java.security.Principal;
|
---|
9 |
|
---|
10 | @Controller
|
---|
11 | public class HomePageController {
|
---|
12 |
|
---|
13 | @GetMapping(name = "/homepage")
|
---|
14 | public String getHomePageTemplate(Model model, Principal principal) {
|
---|
15 | System.out.println(principal);
|
---|
16 | return "homepage";
|
---|
17 | }
|
---|
18 |
|
---|
19 | @PostMapping(name = "/homepage")
|
---|
20 | public String postHomePageTemplate(Model model) {
|
---|
21 | return "homepage";
|
---|
22 | }
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.