class IndexController {

    private final HttpSession httpSession;

    /**
     * 登录页面
     * @return
     */
    @ResponseBody
    @RequestMapping("/login")
    public String login() {
        return "login page.";
    }

    /**
     * 登录请求
     * @param username
     * @return
     */
    @RequestMapping("/login/submit")
    public String loginSubmit(@RequestParam("username") String username) {<FILL_FUNCTION_BODY>}

    /**
     * 首页
     * @return
     */
    @ResponseBody
    @RequestMapping("/index")
    public String index() {
        log.info("session id: {}", httpSession.getId());
        return "index page.";
    }

    /**
     * 退出登录
     * @return
     */
    @RequestMapping("/logout")
    public String logout() {
        httpSession.invalidate();
        return "/login";
    }

}

        if (StringUtils.isNotBlank(username)) {
            httpSession.setAttribute("username", username);
            return "/index";
        }
        return "/login";
    
<no_super_class>