package me.chyxion.tigon.shiro.test.controller;

import java.util.Map;
import java.util.HashMap;
import org.springframework.stereotype.Controller;
import org.apache.shiro.authz.annotation.RequiresUser;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Shaun Chyxion <br>
 * chyxion@163.com <br>
 * Mar 08, 2017 22:10:53
 */
@Controller
public class SiteController {

    @RequestMapping("/")
    public void index() {

    }

    @RequiresUser
    @RequestMapping("/raw")
    public Map<String, Object> raw() {
        Map<String, Object> mapRaw = new HashMap<String, Object>();
        mapRaw.put("data", "Hello!");
        return mapRaw;
    }

    @RequestMapping("/int")
    public int integer() {
        return 99;
    }
}
