title: Caused by: org.springframework.expression.spel.SpelParseException: Expression [] @31: EL1043E: Unexpected token. Expected 'colon(:)' but was 'rcurly(}
body: <p>I went through links like: <a href="https://stackoverflow.com/questions/26275736/how-to-pass-a-mapstring-string-with-application-properties">How to pass a Map&lt;String, String&gt; with application.properties</a> before posting the questions, but this doesn't fulfill my requirements.</p>
  
  <p><strong>application.properties</strong></p>
  
  <pre><code>soap.all.endpoints={getEmployeeRoles: ['ABC', 'EFG'], getStudentRoles: ['PQR', 'XYZ']} 
  </code></pre>
  
  <p>I am reading using below code, but it gives me error.</p>
  
  <pre><code>@Value("#{${soap.all.endpoints}}")
  private Map&lt;String, List&lt;String&gt;&gt; roles;
  </code></pre>
  
  <p>Error :</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelParseException: Expression [{getEmployeeRoles: 'ABC', 'EFG'}] @31: EL1043E: Unexpected token. Expected 'colon(:)' but was 'rcurly(})'
      at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:164) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.evaluateBeanDefinitionString(AbstractBeanFactory.java:1565) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1231) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      ... 44 common frames omitted
  Caused by: org.springframework.expression.spel.SpelParseException: Expression [{getEmployeeRoles: 'ABC', 'EFG'}] @31: EL1043E: Unexpected token. Expected 'colon(:)' but was 'rcurly(})'
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.internalException(InternalSpelExpressionParser.java:1041) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatToken(InternalSpelExpressionParser.java:923) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.maybeEatInlineListOrMap(InternalSpelExpressionParser.java:667) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatStartNode(InternalSpelExpressionParser.java:519) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatPrimaryExpression(InternalSpelExpressionParser.java:350) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatUnaryExpression(InternalSpelExpressionParser.java:344) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatPowerIncDecExpression(InternalSpelExpressionParser.java:303) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatProductExpression(InternalSpelExpressionParser.java:281) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatSumExpression(InternalSpelExpressionParser.java:263) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatRelationalExpression(InternalSpelExpressionParser.java:218) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatLogicalAndExpression(InternalSpelExpressionParser.java:205) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatLogicalOrExpression(InternalSpelExpressionParser.java:192) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.eatExpression(InternalSpelExpressionParser.java:153) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.InternalSpelExpressionParser.doParseExpression(InternalSpelExpressionParser.java:131) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:61) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:33) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpressions(TemplateAwareExpressionParser.java:121) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.common.TemplateAwareExpressionParser.parseTemplate(TemplateAwareExpressionParser.java:62) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:49) ~[spring-expression-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:142) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      ... 48 common frames omitted
  </code></pre>