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

Accessing Application DI context in Shell DI context #2

Open
fcamblor opened this issue Sep 18, 2017 · 0 comments
Open

Accessing Application DI context in Shell DI context #2

fcamblor opened this issue Sep 18, 2017 · 0 comments

Comments

@fcamblor
Copy link
Contributor

imported from restx/restx#79

As discussed in #72, AppSettings is used at various places during shell commands.

However, the instance retrieved is the one defined in restx-shell context, not the one defined in the potential current application.

It means if default values such as restx.targetClasses or restx.archive.excludes are overriden in your app, these properties won't be used in restx-shell which will rely on default values.

Potential solution to this problem cover :

  • Loading the app DI context, on a separate classloader dedicated to the app classes & libraries. Hard thing here will be to reproduce the DI bootstrapping process and instances communication between shell's classloader and app's classloader (classes footprints won't be the same, first because in different classloaders, second because restx-shell's restx-core version will be different than your app's restx-core version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant