Cloud Native 6 min read

What’s New in Spring Cloud Greenwich? Upgrade Guide and Key Features

This article reviews the Spring Cloud Greenwich.RELEASE launch, detailing Maven coordinates for Java 11 compatibility, new features such as upgraded Netflix components, CredHub configuration for Spring Cloud Config, OAuth2 integration in Spring Cloud Gateway, recent Feign enhancements, common pitfalls, and practical migration tips for developers.

Programmer DD
Programmer DD
Programmer DD
What’s New in Spring Cloud Greenwich? Upgrade Guide and Key Features

Spring Cloud Greenwich.RELEASE Overview

On 2019‑01‑23 the Spring Cloud Greenwich release was officially launched. It requires Spring Boot 2.1.x; projects still on 2.0.x should stay on the Finchley version.

POM Coordinates for Java 11 Compatibility

<!-- Support Spring Boot 2.1.X -->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-dependencies</artifactId>
  <version>2.1.2.RELEASE</version>
  <type>pom</type>
  <scope>import</scope>
</dependency>

<!-- Greenwich.RELEASE -->
<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-dependencies</artifactId>
  <version>Greenwich.RELEASE</version>
  <type>pom</type>
  <scope>import</scope>
</dependency>

Upgraded Netflix Components – DiscoveryClient Supports InstanceId

The new version adds support for retrieving the InstanceId via DiscoveryClient.

Spring Cloud Config New Storage Backend

Beyond Git, File, and JDBC, the release introduces CredHub support for Cloud Foundry.

spring:
  profiles:
    active: credhub
  cloud:
    config:
      server:
        credhub:
          url: https://credhub:8844

Spring Cloud Gateway Enhancements

OAuth2 Integration

An example configuration for integrating Spring Cloud Gateway with Spring Security OAuth2 is provided. A known issue (ReactiveManagementWebSecurityAutoConfiguration) may require a specific workaround.

Response Header Rewrite Filter

spring:
  cloud:
    gateway:
      routes:
        - id: rewriteresponseheader_route
          uri: http://example.org
          filters:
            - RewriteResponseHeader=X-Response-Foo,, password=[^&]+, password=***

Feign New Features and Pitfalls

@SpringQueryMap Enhances GET Requests

The @SpringQueryMap annotation improves handling of query parameters for GET requests, but it lacks a value attribute, making it incompatible with the original OpenFeign @QueryMap.

Exception Resolution

***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'pigx-upms-biz.FeignClientSpecification' ... could not be registered. A bean with that name already exists and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

Two practical solutions:

Set spring.main.allow-bean-definition-overriding=true in bootstrap.yml (available since Spring Boot 2.1).

Consolidate calls to the same service within a single @FeignClient and use the new contextId attribute to differentiate interfaces.

spring.main.allow-bean-definition-overriding=true
This will be used as the bean name instead of name if present, but will not be used as a service id.

Summary

Spring Cloud Finchley → Greenwich changes are minimal, mainly Java 11 compatibility.

Spring Cloud Alibaba still lacks official support.

Spring Cloud LoadBalancer remains unchanged and cannot yet replace Ribbon.

Join the discussion with the author via the provided contact.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

feigngatewaySpring CloudJava 11CredHubGreenwich
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.