Hi,
I added a custom gateway to my application:
`
`
and where necessary i changed the usage of the default command gateway to this one
`
@Autowired
private CustomGateway gateway;
`
The application fails to start however, saying that it found two beans of this type:
`
2016-09-05 12:20:52.934 WARN 6928 — [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘instanceService’: Unsatisfied dependency expressed through field ‘gateway’: No qualifying bean of type [my.CustomGateway] is defined: expected single matching bean but found 2: org.axonframework.commandhandling.gateway.CommandGatewayFactoryBean#0,customGateway; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [eu.europa.ec.ccf.eckl.service.common.CustomGateway] is defined: expected single matching bean but found 2: org.axonframework.commandhandling.gateway.CommandGatewayFactoryBean#0,customGateway
`
When i add an id “gateway” to the spring declaration the error goes away, presumably because Spring matches the field name to the bean name. Is this expected behavior and if yes where is the second ‘customGateway’ bean coming from ?
Jorg