airline icon indicating copy to clipboard operation
airline copied to clipboard

Use airline with Spring DI fails in parse

Open ssnyder opened this issue 5 years ago • 2 comments

I have a very simple application that is using Spring for DI, and when parsing the commandline If I run the command it fails (parser.parse(args)) because I do not have a no-parameter constructor.

Other than getting the parsedOptions in the state object, and manually setting the variables manually is there a supported solution? Examples?

Thanks!

ssnyder avatar Apr 08 '19 21:04 ssnyder

You may have to do some customisation of the command factory similar to #77 which was Google Guice related but likely the same basic problem.

FYI your report as it stands is unactionable, I haven't used Spring DI in years and so with your generic description can't really help you any further. Please provide a Minimal Complete Verifiable Example if you would like further help.

rvesse avatar Apr 09 '19 08:04 rvesse

I apologize for the weird report. I guess one thing that would have helped me was better documentation on how to use this with a Spring Application - or how to gather the list of parameters when a zero-argument constructor is not available. I expect that the Google Guice issue was similar from the description.

Unfortunately I do not currently have an example - but will attempt to get one together for you that is not going to violate any policies at my company :)

ssnyder avatar Apr 18 '19 18:04 ssnyder