Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom CloudFoundryServiceInfoCreator being ignored #53

Closed
pascalw opened this issue Apr 23, 2016 · 1 comment
Closed

Custom CloudFoundryServiceInfoCreator being ignored #53

pascalw opened this issue Apr 23, 2016 · 1 comment
Assignees

Comments

@pascalw
Copy link

pascalw commented Apr 23, 2016

I'm deploying an application to CF which uses auto-reconfiguration. I've recently added a custom Spring Cloud CloudFoundryServiceInfoCreator to connect to a custom service, which is working fine.

However I noticed that when running with auto-reconfiguration enabled it seems that the auto-configuration is not picking up the custom ServiceInfoCreator and org.cloudfoundry.reconfiguration.org.springframework.cloud.AbstractCloudConnector logs messages like these:

No suitable service info creator found for service sentry Did you forget to add a ServiceInfoCreator?

I would like to understand why this happening and how this is supposed to work. It seems that this project includes a copy of Spring Cloud that somehow doesn't pick up custom service info creators and seemingly also doesn't have to?

@nebhale nebhale self-assigned this Nov 3, 2017
@nebhale
Copy link
Member

nebhale commented Nov 3, 2017

This is a correct analysis. Since auto-reconfiguration needs to know not only about the service info, but it also needs to know about the types that it is going to replace, it can only care about services that are known by the version of Spring Cloud Connectors that it is using at any given time.

This fact, that we can't auto-reconfigure arbitrary types, doesn't stop you from using Spring Cloud Connectors directly (specifically @ServiceScan) which is always a recommended choice. Auto-reconfiguration is great for demos, but is so magic that using it in production is dangerous.

@nebhale nebhale closed this as completed Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants