Search code examples
javaspring-bootmicronaut

Is there is a way to access command line arguments in Micronaut or similar implementation of SpringBoot CommandLineRunner


I have an Micronaut example, with some controllers and on server start up event class using @EventListener.

I want to get the command line arguments in this class. Is there any annotations , method to achieve the same or similar implementation of SpringBoot CommandLineRunner.


Solution

  • U can try the Picocli integration, see https://micronaut-projects.github.io/micronaut-picocli/latest/guide/