Testing With Spring Cloud Contract

Learn how to test with Spring Cloud.

With many industries transforming to a microservices architecture, testing these microservices is a challenge. Different teams own different services, so testing and validating the API communications between these microservices is important.

The major drawback of using Test API frameworks requires all your microservices to be up and running.

This Week in Spring: All Things Spring Cloud and More

Learn more about all things Spring Cloud and more in this week's "This Week in Spring!"

Hi, Spring fans! Welcome to another installment of This Week in Spring! This week I'm in Antwerp, Belgium for the epic Devoxx event. I was in Singapore for Devoxx Belgium 2018, and so I was so glad I was able to make it this year!

I finished a "deep dive" session this morning with an amazing crowd of people who hung out with me for 3 hours to talk about Reactive Spring. I've got two more one-hour talks on Thursday — "Bootiful Testing" and "Bootiful Kotlin." I'm so looking forward to seeing everyone for those talks as well!

This Week in Spring: Releases, Podcasts, Tutorials, and More

We've got a lot in store This Week in Spring — check it out!

Hi, Spring fans! What a week! I've just returned from Prague, the Czech Republic, where I was for the epic Geecon Prague 2019 event. (Thanks for voting my talk on Reactive Spring the #1 talk, Prague!). Now, I'm in Nantes, France, the DevFest Nantes show. I'd never been to Prague and I've never been to Nantes. So how's that for cool first-time appearances in one week?

Tonight, I fly to Paris, France, for customer meetings. Then, I fly on Thursday to St. Petersburg, Russia, for the Joker conference, where I'll be presenting on testing. I'll be co-presenting with Spring co-founder, my friend, and hero, the one, the only, the amazing and inimitable, a veritable font of kindness and wisdom, Juergen Hoeller! Then, on the 27th, I fly to Chicago. It's shaping up to be quite the week!

This Week in Spring: SpringOne Platform 2019 Edition

It's here; it's finally here! My favorite time of the year! Happy SpringOne Platform week! This week, I'm in the amazing Austin, TX, talking to anybody who wants to know about all things Spring. There have been a ton of amazing things announced at this show, but one thing I've been excited to share with y'all is that we just announced the new Azure Spring Cloud runtime. (More on that in the links below!)

I've been busy! I'm doing one talk with Microsoft on Azure Spring Cloud, and another with Okta /Google on simplifying the dev lifecycle. Also, I'm hosting the keynote tomorrow morning. So much to do, so little time!

This Week in Spring: Cloud, New Releases, and Java 13 Support

Hi, Spring fans! Welcome to another installment of This Week in Spring. This week, I’m in sweet San Francisco, soaking up the sun and enjoying the fun of summer. Sure, I’ve got a few meetings, and appearances, etc., but it is very nice to be home. By the way, I’ll be speaking at the upcoming San Francisco Java User Group — come hang out and say hi!

Anyway, lots of good stuff (as usual), so let’s get to it.

Microservices Architecture With Spring Boot and Spring Cloud

Did you know that some of the largest tech companies, like Amazon and Google, are using Java to develop a microservices architecture? Many companies are building a microservices architecture to scale their people, but not their systems. If you’re also looking to do so, a good way to get started is to hire more Java developers (because there are so many of them). 

Within the Java ecosystem, you’ll find some well-rooted patterns for building microservice architectures. And if you’ve developed with Spring before, then Spring Boot and Spring Cloud should feel like a nice homecoming.

Spring Cloud Alibaba Sentinel’s Integration With Feign

@FeignClient(name = "service-provider")
public interface EchoService {
  @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)
  String echo(@PathVariable("str") String str);
}

What Is Sentinel

Sentinel is an open source circuit breaker. It can be part of Spring Cloud Alibaba or as an individual package.

What Is Feign

Feign is a Java to HTTP client binder. It’s aiming to simplify the REST API process.

Getting Started With Spring Cloud Gateway

In this article, we will integrate spring cloud gateway with a microservice-based architecture application using spring cloud. In the process, we will use spring cloud gateway as a gateway provider, Netflix Eureka as a discovery server, with circuit breaker pattern using Netflix Hystrix.

Let's quickly get started with the implementation of it.

This Week in Spring: Runtime, Debugging, and Boosting Microservices Performance

