Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true