package com.YuyeTech.HeartRate.game.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author:slambb
 * @date:2020/9/10
 */
@Controller
@RequestMapping("/backstage_log")
@Slf4j
public class BackstageLogController {

    /***
     * 日志页面
     * @param map
     * @return
     */
    @GetMapping("/client")
    public ModelAndView clientLog(
            HttpServletRequest request,
            Map<String, Object> map) {

        String url = "http://" + request.getServerName() //服务器地址
                + ":"
                + request.getServerPort()           //端口号
                + request.getRequestURI();
        log.info("adminLogin url={}", url);

        return new ModelAndView("log/client", map);
    }

}
