Use existing constants instead of user-written values

It's preferred to use constants instead of user-written strings, which are more error prone.

Some of these are the [MediaType](http://docs.spring.io/spring/docs/4.0.3.RELEASE/javadoc-api/org/springframework/http/MediaType.html), which currently includes a static version of the string and the [TimeUnit](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeUnit.html).