Hi, Spring fans! Welcome to another installment of This Week in Spring! This week, I’m in... I’m home! Look at that! I’m home for the epic SpringOne Tour San Francisco event. I’m super excited to be here in this amazing weather with an amazing community. It’s been a busy week though! Last week, I returned from Spain for my kid’s graduation, and I am still so so proud. Tomorrow, I fly to Cork, Ireland, for the Cork JUG, and then, it’s off to London for a wedding. So, lots of travel, but a bit of a lighter load.

We’ve got a lot to cover, so let’s get to it!

This Week in Spring: Spring WebFlux, Cloud, Data, and More

Hi, Spring fans! What a week it’s been since we last spoke! I was in Zurich, Switzerland; then Paris, France; then Minsk, Belarus; and now, I’m in Barcelona, Spain, for the epic JBCN show. I’ve recorded a few episodes for the podcast (✅), gave a talk (✅) and now have a workshop to deliver on Wednesday (✅). Fun week by the beach! Don’t worry about me, I’ll pull through...

Spring en la primavera

Microservice Configuration: Spring Cloud Config Server Tutorial

Configuring Microservices: The Challenges

Managing application configuration in a traditional monolith is pretty straight forward. The configuration is usually externalized in a properties files on the same server as the application. If you need to update the configuration you simply amend the properties file and restart the application. Things can get a little tricker with microservices, but why is that? 

Microservices are composed of many small, autonomous services, each with their own configuration. Rather than a centralised properties file (like the monolith), configuration is scattered across multiple services, running on multiple servers. In a production environment, where you likely have multiple instances of each service, configuration management can become a hefty task.

Service Integration With Netflix Feign and Ribbon

The guys at Netflix have developed and open sourced (among many other things) Feign and Ribbon. These libraries can help you as a developer to build robust, fault-tolerant service integrations. Best of all, they've been tested in the wild by Netflix, who use both libraries extensively in their own microservices architecture. In this post, we'll look at Feign and Ribbon to see how they can be used in the context of a Spring Boot application.

What Is Feign?

Feign is a library that helps developers create declarative HTTP clients by simply defining an interface and annotating it. At runtime, Feign creates the HTTP client implementation for the interface. We'll look at this in detail with some sample code later.

Microservics Architecture: Introduction to Spring Cloud

In this article, we focus on Spring Cloud. We talk about the various components under its umbrella.

You Will Learn

  • What Spring Cloud is.
  • The typical challenges in microservices architectures.
  • The challenges that Spring Cloud solves.
  • The important projects under the Spring Cloud umbrella.
  • How Spring Cloud helps you build your microservices architecture.

Introduction to Cloud and Microservices: Challenges and Advantages

This is the second article in a series of five articles on cloud and microservices. Part 1 can be found here:

This Week in Spring: Spring Cloud, Kafka, and More

Hi, Spring fans, and welcome to another installment of This Week in Spring! This week, I’m in colorful Chicago, Illinois, and magnificent Milwaukee, Wisconsin. I am so excited to be in both places. I’m in Chicago for the GOTO Chicago event, which is always fun, and I’m in Milwaukee for a meetup and, of course, to partake of local delicacies like Kopps, a Cousins sub, and a Spotted Cow beer. Life is great!

Did you see this epic image of the Chicago Lakeshore area I took the other day? Spring is truly in full swing! (I’ll ignore the buckets of rain that have been dumped on Chicago and Milwaukee just a day after that photo was taken…)

This Week in Spring: Releases, Podcasts, Cloud, and Spring Security

Hi, Spring fans, and welcome to another installment of This Week in Spring! This week, I’m in sunny California, then it’s off to Istanbul, Turkey, for the epic SpringOne Tour event. Then, I'm off again to Chicago, Illinois, for the better-and-better GOTO Chicago show. I hope to see you there!

We’ve got a busy week in Spring, so without further ado, let’s get to it!

What Are Spring Projects?

There are several important Spring Projects solving the needs of enterprises today. But first, it is essential to understand what are Spring Projects and how are they different from Spring Modules?

What You Will Learn

  • What are Spring Projects?
  • What are some examples of Spring Projects?
  • How are Spring Projects different from Spring Modules?

What Are Spring Projects?

Within the Spring Framework, there are a variety of different Spring modules — JDBC, AOP, Beans, and Context. All Spring Modules share the same release version as the Spring Framework. They are part of the same project.