title: Parse LocalTime string inside the @Value attribute
body: <p>My environment variable is a string with time <code>23:30</code> In my String Boot application I'd like to parse it automatically and set it the result to variable.</p>
  
  <p>I tried like this</p>
  
  <pre><code>@Value("#{ java.time.LocalTime.parse('${NIGHT_START_TIME}')}")
  private LocalTime NIGHT_START_TIME;
  </code></pre>
  
  <p>IntelliJ shows the error</p>
  
  <blockquote>
    <p>Cannot resolve variable 'java' </p>
  </blockquote>
  
  <p>Here is log</p>
  
  <pre><code>Unsatisfied dependency expressed through field 'NIGHT_START_TIME';
  nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'LocalTime' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public?
  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
  </code></pre>
  
  <p>If I read variable like this I see that value is correct</p>
  
  <pre><code>@Value("${NIGHT_START_TIME}")
  private String NIGHT_START_TIME;
  </code></pre>
  
  <p>Any ideas how to make it work?</p>