I have upgraded the spring cloud version from Hoxton.SR9 to 2020.0.0 (spring boot version 2.4.0 onwards).
I am using native profile to read configurations from the resource folder.
spring:
application:
name: config-server
profiles:
active: native
cloud:
config:
server:
native:
search-locations: classpath:/config/form-service, classpath:/config/tpm-admin-service, classpath:/config/tpm-service, classpath:/config/tpm-api-gateway-admin, classpath:/config/tpm-api-gateway-app, classpath:/config/sdc-service, classpath:/config/sdc-api-gateway-app, classpath:/config/sdc-admin-service, classpath:/config/sdc-api-gateway-admin, classpath:/config/attachment-service, classpath:/config/fds-service, classpath:/config/fds-admin-service, classpath:/config/fds-api-gateway-admin, classpath:/config/fds-api-gateway-app, classpath:/config/onboarding-service
server:
port: ${config_server_port:8888}
After the upgrade, the config-server startup is giving the following error:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-01-27 18:02:58.523 ERROR 4552 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Invalid config server configuration.
Action:
If you are using the git profile, you need to set a Git URI in your configuration. If you are using a native profile and have spring.cloud.config.server.bootstrap=true, you need to use a composite configuration.
I have tried using composite profile as well (shown below) but nothing seems to work.
spring:
application:
name: config-server
profiles:
active: composite
cloud:
config:
server:
composite:
- type: native
search-locations: classpath:/config/form-service, classpath:/config/tpm-admin-service, classpath:/config/tpm-service, classpath:/config/tpm-api-gateway-admin, classpath:/config/tpm-api-gateway-app, classpath:/config/sdc-service, classpath:/config/sdc-api-gateway-app, classpath:/config/sdc-admin-service, classpath:/config/sdc-api-gateway-admin, classpath:/config/attachment-service, classpath:/config/fds-service, classpath:/config/fds-admin-service, classpath:/config/fds-api-gateway-admin, classpath:/config/fds-api-gateway-app, classpath:/config/onboarding-service
bootstrap: true
server:
port: ${config_server_port:8888}
PS. Facing a similar issue with the project downloaded using spring initializer.
question from:
https://stackoverflow.com/questions/65919516/config-server-native-profile-issue-after-spring-cloud-upgrade-to-2020-0-0