forked from kidgrow-microservices-platform

zhaoxiaohao
2020-04-20 519a87f05bd981ae4fcb56fb4cbe56cd119e24b0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.kidgrow.order.controller;
 
import com.kidgrow.common.constant.SecurityConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import javax.servlet.http.HttpServletRequest;
 
/**
 * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
 *
 * @Description: <br>
 * @Project: <br>
 * @CreateDate: Created in 2020/4/14 16:21 <br>
 * @Author: <a href="4345453@kidgrow.com">liuke</a>
 */
@Component
public class BaseController {
 
    @Autowired
    private HttpServletRequest request;
 
    private String userID;
 
 
    public String getUserID(){
        userID=request.getHeader(SecurityConstants.USER_ID_HEADER);
        return userID;
    }
}