anchor.diff:  ----
   
   === Micronaut Example
  +image:https://micronaut.io/images/micronaut_mini_copy_tm.svg[Micronaut Logo,width=350]
  +
   The Micronaut microservices framework provides https://docs.micronaut.io/latest/guide/index.html#picocli[built-in support] for picocli with its `PicocliRunner` class.
   
   [source,java]
  
positive.code: ----
  
  === Spring Boot Example
  A custom factory is not always necessary.
  The below example shows how to use picocli with Spring Boot:
  
  [source,java]
  ----
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.CommandLineRunner;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import picocli.CommandLine;
  
  @SpringBootApplication
  public class MySpringBootApp implements CommandLineRunner {
  
      @Autowired
      private MyCommand myCommand;
  
      public static void main(String[] args) {
          // let Spring instantiate and inject dependencies
          SpringApplication.run(MySpringBootApp.class, args);
      }
  
      @Override
      public void run(String... args) {
          // let picocli parse command line args and run the business logic
          new CommandLine(myCommand).execute(args);
      }
  }
  ----
  
negative.code: 
  == OSGi Bundle
  
  image:https://www.osgi.org/wp-content/uploads/OSGi-website-header-logo.png[OSGi logo]
  
  From 4.0, the picocli JAR is an OSGi bundle with `Bundle-Name: picocli` and other appropriate metadata in the manifest.
  
  
  