title: How make a conditional property in a YML file in Spring Boot?
body: <p>I want to be able to have something like:</p>
  
  <pre><code>some-property: '#{${ENV_VAR_1:} == "someVal" ? boo + "someVal" : ${ENV_VAR_1}}'
  </code></pre>
  
  <p>Is something like this possible?</p>
  
  <p>When I try this currently, I get the error:</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: Operand must not be null
        at org.springframework.util.Assert.notNull(Assert.java:198) ~[spring-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.spel.ast.SpelNodeImpl.(SpelNodeImpl.java:77) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.spel.ast.Ternary.(Ternary.java:40) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatExpression(InternalSpelExpressionParser.java:183) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.spel.standard.InternalSpelExpressionParser.doParseExpression(InternalSpelExpressionParser.java:131) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:61) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:33) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpressions(TemplateAwareExpressionParser.java:121) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.common.TemplateAwareExpressionParser.parseTemplate(TemplateAwareExpressionParser.java:62) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:49) ~[spring-expression-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:142) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE]
        ... 51 common frames omitted</p>
  </blockquote>