Câu hỏi phỏng vấn Spring
Câu hỏi

What do you mean by Auto Wiring?

Câu trả lời

Auto wiring in the Spring Framework refers to the framework's capability to automatically resolve and inject the dependencies needed by beans managed in the Spring container. This process is facilitated by the Spring Inversion of Control (IoC) container and is aimed at reducing the need for manual wiring of dependencies in your application configuration.

There are several modes of auto wiring in Spring:

  1. no: This is the default setting where no auto wiring is performed. You must explicitly set the dependencies using bean reference tags in your configuration file.
  2. byName: In this mode, the Spring container looks at the properties of the beans on which auto wiring is to be performed and tries to match and wire its properties with exactly the same name in the configuration file.
  3. byType: This mode instructs the container to wire the properties by matching and wiring by type. If more than one bean of the same type exists in the container, a fatal exception will be thrown.
  4. constructor: This mode is similar to byType but applies to constructor arguments. If there isn’t exactly one...
middle

middle

Gợi ý câu hỏi phỏng vấn

junior

Explain the @Controller annotation.

entry

What is Spring?

junior

How to integrate Java Server Faces (JSF) with Spring?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào