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

InstanceUtil 的 InstanceFactory问题 #2

Open
chenyang1900 opened this issue Sep 25, 2019 · 2 comments
Open

InstanceUtil 的 InstanceFactory问题 #2

chenyang1900 opened this issue Sep 25, 2019 · 2 comments

Comments

@chenyang1900
Copy link

项目分模块 ,把InstanceUtil 和Base model中 ;因为InstanceFactory是apt生成,存在于上层model 中而Base model无法引用上层生成InstanceFactory的导致编译不通过; 请问有什么解决办法;
image
image

@UCodeUStory
Copy link
Owner

可以把InstanceUtil 写成一个单例,提供一个Factory接口,在Application初始化的时候将自动创建的InstanceFactory包装一下注入到InstanceUtil里

@chenyang1900
Copy link
Author

墨迹了一会,发现写不出来
image

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