/Spring

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

Spring Batch Tutorial

Spring Batch Tutorial Spring batch is a lightweight framework that provides a solid foundation on which to build robust and scalable batch applications. It provides developers with a set of tried and tested patterns that solve common batch problems and allows developers to focus more on the business requirement and less on complex batch infrastructure. Spring batch contains a variety of out of the box configurable components that can be used to satisfy many of the most common batch use cases. Extensive XML configuration and an extensible programming model mean that these components can be customised and used as building blocks to quickly deliver common [...]

By |2019-02-20T07:28:02+00:00April 18th, 2014|Spring, Spring Batch|15 Comments

Spring AOP Tutorial

Spring AOP Tutorial Application logic can be broken into 2 distinct areas, core business logic and cross cutting concerns. Business logic is code written to satisfy a functional requirement, while a cross cutting concern is 'utility' logic that is agnostic to a specific business process but required by many parts of the application. Examples include logging, transaction management, performance monitoring and security. While none of these address a functional requirement, they remain fundamental parts of the application. Cross cutting concerns present 2 main challenges. They tend to be 'scattered' across the application which can lead to considerable duplicate code. Logging or performance monitoring is a good example. They [...]

By |2019-02-20T07:51:13+00:00April 23rd, 2013|Spring|5 Comments

Spring Web Services Tutorial

Spring Web Services Tutorial I've recently written a more up to date version of this post which describes how to build a contract first web service using Apache CXF. Check it out here. SOAP Services Modern enterprise applications are rarely stand alone and often rely on data and services provided by external systems. In order for different types of systems to communicate there must be a  communication protocol of some sort, a standard way of sending and receiving messages in a format that is recognised and supported by all major platforms. SOAP (Simple Object Application Protocol) is such a protocol, and allows applications to communicate by exchanging [...]

By |2019-02-20T17:03:03+00:00January 14th, 2013|Spring, Web Services|118 Comments

Spring JMS Tutorial with ActiveMQ

Spring JMS Tutorial with ActiveMQ In this post I'll look at Springs messaging support and how it can be used to integrate with Message Oriented Middleware (MOM) offerings such as Apache ActiveMQ. Although the sample application in this post will use ActiveMQ as its message broker, the application itself is vendor agnostic and can  integrate with any JMS compliant messaging platform. I've kept the application as loosely coupled from ActiveMQ as possible and will highlight the bits that would need to change if you were to choose another message platform such as IBM MQSeries. Tech Stack The sample code in this post will be built and [...]

By |2019-02-20T17:16:58+00:00September 17th, 2012|JMS, Spring|61 Comments