aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java
blob: 2973bf30faa4c00f3034fd94399d04d4fdc4e281 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.juick.www.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by aalexeev on 11/21/16.
 */
@Controller
public class IndexController {

    @RequestMapping("/")
    public String index(
            java.security.Principal userPrincipal,
            @RequestParam(required = false, defaultValue = "0") int before,
            Model model) {

        model.addAttribute("currentUser", userPrincipal);

        return "index";
    }
}