Skip to content

spring.shell.interactive.enabled=false makes autoconf fail #1226

@fbus

Description

@fbus

The exception is quite explicit, but anyway :

@ConditionalOnClass(name = "org.springframework.shell.jline.JLineInputProvider")

Conditions are badly handled here. There should be a @ConditionalOnProperty(prefix = "spring.shell.interactive", name = "enabled", havingValue = "true", matchIfMissing = "true")
on jlineShellRunner and systemShellRunner.

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method springShellApplicationRunner in org.springframework.shell.boot.ShellRunnerAutoConfiguration required a single bean, but 2 were found:
        - jlineShellRunner: defined by method 'jlineShellRunner' in class path resource [org/springframework/shell/boot/ShellRunnerAutoConfiguration.class]
        - nonInteractiveShellRunner: defined by method 'nonInteractiveShellRunner' in class path resource [org/springframework/shell/boot/ShellRunnerAutoConfiguration.class]

As a side note : there is no existing test using spring.shell.interactive.enabled=false :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions