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

关于继承ApplicationAdapter类中,重写create()方法的疑问 #4

Open
Monsterimpl opened this issue Aug 13, 2024 · 3 comments
Open

Comments

@Monsterimpl
Copy link

有没有统一的类管理,类似于spring的bean,而不是一个一个new一个一个dispose(),我看了官方的文档好像是在成员变量里面声明类,然后在create里面new出来最后在dispose回收

@nanshaws
Copy link
Owner

有没有统一的类管理,类似于spring的bean,而不是一个一个new一个一个dispose(),我看了官方的文档好像是在成员变量里面声明类,然后在create里面new出来最后在dispose回收

没有你说的那种统一的类对象管理

@nanshaws
Copy link
Owner

有没有统一的类管理,类似于spring的bean,而不是一个一个new一个一个dispose(),我看了官方的文档好像是在成员变量里面声明类,然后在create里面new出来最后在dispose回收

它那边每个演员有自己的生命周期,没必要引入IOC

@zqll4
Copy link
Contributor

zqll4 commented Aug 13, 2024

有没有统一的类管理,类似于spring的bean,而不是一个一个new一个一个dispose(),我看了官方的文档好像是在成员变量里面声明类,然后在create里面new出来最后在dispose回收

你可以引入dragger、或者使用其他轻量级的ioc容器,还有artemis-odb(另一个流行的ecs组件)可以实现对象管理和注入

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

3 participants