Spring Dependency Injection and Autowiring -


I am new in spring core. I'm confused about dependency injection and auto wires.

Anyone can explain

  • What is DI in spring?
  • Why do we need a D in the Spring Configuration file?
  • According to the code, what is the difference between the two?
  • Can anyone provide sample code to understand both?

    I have the same question about auto stars too. Please tell me about these concepts Thank you.

    Dependency injection is a software design The pattern that implements the reversal of control and allows the dependence of a program design to follow the inverse principle (thus reverse the name of the control).

    It is difficult to interpret with some notes. Please watch videos of spring tutorials.

    Why do we need DI in the spring configuration file? Its just a feature that we can create objects from XML files. It can also be programmed with the DI, we can inject the essential commodities to the required sections. The objects will be immediately given in the configuration file using the bean definition.

    Go through the video, if any clarification is necessary, please comment.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -