Merge branch 'master' of https://gitee.com/youlaiorg/youlai-boot
This commit is contained in:
@@ -2,15 +2,12 @@ package com.youlai.boot.core.security.exception;
|
|||||||
|
|
||||||
import com.youlai.boot.common.result.ResultCode;
|
import com.youlai.boot.common.result.ResultCode;
|
||||||
import com.youlai.boot.common.util.ResponseUtils;
|
import com.youlai.boot.common.util.ResponseUtils;
|
||||||
import org.springframework.security.authentication.BadCredentialsException;
|
|
||||||
import org.springframework.security.core.AuthenticationException;
|
|
||||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
||||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import jakarta.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.authentication.BadCredentialsException;
|
||||||
|
import org.springframework.security.core.AuthenticationException;
|
||||||
|
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ public class JwtTokenManager implements TokenManager {
|
|||||||
*
|
*
|
||||||
* @param authentication 认证信息
|
* @param authentication 认证信息
|
||||||
* @param ttl 过期时间
|
* @param ttl 过期时间
|
||||||
* @return
|
* @return JWT Token
|
||||||
*/
|
*/
|
||||||
private String generateToken(Authentication authentication, int ttl) {
|
private String generateToken(Authentication authentication, int ttl) {
|
||||||
|
|
||||||
|
|||||||
@@ -241,13 +241,13 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
|
|||||||
|
|
||||||
MenuTypeEnum menuType = menuForm.getType();
|
MenuTypeEnum menuType = menuForm.getType();
|
||||||
|
|
||||||
if (menuType == MenuTypeEnum.CATALOG) { // 如果是外链
|
if (menuType == MenuTypeEnum.CATALOG) { // 如果是目录
|
||||||
String path = menuForm.getRoutePath();
|
String path = menuForm.getRoutePath();
|
||||||
if (menuForm.getParentId() == 0 && !path.startsWith("/")) {
|
if (menuForm.getParentId() == 0 && !path.startsWith("/")) {
|
||||||
menuForm.setRoutePath("/" + path); // 一级目录需以 / 开头
|
menuForm.setRoutePath("/" + path); // 一级目录需以 / 开头
|
||||||
}
|
}
|
||||||
menuForm.setComponent("Layout");
|
menuForm.setComponent("Layout");
|
||||||
} else if (menuType == MenuTypeEnum.EXTLINK) { // 如果是目录
|
} else if (menuType == MenuTypeEnum.EXTLINK) { // 如果是外链
|
||||||
|
|
||||||
menuForm.setComponent(null);
|
menuForm.setComponent(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user