Gradle – simple approach to adding external properties

Working on a project where the team would like to keep the project file standard for all projects, and have a second file to have custom properties

(gradle version 2.6)

within the build.gradle file I added the following file stub (top):

apply plugin: 'maven'
apply plugin: 'groovy'

if(new File("custom.gradle").exists()){
    apply from: 'custom.gradle'

and the contents of the custom.gradle file are as follows:


and now using the property within my script


Spring Cloud and Microservices Video

Just watched a video on the newer Spring projects that enable Microservices and Cloud based application development.

Definitely recommend watching the video!

Topics include:

Spring Cloud Config

“Spring Cloud Config provides server and client-side support for externalized configuration in a distributed system. With the Config Server you have a central place to manage external properties for applications across all environments.”

Config Server and Client

Spring Cloud Netflix

Some really interesting topics under Spring Cloud Netflix like:

  • Service Discovery: Eureka instances can be registered and clients can discover the instances using Spring-managed beans
  • Service Discovery: an embedded Eureka server can be created with declarative Java configuration
  • Circuit Breaker: Hystrix clients can be built with a simple annotation-driven method decorator
  • Circuit Breaker: embedded Hystrix dashboard with declarative Java configuration
  • Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
  • Client Side Load Balancer: Ribbon
  • External Configuration: a bridge from the Spring Environment to Archaius (enables native configuration of Netflix components using Spring Boot conventions)
  • Router and Filter: automatic regsitration of Zuul filters, and a simple convention over configuration approach to reverse proxy creation

SpringBoot – spring-boot-starter-mail

Quick Tutorial on setting up and using the spring-boot-starter-mail component.

I recently had to create a project that required sending simple emails to a single email address, so I thought I would see what Spring Boot had to offer, as this seems like something I shouldn’t have to reinvent.  Great News… I was quite pleased to see that this task would be 100% solved by setting a few properties (to get the mailSender up and running), and my simple controller action.

Watch Video to see in action

Source Code