anchor.diff:  === Spring Boot Example
   image:https://picocli.info/images/spring-boot.png[Spring Boot Logo,width=350,height=167]
   
  -From 4.0, picocli provides a custom factory in the `picocli-spring-boot-starter` module.
  +As of version 4.0, picocli provides a custom factory in the `picocli-spring-boot-starter` module.
   To use this custom factory, add the following dependency:
   
   Maven:
  
positive.code: 
  Alternatively, you can define an <<unmatched-annotation,unmatched>> field to capture _all_ unknown options (and positional parameters):
  
  [source,java]
  ----
  @Unmatched List<String> unmatched;
  ----
  ====
  
  When your command is annotated with `@org.springframework.stereotype.Component` Spring can autodetect it for dependency injection.
  The business logic of your command looks like any other picocli command with options and parameters.
  
  [source,java]
  ----
  import org.springframework.stereotype.Component;
  import org.springframework.beans.factory.annotation.Autowired;
  
negative.code:     public Integer call() throws Exception {
          // business logic here
          return 0;
      }
  }
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  import org.springframework.beans.factory.annotation.Autowired
  import org.springframework.stereotype.Component
  import picocli.CommandLine.Command
  import picocli.CommandLine.Option
  import java.util.concurrent.Callable
  
  @Component
  @Command(name = "myCommand")
  class MyCommand : Callable<Int> {
  
      @Autowired
      private var someService: SomeService? = null
  
      // Prevent "Unknown option" error when users use
      // the Spring Boot parameter 'spring.config.location' to specify
      // an alternative location for the application.properties file.
      @Option(names = ["--spring.config.location"], hidden = true)
      private lateinit var springConfigLocation: String
  
      @Option(names = ["-x", "--option"], description = ["example option"])
      private var flag = false
  
      @Throws(Exception::class)
      override fun call(): Int {
          // business logic here
          return 0
      }
  }
  ----
  