

Add Gradle zipStatic task to ZIP up the application’s static assets for deployment to NGINX,.Add Gradle warNoStatic task to build WAR without static assets,.Modify MongoDB configuration class to work with non-local, containerized MongoDB instances,.Add unit tests for Continuous Integration demonstration purposes,.Move from Java 1.7 to 1.8 (including newer Tomcat version),.This project’s testing frameworks include the Spring MVC Test Framework, Mockito, Hamcrest, and JUnit.Ī few changes were made to the original Spring Music application, for this demonstration, including: The Java Spring Music application uses the following technologies: Java 8, Spring Framework, NGINX, Apache Tomcat, MongoDB, and the ELK Stack with Filebeat. All files necessary to build the Docker portion of the project are stored on the docker_v2 branch of the garystafford/spring-music-docker repository on GitHub. The project’s source code and all associated build files are stored on the springmusic_v2 branch of the garystafford/spring-music repository, also on GitHub. Instead of Cloud Foundry, this post’s Spring Music application is hosted within Docker containers on a VirtualBox VM, and optionally on AWS. The Spring Music application, a record album collection, was originally designed to demonstrate the use of database services on Cloud Foundry, using the Spring Framework. The project is based on a sample Java Spring application, Spring Music, available on GitHub from Cloud Foundry. This tutorial demonstrates how to build, test, deploy, and monitor a Java Spring web application, hosted on Apache Tomcat, load-balanced by NGINX, monitored by ELK, and all containerized with Docker.
