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

操作触发条件支持限定生效的作用域 #237

Open
Createsequence opened this issue Mar 19, 2024 · 0 comments
Open

操作触发条件支持限定生效的作用域 #237

Createsequence opened this issue Mar 19, 2024 · 0 comments
Labels
enhancement New feature or request refactor Refactoring code to optimize or add functionality

Comments

@Createsequence
Copy link
Collaborator

目前的操作条件机制只支持具体到每次填充的每个对象,实际上对于一些操作,比如 @ConditionOnContainer 这种条件,实际上在配置解析的阶段就已经可以确定结果了,没必要每次填充的时候都要调用。

鉴于此,希望操作的触发条件可以指定生效的作用域,比如:

  • 解析阶段:即配置解析阶段,在这个阶段生效的条件可以直接决定 Opeartion 是否要配置到 BeanOpeartions 中;
  • 执行阶段:即操作执行器的执行阶段,在这个阶段生效的条件可以决定 Opeation 是否可以在本地执行中被处理;
  • 操作阶段:即操作处理器真正按照 Opeartion 对对象进行处理的阶段,在这个阶段生效的条件可以决定某个 Operation 是否可以对某个对象生效;

此外,需要考虑条件是否应当允许同时可以在多个阶段生效。

@Createsequence Createsequence added enhancement New feature or request refactor Refactoring code to optimize or add functionality labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Refactoring code to optimize or add functionality
Projects
None yet
Development

No branches or pull requests

1 participant