Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
新增自动创建app和自动注册job逻辑
Brief changelog
之前是用的quartz,现在切换到powerjob,每一个定时器都需要手动注册。实在太麻烦了!
所以在powerjob-worker-spring-boot-starter中新增了一些关于自动注册的配置类。(原本还改了client相关配置,本着最小修改原则,还原了)
Verifying this change
目前有以下功能:
stater中包含client配置,但是是可选的,如果没有加入power-client则不会自动注册
1、自动创建app
2、自动根据ProcessRegistry的信息进行job注册
我已验证
另外,提一个小小的建议。
power-client的api太不友好了,什么都传id,太查了! 建议新增一个唯一键,可以进行自定义。 比如job以name、app以name为唯一键