Replies: 1 comment 1 reply
-
|
Looks like you're missing argument name like in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am brand new to Spring Shell, so it might well be a simple newbie issue... but I am struggling to get command options to work.
Using annotations I can get them to work for simple cases as long as I do not specify a longname (have not tried shortnames). This works, in a way:
t1 helloprintsT1: You passed in: 'hello'- unexpected, but OK?t1 --myParam helloprintsT1: You passed in: 'hello'- works as expectedt1 --userIsMistaken helloprintsT1: You passed in: '--userIsMistaken'- not OK, expected error due to unknown named optionAs soon as I add a longname to the option parameter like so
I cannot get it to accept the option value at all. All call flavors of
t1executed fort2plust2 --alongname helloprintT2: You passed in: 'null'Calling
help t2also does not list the option:Using
CommandRegistrationand calling a POJO method I have not managed to communicate an option value at all. E.g.with the
echomethod defined like so in a POJO (no shell annotations present at all)always yields
You passed in: 'null'.Can someone point out where I am going wrong here?
Spring Shell version
2.1.0Spring Boot version
2.7.2Java version
11I am using the plain vanilla project as it is generated by start.spring.io with
Spring Shellas the only dependency.Thanks!
Ralf
Beta Was this translation helpful? Give feedback.
All reactions