
Due to (several) security concerns, this is not recommended in a production environment. The code (Dockerfile and docker-compose.yml) can also be found here.

For this I will use Spring Tool Suite as an example. I’ll explain several of the issues you might encounter and how to solve them. Running GUI applications like for example an IDE from a Docker container, can be challenging. Import .annotation.Running an application within a Docker container helps in isolating the application from the host OS. Src/main/java/netgloo/controllers/MainController.javaĬontaining the following code: package ntrollers Create a new folder “controllers” in “src/main/java/netgloo” and add a java class “MainController” inside that folder:.Now you should get a project structure like this: basewebapp/ Will be downloaded a basic project template from the Spring web site.Search and select the “Web” dependency, then click Finish. Note: Group and Artifact are from Maven, and here there is a brief explanation if you want to follow their conventions. Package name: the java root package name (e.g.Description: a brief human readable description (e.g.Artifact: the name of the jar file (e.g.Group: a group name for your projects (e.g.Right click on the project panel (or go on Menu > File) then New > Spring Starter Project.This post show you how to build a basic web application with Spring MVC + Spring Boot using Spring Tool Suite (STS).įirst will be created a base starting project from Eclipse, then a very simple controller will be added returning a string as view content, and finally will be show how to serve an html file from the controller.
