src/main/java/com/mty/cc/controller/LoginController.java

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.mty.cc.controller;


import com.mty.cc.po.Admin;
import com.mty.cc.po.User;
import com.mty.cc.service.AdminService;
import com.mty.cc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/*
 * @description: 登录控制层
 * @author: mty
 * @time: 2020/01/18 23:07
 */   
@Controller
@RequestMapping(value = "/index")
public class LoginController {


    @Autowired(required=false)
    private UserService userService;

    @Autowired(required=false)
    private AdminService adminService;

    /*
     * @description:跳转到欢迎页面
     * @author: mty
     */
    @RequestMapping("/welcome")
    public ModelAndView welcome(HttpServletRequest reuqest,  Model model) throws Exception{
        ModelAndView mv = new ModelAndView();
        mv.setViewName("welcome");
        return mv;
    }

    /*
     * @description:用户登录
     * @author: mty
     */
    @RequestMapping("/login")
    public ModelAndView login(HttpServletRequest reuqest, Model model) throws Exception{
        ModelAndView mv = new ModelAndView();
        mv.setViewName("common/index");
        return mv;
    }

后面还有 261 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。