Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7009339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:50:59+00:00 2026-05-27T21:50:59+00:00

See the top answer to this question: What exactly is Spring Framework for? Im

  • 0

See the top answer to this question: What exactly is Spring Framework for?

Im at loss as to what the problem is, and why Springs solution of putting specifying what implementation of the interface to use inside an XML file (or using annotations) is better than simply having a line of code instantiate the correct interface?

EDIT: As I wrote in one of my comments, Im genuinely trying to understand the benefits. I want to understand why Spring is useful. Im not advocating not using Spring or trying to provide reasons not to, rather, Im searching for reasons and trying to understand why it should be used. This post was not meant to encourage debate but straightforward and technical answers. I have now selected the shortest and most illustrative answer as the correct answer. I must say Im a bit surprised that the question was closed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:50:59+00:00Added an answer on May 27, 2026 at 9:50 pm

    If class A uses class B, DI takes the responsibility of providing the class B to the class A. It is commonly used for testing where Spring would provide a different B class (mock for example).

    Sure, you can do all this yourself, but usually it’s less work if you let Spring (or any other DI framework) do this for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please go to: http://jlecologia.com/page1c.html to see the problem The top box look fine but
I'm new to Quartz2d so I hope this is an easy question to answer.
Once again I've searched for about 45 minutes for an answer to this question
I can see this question (or a similar one) has been asked a few
When you run top and see all running processes, I've always wanted to know
near the top of the code i see things like, btn_dropdown._visible = false; mcMenuBkg._visible
I often use the top command to see what is taking up resources. Mostly
Off the top of my head, I don't see any reason why you couldn't
I'm plotting on top of an image in Matlab. Sometimes, I can't see what's
(see here for the problem I'm trying to solve) How do you get hibernate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.