No spring.config.import set

date
Jul 30, 2022
slug
No-spring-config-import-set
status
Published
tags
Bugfix
Server
Microservice
Spring Boot
Spring Cloud
summary
type
Post

Problem

I’ve created a Eureka Server for my microservice, but I got the error below when trying to run the server:

Solution

Include the spring-cloud-config-server dependency in pom.xml:

Regarding the suggested solution

The property spring.config.import=optional:configserver: is not necessary when we include the spring-cloud-config-server dependency, and in some versions of Spring Boot this property is not recognized.
So using spring-cloud-config-server dependency is the best option as it is a solution that can be used with any version.

References

 

© Foy Wan 2022 - 2025