views:

26

answers:

1
@Value("#{myProperties.prop_part1_part2}")

works but

@Value("#{myProperties.prop.part1.part2}")

Doesn't.

How do I address a property with "." in the key ?

+3  A: 

I haven't used spring 3 yet, so my answer is a shot in the dark. Try

@Value("#{myProperties['prop.part1.part2']"}
Bozho
Lovely shot in the dark. Must have left my brain at home this morning
krosenvold
And yes the single quotes are required
krosenvold
+1: Very well guessed!
Espen