spring-shell
spring-shell copied to clipboard
When using Spring Shell, no ApplicationReadyEvent will be published
When I use Spring Shell, the ApplicationReadyEvent will never be published and new SpringApplicationBuilder(Application.class).run(args) also never returns
@Order(Ordered.HIGHEST_PRECEDENCE) can be used as a workaround, makes your Component/Listener run before the shell starts.
I replaced the ApplicationStarter from SpringShell with a Lifecycle Component. That helped too and is better suited for the task :)
I have the same problem. @fionera, could you describe your workaround in more detail?
I disabled spring shell and made this class to start it. https://github.com/CleanstoneMC/Cleanstone/blob/master/src/main/java/rocks/cleanstone/console/InteractiveShellLifecycle.java
I disabled spring shell and made this class to start it. https://github.com/CleanstoneMC/Cleanstone/blob/master/src/main/java/rocks/cleanstone/console/InteractiveShellLifecycle.java
How do you disable Spring Shell?
@davidrochin You can disable it by setting the following in your application.yml
spring:
shell:
interactive:
enabled: false