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

关于使用的一些问题请教 #35

Closed
XiaoStack opened this issue Feb 22, 2023 · 1 comment
Closed

关于使用的一些问题请教 #35

XiaoStack opened this issue Feb 22, 2023 · 1 comment

Comments

@XiaoStack
Copy link

1.测试类中的示例最终好像都是基于反射调用的,这样对于使用 spring 管理的 bean(比如使用 @resource 或者 @Autowired 修饰),反射构建执行时会报出空指针,因此需要对实现类做特殊处理,请问有比较优雅的使用示例嘛,求解
image

2.测试示例的使用方式就是生产使用的最终形态嘛,是否有其他构建和调用的方式,如果有,方便给出示例不
image

@clsaa
Copy link
Collaborator

clsaa commented Mar 14, 2023

代码中没有使用反射,如果你使用了Spring的Bean,可以把AgeiPort看成 一个Bean,在Configuration里初始化。随后你可以在其他的Spring代码中比如IMPORTController中使用AgeiPort创建导入导出任务

@clsaa clsaa closed this as completed Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants