You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lb...@lbreuss.ch on 2021/11/10 17:54:52 UTC

Duplicate bean definition error, using xml endpoint tag with spring boot application

Trying to use the <endpoint> tag in a Spring Boot 2.5.6 application, Spring refuses to start, but terminates with an error:

    The bean 'myendpoint' could not be registered. A bean with that name has already been defined and overriding is disabled.

camel.xml, made visible by @Configuration @ImportResource(value = "classpath:camel.xml") public class CamelConfiguration { }
----
<beans xmlns=....>
    <camelContext id="endpoint-test" xmlns="http://camel.apache.org/schema/spring">
        <endpoint id="myendpoint" uri="file:./data/endpoint"/>
    </camelContext>
</beans>
----

In my pom.xml, I have a dependency to org.apache.camel.springboot:camel-spring-boot-xml-starter:3.11.1

Any help appreciated, thanks. The Camel FAQ says, <endpoint> exists Since Camel 2.15.

Cheers,
leo