Create Spring Boot Web project with Spring Tool Suite (in docker)

Опубликовано: 08 Февраль 2025
на канале: Xavier Dupont
100
0

In this video we create a single /hw endpoint (short for helloworld) with Spring Boot using Spring Tool Suite.


We do it in docker to have reproducible results, and so that everything happens as if were the first time.


openjdk and firefox are installed in the image build script, which is shown for reference, but Spring Tool Suite is downloaded and initialized from scratch.


We also add the Spring Web dependency manually to show how to add additional dependencies.


This connect the docker container to the running server using volumes to bind to the host's X11 socket, and the user id is the same in the container and in the host (id 1000).


00:00 Docker Intro
00:42 Download Spring Tool Suite
01:53 Extract and start Spring Tool Suite
02:42 Create new Spring Boot project
04:10 Add Spring Web dependency
04:58 Create hello world controller
05:46 Start the application
06:34 Fix the request mapping