spring-cloud-config icon indicating copy to clipboard operation
spring-cloud-config copied to clipboard

Cloud config returns 404 not found if the label is empty

Open ahmadsab95 opened this issue 2 years ago • 2 comments

Spring Cloud Config support empty label when using 2.1.6.RELEASE , in case it empty the cloud config server use the default label

once upgraded to 3.1.1 , it does not accept empty label from client and return 404 not found instead of use the default label

ahmadsab95 avatar May 15 '22 13:05 ahmadsab95

i just noticed that the request deleted , but i don't understands why ? and if its not supported what the purpose of the default label that set by the config server

@RequestMapping("/{name}/{profiles:.*[^-].*}")
public Environment defaultLabel(@PathVariable String name,
		@PathVariable String profiles) {
	return labelled(name, profiles, null);
}

ahmadsab95 avatar May 16 '22 08:05 ahmadsab95

Facing the same issue with Spring Cloud 3.1.3, was in the process of migrating all my services from older (yet compatible Boot and Cloud versions) and unless I specifically declared the label name, my services do not seem to pick up configuration from the Config server at all (trying to migrate to Spring Boot 2.7.2 and Spring Cloud 2021.0.3)

dkar3 avatar Aug 18 '22 11:08 dkar3

This method is still present in the latest release https://github.com/spring-cloud/spring-cloud-config/blob/v3.1.4/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/EnvironmentController.java#L109

ryanjbaxter avatar Nov 03 '22 00:11 ryanjbaxter

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.

spring-cloud-issues avatar Nov 10 '22 00:11 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.

spring-cloud-issues avatar Nov 17 '22 00:11 spring-cloud-issues