package com.aperture_software.glados_wiki.webmvc.controllers; import com.aperture_software.glados_wiki.support.SecurityUtils2; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; /** * Created with IntelliJ IDEA. * User: jhyun * Date: 13. Nov. 15 * Time: 17:06 */ @RequestMapping(value = "/foobar") @Controller public class FoobarController { private static Logger LOG = LoggerFactory.getLogger(FoobarController.class); @RequestMapping(value = "/index") public ModelAndView index(ModelMap m) { return new ModelAndView("foobar/index", m); } @ResponseBody @RequestMapping(value = "/auths", produces = MediaType.TEXT_PLAIN_VALUE) public String auths() { LOG.debug("USERNAME = " + SecurityUtils2.getUsername()); // return "DONE"; } }