We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下载demo,运行跑完之后发现有一个问题,想请教一下。 1.带上token请求,执行到MyFilterSecurityInterceptor的doFilter方法。 HelloController控制器会先执行一次返回,得到正确结果。
2.之后该链路会继续调用,然后又再次返回到HelloController控制器,又得到一次返回。 请教:如果只想得到一次返回结果该如何做呢? 谢谢!
The text was updated successfully, but these errors were encountered:
@LiHuiNeng hi,Here's how I solved it.
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; if (!request.getRequestURI().equals("/oauth/token")) { FilterInvocation fi = new FilterInvocation(servletRequest, servletResponse, filterChain); invoke(fi); } else { HttpServletResponse response = (HttpServletResponse) servletResponse; response.setHeader("Access-Control-Allow-Origin", "*"); response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); response.setHeader("Access-Control-Allow-Headers", ":x-requested-with,content-type"); filterChain.doFilter(servletRequest, servletResponse); } }
Sorry, something went wrong.
No branches or pull requests
下载demo,运行跑完之后发现有一个问题,想请教一下。
1.带上token请求,执行到MyFilterSecurityInterceptor的doFilter方法。
HelloController控制器会先执行一次返回,得到正确结果。
2.之后该链路会继续调用,然后又再次返回到HelloController控制器,又得到一次返回。
请教:如果只想得到一次返回结果该如何做呢?
谢谢!
The text was updated successfully, but these errors were encountered: