عرض عملي: نقطة دخول واحدة لأربع خدمات
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
put Shop behind one gateway. Prepares MID-035-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Add a
gatewayservice to Compose with routes forcatalog,orders,inventory, andpayments. - Call
GET localhost:8080/api/productsand see it routed tocatalog; show the headers added. - Add JWT validation; call
orderswithout a token and get401. - Add the rate-limit filter from MID-034.
- Planned mistake: leave the services' ports published in Compose. Call
localhost:8083directly and bypass the gateway. Fix: remove published ports so only the gateway is reachable, and make services validate tokens too. - Verify the correlation id header flows to all services.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.