What is the use of @component in Java?

@Component is an annotation that allows Spring to automatically detect our custom beans . In other words, without having to write any explicit code, Spring will: Scan our application for classes annotated with @Component. Instantiate them and inject any specified dependencies into them.

Sizin İçin Seçtik  What are the components and containers in Swing?

Leave a Reply

Your email address will not be published. Required fields are marked *

What is the use of component in Java?

A component is the fundamental user interface object in Java. Everything you see on the display in a Java application is a component. This includes things like windows, panels, buttons, checkboxes, scrollbars, lists, menus, and text fields. To be used, a component usually must be placed in a container.

Sizin İçin Seçtik  SSD sıcaklığı kaç olmalı?

Leave a Reply

Your email address will not be published. Required fields are marked *