Pre-requisites This guide assumes that you have already configured Ehcache, and is specifically concerned with programmatic addition and removal of elements. Adding an element to a cache @Autowired private CacheManager cacheManager; […] public Ehcache getCache(String name) { return cacheManager.getCache(name); } In the above example we…

This post will describe 3 of the main principles I use when coding. These principles help me to write clean, readable and manageable code. 1. Get out quick (Short-circuit methods) When writing methods, always be trying to return as soon as possible. Take the following…

Slack has made integration extremely easy! This tutorial will show you how to create a Slack app that will send messages to a specific Slack channel. Pre-requisites 1. This tutorial assumes you have already setup your Slack workstations and that you have admin privileges. Setup…

This will be needed when you want to start a development branch where the code is based on code that was committed in another branch and not the ‘Develop’ branch. Aside: If you already created the new branch incorrectly you can delete it using git branch -D…

If you are using GitFlow you will typically need to create a branch from ‘Develop’ to do your development work. To create the branch follow these steps: Clone the respository git clone git@bitbucket.org:example/example-repo.git Create the branch in the remote repository. Identify the repo with git branch (optional)…

Sigar is a Java library that allows you to monitor various aspects of your system. Including Network, Memory, and CPU. To use Sigar in you Java application follow these steps: 1. Copy the following Maven dependency into your project: <dependency> <groupId>org.gridkit.lab</groupId> <artifactId>sigar-lib</artifactId> <version>1.6.4</version> </dependency> 2.…

The following post will describe how to migrate all Accounts, Contacts, Tasks and Notes from SugarCRM to SalesForce whilst maintaining their relationships with one another. More specifically; preparing the .csv import files for importing into the Jitterbit data loader. Step 1. Create a custom field…

In some cases, there may be a need for you to write native SQL. Typically you may use a framework such as Spring JDBC for this, but if you already have an ORM framework that allows you to perform native queries, although, in an arguably…

Generate a self-signed certificate using Keytool Use the following command to generate a self-signed RSA certificate that can be used during development to test your application under HTTPS. keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 7300 For production, you…