A simple counter service.
Allows to create and update counters that are persisted and can be shared.
Build with mvn package
Run with java -jar target/counter-1.0-SNAPSHOT.jar
Returns HTTP 201
if successful, HTTP 409
if the counter exists already.
New counters are initialized with value 0.
Returns the value of the counter, or HTTP 404
if the counter does not exist.
All the following methods return HTTP 404
if the counter does not exist.
Increment the value of a counter by 1, returning the new value.
Decrement the value of a counter by 1, returning the new value.
Sets the counter value to the long provided in the body or in the query parameter, respectively, and returns it.
Returns HTTP 204
if successful, or HTTP 404
if the counter does not exist.