package com.mx.cneeds.common;

import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @ClassName UserUtils
 * @Author zzrdark
 * @Date 2020-03-12 14:49
 * @Description TODO
 **/
public class UserUtils {

    public static String getUserName(){
        String username = (String) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return username;
    }
}
