تكامل Spring Boot مع Compose
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
let Spring Boot start the stack during development.
الموضوعات المخطط لها
- Spring Boot (3.1 or later; verify version before recording) can detect
compose.yamland rundocker compose upwhen the app starts. - Add the
spring-boot-docker-composedependency (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.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.