Почему внедрение зависимостей на основе установщика весной предназначено для необязательных зависимостей, хотя всегда выJAVA

Программисты JAVA общаются здесь
Гость
Почему внедрение зависимостей на основе установщика весной предназначено для необязательных зависимостей, хотя всегда вы

Сообщение Гость »


Why is setter-based dependency injection in spring is meant for optional dependencies even though the same setter method is always called whenever the main class is initialized?

Why is setter-based DI is for optional dependencies and constructor-based DI is for mandatory dependencies - when, as I understand, Spring will always provide the dependent beans whenever the main class is initialized?


Источник: https://stackoverflow.com/questions/780 ... al-depende

Вернуться в «JAVA»