I have Spring Boot web application (App-A)hosted in Tomcat that use the configuration in Config Server. The Config server url is passed via the Tomcat startup argument -Dspring.config.import=configserver:https://somewhere/...

Then I have another Spring Boot web application (App-B) deployed to the same Tomcat. App-B don't use Config Server at all, and havn't include the spring-cloud-starter-config dependency.

However when the App-B start, it throw error Unable to load config data from 'configserver:...'

If I include the spring-cloud-starter-config dependency, App-B will connect to the Config Server and load the App-A config. It break the application since App-A and App-B is connect different db.

So my question how can I stop App-B from loading the config from Config server?

Spring Boot Version: 2.7.13 Spring cloud config: 2021.0.7

Comment From: ryanjbaxter

Does using optional: solve this issue?

spring.config.import=optional:configserver:

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.