Loading util:properties with Spring Profile causes multiple occurrences of ID

前端 未结 1 1911
醉话见心
醉话见心 2021-01-07 15:22

I am using Spring(3.1) profiles to load property files vis util:properties:


    

        
相关标签:
1条回答
  • 2021-01-07 15:27

    Make sure your xsd declarations are using >= 3.1 versions for both beans and util namespaces:

    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/util 
        http://www.springframework.org/schema/util/spring-util-3.1.xsd  ">
    

    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.

    0 讨论(0)
提交回复
热议问题