I am using Spring(3.1) profiles to load property files vis util:properties:
<beans profile="local">
<util:properties id="myProps"
location="classpath:local.properties" />
</beans>
<beans profile="dev">
<util:properties id="myProps"
location="classpath:dev.properties" />
</beans>
And I invoke the profile via a runtime parameter(running on TC Server):-Dspring.profiles.active=local
But I get the error There are multiple occurrences of ID value 'myProps'
This was running previously with other bean definitions but once the util:properties
was added I get the error.
Make sure your xsd declarations are using >= 3.1 versions for both
beans
andutil
namespaces:Most likely cause of error would be forgetting to set util declaration to 3.1, if as you say this works for other beans but not those declared using
util
.