From 6ac527e204fbcf9bc62f280eb925cddab291fe5b Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Mon, 25 May 2020 11:01:07 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/chonggaoxiao/new_excoin --- src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java b/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java index c31c084..cc8e77b 100644 --- a/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java +++ b/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java @@ -1,12 +1,16 @@ package com.xcong.excoin.configurations; +import com.xcong.excoin.configurations.security.UserAuthenticationArgumentResolver; import com.xcong.excoin.utils.SpringContextHolder; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringBootConfiguration; import org.springframework.context.annotation.Bean; +import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +import java.util.List; /** * @author wzy @@ -17,7 +21,8 @@ public class WebMvcConfig implements WebMvcConfigurer { @Override - public void addInterceptors(InterceptorRegistry registry) { + public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) { + resolvers.add(new UserAuthenticationArgumentResolver()); } /** -- Gitblit v1.9.1