Install JIRA Service Desk

Today I attempted to install JIRA Service Desk 3.1.2 on Linux.  There were a few bumps in the road, so this post is intended for my future self, and perhaps you so we don’t have to go searching too far for answers.

I make no assumptions of whether or not your environment is secure, nor do I make any guarantee that the steps I’ve outlined are in themselves the best approach for a secure installation. Continue reading “Install JIRA Service Desk”

Encrypting and Decrypting Configuration Property Values in Spring Cloud

As a follow up to my recent post on Microservices with Spring Cloud, this post will cover encrypting and decrypting config property values.  The Spring Cloud docs cover this aspect briefly, so I’ll go through the steps I took to get this working both in test on my laptop, and on a dev server.  I’ll be using the same environment as my last blog post, so that is a standalone Eureka server, a config server, and simple microservice.  Full disclosure, I am by no means a security expert, so if you see something wrong, feel free to let me know. Continue reading “Encrypting and Decrypting Configuration Property Values in Spring Cloud”

Microservices with Spring Cloud

Last week, I attended ConFoo in my home town of Montreal.  There were lots of people in attendance from various programming backgrounds, so plenty to take in.  I was particularly blown away when I attended a session by @DavidOstrovsky which covered Elasticsearch and Kibana.  Let’s just say my days of creating dashboards are soon coming to an end.

On the second day of the conference, I had a chance to sit with Josh Long and Mark Heckler from Pivotal.  Mark opened the day with a fun keynote on cloud connected robots.  Later that afternoon, I attended Josh’s inspiring talk about Cloud Native applications using Spring Cloud, in which he squeezed a lengthy demonstration into a tight 45 minute timeline.  He even took time for water, so yes, he is human:)

While at ConFoo, I attended a session by James Chambers (a fellow Canadian) about working remotely from home.  In that talk, James spoke briefly about the time he takes to invest in himself.  He noted that blogging was a discipline he’s developed, as a way to teach himself.  This statement struck a cord with me because I realized that’s one of the primary reasons I blog.  It forces me to understand something since I’m hopefully going to help someone else learn about it too.

With that said, this blog post is my attempt to demonstrate some of what I learned when I got home and started hacking away with Spring Cloud and everything I had learned in Josh’s talk.  I won’t go through everything in this post, but by the end, you’ll see how to setup a Eureka server, a config server, an additional microservice, and propagate configuration changes.  I will leave things like load balancing and circuit breakers for a later post.

Continue reading “Microservices with Spring Cloud”

Spring Boot DevTools First Look

Back in June 2015, Phil Webb of the Spring Boot team announced Spring Boot DevTools, coming in Spring Boot 1.3.  Admittedly, I’m a bit late to the game here, so this post explores my first look into Spring Boot DevTools and how it applies to my workflow.

By simply adding a dependency for spring-boot-devtools, you get a lot of features out of the gate.


Continue reading “Spring Boot DevTools First Look”

EJS script templates with Spring Boot

Recently I’ve been hearing more and more about server side rendering of JavaScript applications being important. The idea of server side rendering isn’t anything new. Before the evolution of the single-page app paving the way for numerous JavaScript front-end frameworks like React, Angular, etc, most applications were rendered on the server.

My earliest exposure to server side rendering was a Perl script which allowed the collection of training surveys.  I was no expert in Perl, it wasn’t even taught to us when I was in college 15 years ago.  Following college, I started working with Java at my workplace and quickly came upon the Spring Framework.  Back then, pages were all rendered on the server using JSP.  There was support for some template engines like Velocity and FreeMarker which made some things a little easier.  Support for template engines in Spring has come a long way.  Thymeleaf being one of the more recently supported ones.  Since Spring 4.2, support for scripted views has been added.  This post will be a brief introduction to script views using Spring and Java 8’s Nashorn JavaScript engine.
Continue reading “EJS script templates with Spring Boot”

Head first ES6 with React, Browserify and Babel

Recently I hopped over to the React blog and in their latest article, they announced they were deprecating react-tools.  This had been a great tool for me, making use of it via gulp-react which has served me well to transform my JSX into plain JS.  In React’s post though, they mentioned about migrating to Babel which supports converting JSX to vanilla JS.  Babel’s website has some documentation on using Babel with various build systems.  In my case, I was using Gulp with Browserify.  For a complete working example head on over to Github.  This sample runs a Spark web application with embedded Jetty server.

React ES6 Modules

Traditionally, I would write modules in the following way and then use gulp-react to transform the JSX into plain JS.  Then pass the result through Browserify to bundle up all of my components and scripts.

var React = require('react');

var HelloWorld = React.createClass({
  render: function() {
    return <h1>Hello World!</h1>;

module.exports = HelloWorld;

Moving to ES6 module syntax and using Babel, there’s no longer a need for gulp-react.  This is the same module written in ES6.  The Babel team has written the Babelify transformer for Browserify, so in a single task, this code is transformed to plain JS and bundled up with all my other scripts.  You’ll need to keep in mind that React only supports ES6 classes as of version 0.13 which was recently released.

import React from 'react';

export default class HelloWorld extends React.Component {
  render() {
    return <h1>Hello World!</h1>;

Continue reading “Head first ES6 with React, Browserify and Babel”

Creating ReactJS mixin factories

If you do anything with ReactJS, chances are you’ve come across mixins in some form or another.  In a ReactJS app, mixins provide a way to compose your components out of building blocks, allowing you to reuse common logic.  The ReactJS documentation defines this as cross-cutting concerns.

Recently I started using RefluxJS, which provides mixins in the form of factories.  Why do you need a mixin factory?  Well that depends on your use case.  The benefit of using a mixin factory is that it allows you to pass information to the factory which constructs a mixin based on that information.    This way the mixin remains generic enough to be used in other ReactJS components while maintaining some flexibility as to what you can do with it.  Here’s an example of using RefluxJS mixin factories:

mixins: [Reflux.connect(MyStore, 'stateProp')]

The Reflux.connect method is a factory method that accepts a RefluxJS store as the first parameter, and accepts an optional second parameter for the state property name to bind data to.  If the second parameter is left out, the data returned from the store gets bound to the entire state of the component.  RefluxJS also has a “listenTo” factory method which allows you to specify a callback function to call instead of simply updating the state of the component.
Continue reading “Creating ReactJS mixin factories”