انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-050-L04

تكامل Spring Boot مع Compose

  • الدرس 4 من 5
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

let Spring Boot start the stack during development.

الموضوعات المخطط لها

  • 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.
تفاصيل المخطط المبدئي

عرض عملي

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

اختبر فهمك

Is Compose integration meant for production?

أظهر الإجابة

No; it is for development.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.