Skip to content
New issue

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

当我在方法上使用多个@Filter过滤器 过滤器的功能失效了 #540

Closed
nosoul-nyl opened this issue Dec 13, 2022 · 7 comments
Closed
Assignees
Labels
bug 这是个BUG

Comments

@nosoul-nyl
Copy link

版本号

3.0.0-M5

附加版本

No response

问题描述

image
这里我使用了两个过滤器
image
这是我的输入
image
在控制台可以看到 我输入的"1" 没有过滤并且进入了这个方法

当我注释掉@filter 只有一个过滤器在方法上面的时候
image
使用qq发送 11
image
控制台没有出现任何消息 似乎成功的过滤

复现方式

复现方法在问题的描述中

相关日志

No response

其他补充

No response

@nosoul-nyl nosoul-nyl added the bug? 疑似为bug、存在普遍性问题、待确认 label Dec 13, 2022
@ForliyScarlet ForliyScarlet added the 等待确认 等待负责人员的确认 label Dec 13, 2022
@ForteScarlet ForteScarlet removed the 等待确认 等待负责人员的确认 label Dec 13, 2022
@ForteScarlet
Copy link
Member

本地测试未复现此问题,请提供项目依赖配置等详细信息

@ForteScarlet ForteScarlet added the 等待反馈 等待发起者的反馈 label Dec 13, 2022
@nosoul-nyl
Copy link
Author

nosoul-nyl commented Dec 13, 2022

本地测试未复现此问题,请提供项目依赖配置等详细信息

https://gitee.com/nosoull/graduation-design-from-nyl.git 这是我代码的gitee地址 在src/main/java/com/tuanzijx/simbot/graduationdesignfromnyl/listeners/OnTheFunctionListener 这个类中的第62行

在这个方法上我使用了@filter(value = "机器人",targets = @Filter.Targets(authors = "862197510"),matchType = MatchType.TEXT_EQUALS) 这个注解 ,这个注解是我找其他人帮忙找bug时,零时填上的去然后push到gitee上的,所以看上去会与下面方法上的注解冲突。

我gitee上显示的这个项目 使用的版本时3.0.0.bate3,但是我在本地上已经使用了最新的版本经行尝试,依旧是会出现我描述的问题

@ForliyScarlet ForliyScarlet added 等待确认 等待负责人员的确认 and removed 等待反馈 等待发起者的反馈 labels Dec 13, 2022
@ForteScarlet
Copy link
Member

你的项目有访问权限。提供 pom.xml 内的配置即可

@ForteScarlet ForteScarlet added 等待反馈 等待发起者的反馈 and removed 等待确认 等待负责人员的确认 labels Dec 13, 2022
@nosoul-nyl
Copy link
Author

你的项目有访问权限。提供 pom.xml 内的配置即可

pom.zip

@ForliyScarlet ForliyScarlet added 等待确认 等待负责人员的确认 and removed 等待反馈 等待发起者的反馈 labels Dec 13, 2022
@ForteScarlet
Copy link
Member

经排查这似乎是Spring中的 AnnotatedElementUtils 导致的问题,目前暂未确定是我的使用问题还是官方出现的bug,(参考 spring-framework#29685 ),需要等待其回复后再决定调整方案。

临时解决办法:使用 v5.3.23 或以下版本的 spring-core(对应spring boot为 v2.7.5 或以下)

@ForteScarlet ForteScarlet removed the 等待确认 等待负责人员的确认 label Dec 13, 2022
@nosoul-nyl
Copy link
Author

经排查这似乎是Spring中的 AnnotatedElementUtils 导致的问题,目前暂未确定是我的使用问题还是官方出现的bug,(参考 spring-framework#29685 ),需要等待其回复后再决定调整方案。

临时解决办法:使用 v5.3.23 或以下版本的 spring-core(对应spring boot为 v2.7.5 或以下)

感谢您的帮助

@ForteScarlet
Copy link
Member

ForteScarlet commented Dec 13, 2022

There is a bug in the logic for RepeatableContainers.StandardRepeatableContainers.computeRepeatedAnnotationsMethod(...) which has existed since Spring Framework 5.2 (when StandardRepeatableContainers was introduced); however, the changes made in conjunction with spring-projects/spring-framework#20279 made this bug apparent when using AnnotatedElementUtils.findMergedRepeatableAnnotations.

Thus, this is simultaneously a bug and a regression.

根据答复,这是Spring的bug,需等待修复

但是有解决方案,下个版本会修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 这是个BUG
Projects
None yet
Development

No branches or pull requests

3 participants