package com.tofly.auth.controller;


import com.tofly.common.log.service.BaseLogService;
import com.tofly.common.oauth.util.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;

/**
 * @author Administrator
 * @date 2019/9/18  16:48
 */
@RestController
public class MytestController {

    @Autowired
    private BaseLogService baseLogService;

    @RequestMapping("/test")
    public User test(){
        return SecurityUtils.getUser();
    }

    @RequestMapping("/test2")
    public String test2(){
        return "111111111111";
    }

    @PostConstruct
    public void tt(){
        System.out.println("baseLogService:------------------->"+baseLogService);
    }
}
