Adding Spring Boot Actuator Metrics to a Jersey App

Spring Boot Actuator adds a number of health monitoring endpoints to support monitoring of your Spring Boot based applications. To add to an existing Spring Boot app, you just add a dependency on spring-boot-starter-actuator as described here.

This works out of the box for a Spring MVC based Spring Boot app, but if you’re building JAX-RS endpoints using Jersey, by default the Jersey resources and Actuator resources both get mapped to the root ( / ), so you need to map either Jersey or Actuator to something other than /. You can easily re-map Actuator be adding this line to application.properties (change /system as needed):

server.servlet-path=/system

This is described here: http://docs.spring.io/spring-boot/docs/current/reference/html/howto-actuator.html#howto-use-actuator-with-jersey

VNC remote desktop to a Raspberry Pi

I normally ssh into my remote Raspberry Pi’s, but if you don’t have then attached to a monitor and need to get a desktop view of what’s going on, a VNC remote connection works great. Step by step instructions here.

Changing your git client password to github.com on OS X / adding Personal Access Token for git client

Just ran into this as I had changed my account password a few days back, and the approach to change your password for your git client on OS X is not that obvious. At the same time I enabled Two Factor Authentication for my github account. When using with a command-line git client, this also requires generating a Personal Access Token and passing it with your authentication.

Instructions in this post here – you need to change your password in the Keychain Access app.

Create a Personal Access Token following steps here.

Next, when adding a remote for the repo, pass the token like this:

git remote add github https://github-id:access-token@github.com/path-to/remote-repo.git

Now when you push to the remote repo, you’ll be authenticated with your token, and should be all set.