Skip to content

Accessing Application DI context in Shell DI context #2

@fcamblor

Description

@fcamblor

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions