Created
December 10, 2012 03:40
-
-
Save krams915/4248253 to your computer and use it in GitHub Desktop.
Spring Social MediatorController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.krams.controller; | |
| import org.springframework.security.core.context.SecurityContextHolder; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.ui.ModelMap; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| @Controller | |
| @RequestMapping("/") | |
| public class MediatorController { | |
| @RequestMapping | |
| public String getHomePage(ModelMap model) { | |
| model.addAttribute("authname", SecurityContextHolder.getContext().getAuthentication().getName()); | |
| return "welcome"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment