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

实现AutoContainerRegistrar #283

Closed
wants to merge 4 commits into from
Closed

Conversation

heliang666s
Copy link

编写AutoContainerRegistrar接口,使得用户可以注册容器。#263

@Createsequence
Copy link
Collaborator

Createsequence commented May 6, 2024

感谢 PR,再把类和方法注释补全一下就行了。另外,这个 CI 上传测试报告的步骤有点问题,可以不用管,在 JDK11 和 JDK17 运行单侧的这个步骤跑通了就行了。

另外,后续需要让 AutoContainerRegistrar 接入 Spring,从而支持在项目启动的时候自动调用,具体来说,需要:

  1. Crane4jApplicationContextafterSingletonsInstantiated 方法中补充逻辑,从 Spring 容器里面获取所有的 AutoContainerRegistrar,并调用它的 doRegister 方法;
  2. cn.crane4j.extension.spring 包下参考其他的组件创建一个测试用例,运行后验证其结果;

此外,AutoContainerRegistrar 目前好像没有考虑在非 Spring 环境下使用,这样的话不如直接把这个接口移到 cn.crane4j.extension.spring 包下吧。

@Createsequence Createsequence self-requested a review May 6, 2024 06:24
@heliang666s heliang666s closed this May 7, 2024
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

Successfully merging this pull request may close these issues.

2 participants