Skip to content

Tag: spring-el

Set environment property in yaml using placeholder

I have a map propMap, set as a PropertySource in the Environment object in my Spring Boot application. What would be the correct notation to access a key in the map from the .yaml file? I tried using username: “#{propMap.[‘username’]}” but doesn’t seem to work. I tried few others too but didn’t help. Could I know what would be the

Spring SPEL collection projection

A simple question on SPEL collection selection. Look at section 10.5.17 Collection Selection on this page What i need is the selection ‘Serbian’ to come from outside and not be a fixed hard coded String. Just for arguments sake consider that, we could get it as “selectedNationality” from the same society class from the same page in the link.