What are the minimum dependencies required to just use Spring's dependency injection (core framework only)? I'm using Spring for a standalone application, and I'd like to minimize the number of dependencies that I have to ship with the application.
I suppose I could systematically remove a Jar and see if the application breaks, but it would be much better if someone had a definitive answer.
Oh, and I'm using Spring 2.5.
Dependencies, inherited from the spring-boot-dependencies POM. Sensible resource filtering. Sensible plugin configuration.
Spring MVC Dependencies to pom. We need to add spring-web and spring-webmvc dependencies in pom. xml, also add servlet-api, jsp-api and jstl dependencies.
There are two types of Spring Dependency Injection. They are: Setter Dependency Injection (SDI): This is the simpler of the two DI methods. In this, the DI will be injected with the help of setter and/or getter methods.
Constructor based Injection -When container call the constructor of the class. It should be used for mandatory dependencies.
Check out the readme.txt
that comes with the download of Spring 2.5.
Assuming you don't have AOP, JDBC, Transactions, or ORM, then your best bet is probably:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With