فحص المكونات والأنماط الوسمية
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
say how beans are found and which stereotype to use.
الموضوعات المخطط لها
@SpringBootApplicationincludes component scanning of its own package and sub-packages.- Stereotypes:
@Componentgeneric,@Servicebusiness logic,@Repositorydata access,@Controller/@RestControllerweb. - They all create beans; the names add meaning and some extra behavior (
@Repositorytranslates database exceptions). - A class outside the scanned packages is not found.
تفاصيل المخطط المبدئي
عرض عملي
com.shop.api.ShopApiApplication scans com.shop.api.**; a class in com.shop.other is missed.
اختبر فهمك
Where must the main class live?
أظهر الإجابة
In the top package above all your code.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.