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

عرض عملي: اكتشاف خطأ الاستدعاء الذاتي (Self-invocation)

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

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

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

في هذا الدرس

diagnose a transaction that never starts; prepares JNR-031-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Run the money-transfer exercise: a failure after debit leaves money missing.
  2. Check the code: transfer() calls this.debitAndCredit(), which has the annotation.
  3. Prove it with the transaction log (logging.level.org.springframework.transaction=TRACE): no transaction begins.
  4. Planned mistake: mark the private method @Transactional and show it still does nothing.
  5. Fix it by moving the method to another bean (or annotating the public entry point); re-run the failure test.

التطبيق

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

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

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

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