@Before priority BUG · Issue #1407 · actframework/actframework · GitHub
Skip to content

@Before priority BUG #1407

Closed
Closed

Description

@kukume

@before注解中,其中priority属性默认为0。
我这里有2个@before注解,其中一个没有填写priority属性,其中一个填写了priority属性,填写了priority属性(无论为何值)的before方法会慢于没有填写priority属性的before方法,
image
如图所示,其中没有填写priority属性的before方法为null,填写了的为填写的值,但是为null的before方法总是会在填写了priority属性的before方法之前执行
按照@before注解,没有填写priority属性默认值应为0

Activity

  1. greenlaw110 commented on Oct 14, 2021

    @greenlaw110
    Contributor

    @kukume

    The lesser the value is, the higher the priority it got. If you want to make the second Before method to be executed first, try to give a bigger number for the first @Before

    Refer: https://github.com/actframework/act-doc/blob/master/en/interceptor.md

  2. kukume commented on Oct 14, 2021

    @kukume
    Author

    @greenlaw110
    但是没写priority属性默认不应该为0吗,我用了全局的before和非全局的before,如果默认属性为0的话,我只需要在全局的before把priority属性写成负数就可以了,但是priority为null,我就需要为每一个before都写上priority

  3. self-assigned this
    on Oct 14, 2021
  4. greenlaw110 commented on Oct 16, 2021

    @greenlaw110
    Contributor

    @kukume

    Can you try 1.9.2-SNAPSHOT ?

  5. kukume commented on Oct 17, 2021

    @kukume
    Author

    没有问题了。

  6. added a commit that references this issue on Nov 26, 2022
  7. added this to the 1.9.2 milestone on Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions