项目采用springboot+dubbo,xml文件配置dubbo,配置dubbo application时,该属性放在xml文件中,项目启动就报错,但是配置在application.yml中就能正常启动
报错如下:
Caused by: java.lang.IllegalStateException: Duplicate application configs: <dubbo:application name="xn-demo-provider" valid="true" id="xn-demo-provider" prefix="dubbo.application" /> and <dubbo:application valid="false" qosEnable="false" prefix="dubbo.application" />
at org.apache.dubbo.config.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:157) ~[dubbo-2.7.0.jar:2.7.0]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.12.jar:5.3.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.12.jar:5.3.12]
... 16 common frames omitted