Skip to content

PicocliSpringFactory should not fall back default Factory #1563

@a1dutch

Description

@a1dutch

Hi,

Using the picoli-spring-boot-starter the PicocliSpringFactory falls back to CommandLine.defaultFactory().create(clazz) if its not able to create a bean.

This can lead to unintended consequences and dependents not being injected or available. In my case the logging was turned off and there was no indication that this had failed

A better approach may be to just throw the caught exeception and fail.

Happy to create a PR with a feature flag (but this probably should be the default behaviour in the next major version)

Cheers

@a1dutch

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme: integrationAn issue or change related to integration with other frameworks, shells or operating systemstype: API 🔌

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions