Skip to content
Ameen Abozaid
Planned lessonJNR-050-L04

Spring Boot's Compose integration

  • Lesson 4 of 5
  • Junior
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

let Spring Boot start the stack during development.

Planned topics

  • Spring Boot (3.1 or later; verify version before recording) can detect compose.yaml and run docker compose up when the app starts.
  • Add the spring-boot-docker-compose dependency (development scope).
  • It creates connection details for known services such as PostgreSQL, so you need not hard-code URLs.
  • On shutdown it stops the containers, controlled by spring.docker.compose.lifecycle-management.
  • It is a development tool; production uses the real configuration.
Draft outline details

Demonstration

the Maven dependency and the app logs "Started docker compose" and then connecting to the database port chosen by Compose.

Check your understanding

Is Compose integration meant for production?

Show answer

No; it is for development.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.