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"; } }