java - Attribute 'profile' is not allowed to appear in element 'beans:bean' -


not sure what's happening here. xml bean definition schema using:

 <?xml version="1.0" encoding="utf-8"?>  <beans:beans xmlns="http://www.springframework.org/schema/mvc"          xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"          xmlns:jpa="http://www.springframework.org/schema/data/jpa"          xmlns:beans="http://www.springframework.org/schema/beans"          xmlns:context="http://www.springframework.org/schema/context"          xmlns:tx="http://www.springframework.org/schema/tx"          xsi:schemalocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd         http://www.springframework.org/schema/data/jpa     http://www.springframework.org/schema/data/jpa/spring-jpa-1.1.xsd     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> 

the problematic bean in definition:

 <beans:bean profile="dev,qa,prod">         <beans:bean parent="propertyconfigurer">             <beans:property name="order" value="0"></beans:property>             <beans:property name="locations">                 <beans:list>                     <beans:value>classpath:messages.properties</beans:value>                      <beans:value>classpath:common.properties</beans:value>                     <beans:value>classpath*:meta-inf/properties/local.properties</beans:value>                 </beans:list>             </beans:property>         </beans:bean> </beans:bean> 

but, i'm getting:

 cvc-complex-type.3.2.2: attribute 'profile' not allowed appear in element 'beans:bean' 

any ideas

profile attribute must appear in beans element i.e.:

<beans:beans profile="qa" ... >     <bean id="..." ...></bean> </beans> 

there can multiple nested beans element:

<beans:beans>     <bean id="..." ...></bean>     <beans:beans profile="prod" ... >         <bean id="..." ...></bean>     </beans>     <beans:beans profile="qa" ... >         <bean id="..." ...></bean>     </beans> </beans> 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -