Health Checks, Metrics & More with Spring Boot Actuator

Health Checks, Metrics & More with Spring Boot Actuator I've been working with Spring Boot for a few years now and I'm a big fan. There are lots of things to like about Spring Boot, but one thing that really stands out for me is the emphasis on production readiness. Production Readiness Production readiness is about looking beyond functional requirements and ensuring your application can be properly managed and monitored in production. Some key things to consider when thinking about production readiness are... Health checks Viewing application configuration - application properties, Environment variables etc. Viewing and altering log configuration Viewing application metrics - JVM, classloader, [...]

By |2019-02-07T07:27:16+00:00September 7th, 2017|Spring Boot|0 Comments

REST HATEOAS with Spring

REST HATEOAS with Spring The Richardson maturity model breaks the REST architectural style into various levels of maturity. Level zero describes a system that uses HTTP as a transport mechanism only (also known as URI tunnelling). A single URI and HTTP verb is typically used for all interactions with POX (plain old XML) being posted over the wire. Old school SOAP-RPC is a good level zero example. Level one describes a system that builds on level zero by introducing the notion of resources. Resources typically represent some business entity and are usually described using nouns. Each resource is addressed via a unique URI and a single [...]

By |2019-02-07T08:02:28+00:00July 18th, 2017|REST, Spring Boot|0 Comments

REST Endpoint Testing With MockMvc

REST Endpoint Testing With MockMvc In this post I'm going to show you how to test a Spring MVC Rest endpoint without deploying your application to a server. In the past, full integration tests were the only meaningful way to test a Spring REST endpoint. This involved spinning up a test server like Tomcat or Jetty, deploying the application, calling the test endpoint, running some assertions and then terminating the server. While this is an effective way to test an endpoint, it isn't particularly fast. We're forced to wait while the entire application is stood up, just to test a single endpoint. An alternative approach [...]

By |2019-02-11T07:31:42+00:00May 25th, 2017|REST, Spring Boot, Testing|0 Comments

Apache CXF – Contract First Web Services

Apache CXF - Contract First Web Services I wrote a post a few years ago detailing a step by step guide to building a contract first web service using Spring.  I recently started working with Apache CXF and thought it would be worth putting together a more up to date post, this time using CXF. We'll create a fictitious Account Service that takes a single account number parameter and returns associated account information. Although the sample service will be very simple, the approach taken should provide you with a solid foundation upon which to build real world services. Source Code The full source code for this post [...]

By |2019-02-12T07:29:21+00:00October 5th, 2016|Spring Boot, Web Services|0 Comments

Docker – Multi Container App

Docker - Multi Container App In my last post I used Docker to build and run a simple Spring Boot application. This post will take things a little further by introducing a second container, showing you how distinct components can be deployed in separate containers and how those containers can communicate. We'll build a simple Spring Boot app with a REST endpoint that takes an incoming message and adds it to an ActiveMQ message queue. A second endpoint will use a receiver component to consume the next message from the queue and return it to the client.  The application itself is simple but it'll provide [...]

By |2019-02-13T17:24:54+00:00August 11th, 2016|JMS, Spring Boot|0 Comments

Docker & Spring Boot

Docker & Spring Boot Docker allows you to package an application with its dependencies, into a light weight, portable container that can run on almost any environment.  You can think of a Docker container as a run time, a mini virtual machine that encapsulates your application and its dependencies. In order to run a container you need a Docker image. An image is like a template that defines everything that will exist within the container. You can almost think of an container as a run time instance of the image it was created from. In this post we'll define and build 3 slightly different Docker [...]

By |2019-02-13T17:31:58+00:00July 22nd, 2016|Spring Boot|0 Comments
Go to Top