/Spring

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|4 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

Spring Boot & Amazon Web Services (EC2, RDS & S3)

Spring Boot & Amazon Web Services (EC2, RDS & S3) This post will take you through a step by step guide to building and deploying a simple Java app in the AWS cloud. The app will use a few well known AWS services which I'll describe along the way. There is quite a bit to cover in this post so the overview of the AWS services will be light. For those interested in finding out more I'll link to the appropriate section of the AWS documentation. Amazon have done a fine with their documentation so I'd encourage you to have a read if time permits. [...]

By |2019-02-18T07:22:22+00:00May 3rd, 2016|AWS, Spring Boot|56 Comments

Spring Boot REST Tutorial

Spring Boot REST Tutorial Spring Boot makes it easier to build Spring based applications by focusing on convention over configuration.  Following standard Spring Boot conventions we can minimise the configuration required to get an application up and running. The use of an embedded Servlet container allows us to package the application as an executable JAR and simply invoke it on the command line to launch the application. One of my favourite things about Boot is its emphasis on production readiness. Out of the box it provides a number of key non functional features, such as metrics, health checks and externalised configuration. In the past these [...]

By |2019-02-18T07:23:41+00:00December 1st, 2015|REST, Spring Boot|11 Comments

Externalising Spring Configuration

Externalising Spring Configuration Enterprise applications typically contain a number of  properties and  runtime resources that must be configured before the application is deployed. Property and resource values can either be baked into the artefact at build time using something like Maven Profiles or derived at runtime using Spring Profiles. My preferred approach is to externalise all configuration so that the artefact taken from the build server is environment agnostic and can be deployed onto any environment . For example, we could take a WAR file from our build server and  deploy it to our development, UAT or production environments without changing any configuration in the WAR file itself. Application Property [...]

By |2019-02-19T17:14:02+00:00May 6th, 2014|Spring|1 Comment