Configure the dlq message interface path in the authInterceptor (#65)

Co-authored-by: zhangjidi2016 <zhangjidi@cmss.chinamobile.com>
This commit is contained in:
zhangjidi2016
2022-01-12 18:48:44 +08:00
committed by GitHub
parent e281b74456
commit 6da21f480e

View File

@@ -50,17 +50,18 @@ public class AuthWebMVCConfigurerAdapter extends WebMvcConfigurerAdapter {
public void addInterceptors(InterceptorRegistry registry) {
if (configure.isLoginRequired()) {
registry.addInterceptor(authInterceptor).addPathPatterns(
"/cluster/**",
"/consumer/**",
"/dashboard/**",
"/message/**",
"/messageTrace/**",
"/monitor/**",
"/rocketmq/**",
"/ops/**",
"/producer/**",
"/test/**",
"/topic/**");
"/cluster/**",
"/consumer/**",
"/dashboard/**",
"/dlqMessage/**",
"/message/**",
"/messageTrace/**",
"/monitor/**",
"/rocketmq/**",
"/ops/**",
"/producer/**",
"/test/**",
"/topic/**");
}
}
@@ -75,9 +76,9 @@ public class AuthWebMVCConfigurerAdapter extends WebMvcConfigurerAdapter {
@Override
public Object resolveArgument(MethodParameter methodParameter, ModelAndViewContainer modelAndViewContainer,
NativeWebRequest nativeWebRequest, WebDataBinderFactory webDataBinderFactory) throws Exception {
NativeWebRequest nativeWebRequest, WebDataBinderFactory webDataBinderFactory) throws Exception {
UserInfo userInfo = (UserInfo) WebUtil.getValueFromSession((HttpServletRequest) nativeWebRequest.getNativeRequest(),
UserInfo.USER_INFO);
UserInfo.USER_INFO);
if (userInfo != null) {
return userInfo;
}