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
controller的方法的参数要不要约定好(比如全部实现一个公共接口从而强制约定),如果不这样,那么在拦截器中如何精确获取访问的类以及方法呢? 我现在的思路是在拦截器的preHandle方法中将handler强转为HandlerMethod,调用getMethod方法去与目标class的getMethod对比,但是你看class的getMethod,其中参数为getMethod(name, parameterTypes),如果不对controller方法的参数进行约定,这写起来会很混乱,而且代码会写的很长(很不好看)。 所以我想问下,controller方法参数怎么设计好呢?
The text was updated successfully, but these errors were encountered:
项目我没有去看,我直接看你写的博客,我看到最后你写的controller那里你并没有作处理
Sorry, something went wrong.
No branches or pull requests
controller的方法的参数要不要约定好(比如全部实现一个公共接口从而强制约定),如果不这样,那么在拦截器中如何精确获取访问的类以及方法呢?
我现在的思路是在拦截器的preHandle方法中将handler强转为HandlerMethod,调用getMethod方法去与目标class的getMethod对比,但是你看class的getMethod,其中参数为getMethod(name, parameterTypes),如果不对controller方法的参数进行约定,这写起来会很混乱,而且代码会写的很长(很不好看)。
所以我想问下,controller方法参数怎么设计好呢?
The text was updated successfully, but these errors were encountered: