作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用的是 Spring 4.2.x HandlerMethodSelector 类 - 现在迁移到 Spring 5.1.x。有人可以帮忙吗?我们如何在最新的 Spring 版本中替换以下代码?
final Set<Method> methods = HandlerMethodSelector.selectMethods(userType, new MethodFilter()
{
@Override
public boolean matches(final Method method)
{
return hasRequestMappingOverrideAnnotation(method);
}
});
最佳答案
HandlerMethodSelector替换为 MethodIntrospector
@deprecated as of Spring 4.2.3, in favor of the generalized and refined {@link MethodIntrospector}
您有类似的方法可以使用
static Set<Method> selectMethods(Class<?> targetType, ReflectionUtils.MethodFilter methodFilter)
Select methods on the given target type based on a filter.
关于java - Spring HandlerMethodSelector.selectMethods 的替代品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59305290/
我使用的是 Spring 4.2.x HandlerMethodSelector 类 - 现在迁移到 Spring 5.1.x。有人可以帮忙吗?我们如何在最新的 Spring 版本中替换以下代码? f
我正在尝试将项目从 Spring 4.3 升级到 5.0,并遇到了 Spring Security OAuth 中似乎存在的问题。特别是以下形式的嵌套 bean 创建失败堆栈: Caused by:
我是一名优秀的程序员,十分优秀!