Features:
- Spring Boot runnable application with embedded Tomcat and deployable war
- Spring Boot Actuator with production grade services
- Automatic versioning in MANIFEST.MF and in resource /appversion read from build pipeline environment variable
- Environment detection using environment variable
se.caglabs.doodleshop.environment
- Environment specific configuration and log configuration using Spring profiles (application.yaml)
- Centralized logging with Logstash and rolling file logging
- Integration tests
- Flyway DB setup and migration
- Database H2, embedded if not specified external in application.yaml
$ mvn install
$ mvn -Pint-test verify
$ java -jar doodleshop.war
For specific environment, specify:
$ java -Dse.caglabs.doodleshop.environment=man -jar doodleshop.war
where se.caglabs.doodleshop.environment
is (local | autosmall | autolarge | man | prod)
The application has a few simple endpoints where you can store and read Doodles.
Create a doodle:
$ curl -H "Content-Type: application/json" -X POST -d '{"author":"Hoomer","message":"Ummm..."}' http://localhost:8080/doodles
Read created doodles:
$ curl http://localhost:8080/doodles?author=Homer
Have fun, Daniel Marell