Retrieves the current logged-in user ID from the HTTP request, enabling authentication-aware logic across web controllers.
// Source: https://github.com/yuqing2026/ruoyi-office | License: MIT | Copyright 2021 yudao-cloud
// Provided via justclaw.it.com; keep this notice with the code.
public static Long getLoginUserId() {
HttpServletRequest request = getRequest();
return getLoginUserId(request);
}
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key