anchor.diff:      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
       }
   }
   ----
  
positive.code: === 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.
  To use this custom factory, add the following dependency:
  
  Maven:
  
negative.code: 
  The below example shows how to use picocli with Spring Boot:
  
  .Java
  [source,java,role="primary"]
  ----
  import org.springframework.boot.CommandLineRunner;
  import org.springframework.boot.ExitCodeGenerator;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.boot.SpringApplication;
  import picocli.CommandLine;
  import picocli.CommandLine.IFactory;
  
  