Bean MicroserviceSettingsService not found

Hi all,

I have a Java Microservice here that uses SDK 1015.0.386 for which I’m struggeling to make it run locally.

During Startup I get the error


APPLICATION FAILED TO START


Description:

Parameter 0 of method groupDiscoveryService in ******.MainConfig required a bean of type ‘com.cumulocity.microservice.settings.service.MicroserviceSettingsService’ that could not be found.

Action:

Consider defining a bean of type ‘com.cumulocity.microservice.settings.service.MicroserviceSettingsService’ in your configuration.

I’m sure I have defined the required credentials in the application properties and the MS has been already in production - so it should work.
Is there anything special to take care here? Where is the Bean supposed to come from?

Thanks,
Mario Heidenreich

Ok, I got it to work.
Issue was that Spring didn’t pick up the profile properties file from src/main/resources…for whatever reason.

The MicroserviceSettingsService seems to require both, microservice.settings.enabled and C8Y.microservice.isolation to be set - which I had. It just didn’t pick up the file.
I have moved my application-dev.properties file to a /config folder and from there it works. Magic.

Cheers,
Mario