有没有办法在 Micronaut 或 SpringBoot CommandLineRunner 的类似实现中访问命令行参数
Is there is a way to access command line arguments in Micronaut or similar implementation of SpringBoot CommandLineRunner
我有一个 Micronaut 示例,其中包含一些控制器和服务器启动事件 class 使用 @EventListener。
我想在此 class 中获取命令行参数。有没有注解、方法实现和SpringBoot CommandLineRunner相同或相似的实现
您可以尝试 Picocli 集成,请参阅 https://micronaut-projects.github.io/micronaut-picocli/latest/guide/
我有一个 Micronaut 示例,其中包含一些控制器和服务器启动事件 class 使用 @EventListener。
我想在此 class 中获取命令行参数。有没有注解、方法实现和SpringBoot CommandLineRunner相同或相似的实现
您可以尝试 Picocli 集成,请参阅 https://micronaut-projects.github.io/micronaut-picocli/latest/guide/