title: Kotlin : Optional Dependency Injection Using Spring
body: <p>What is the kotlin alternative for </p>
  
  <pre><code>@Autowired(required=false)
  private DependencyC dependencyC;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>private Optional&lt;HelloService&gt; optionalHelloService;
  public HelloController(Optional&lt;HelloService&gt; helloService) {
      this.optionalHelloService = helloService;
  }
  </code></pre>