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

service中的config,app实例 #10

Open
richerfu opened this issue Feb 22, 2020 · 3 comments
Open

service中的config,app实例 #10

richerfu opened this issue Feb 22, 2020 · 3 comments

Comments

@richerfu
Copy link
Owner

是否需要给service注入config,app实例。目前service继承于SoService虽然有基类,但实际并没有注入内容到service中。同理plugin和middleware等实例是否也需要注入

@richerfu
Copy link
Owner Author

TODO

  • 重构controller,service部分,不需要继承于SoController,SoService,所有的ctx,config等信息基于注解注入。
  • 重构注解部分,新增和删除部分功能注解
  • 减少正则匹配时间,提高性能

@richerfu
Copy link
Owner Author

注解部分需要重构的有:

  • Controller(重构):控制器注解,用于注册router
  • Service(重构):service注解,解耦数据服务,使其可重用
  • Order(新增):设置加载先后顺序
  • Autowired(重构):依赖自动注入,需要提升性能

@richerfu
Copy link
Owner Author

新版本开发中,主要新特性为:
重构加载文件的方式,使用globby加载文件。
重构IOC容器,支持更好的依赖管理
重构部分装饰器,更好的开发体验
重构Router,不使用koa-router。使用前缀树路由算法构建的Router

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

1 participant