I have a problem while running spring boot spring shell application. I have implemented commandlinerunner but its never called during application startup.
@Component
public class ParamReader implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
if(args.length>0) {
System.out.println(Arrays.asList(args).stream().collect(Collectors.joining(", ")));
}
}
}
when i run exit command from shell, its calling the run method and then program terminates. I tried implementing commandlinerunner on Spring application main class but the result is same.