auto scan all under the command package's command class #1492
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.
初始化命令对象的时候 不再需要硬编码 只需要保证在command包下并且继承
AnnotatedCommand
就会自动添加,并且会排除已经标记@Deprecated
的class无论是main方法测试
还是打包成脚本测试都通过
如果有哪里不满意的请跟我说下~
我自己发现了一个问题就是 自动扫描的 命令顺序不可控 和 原来硬编码的不相同(如果有需要的话可以改成按照首字母排序,或者自定义的权重 或者 把命令归类 然后 每一个分类中 按字母排序)