什么是Spring对依赖注入的最小依赖性? [英] What is Spring's Minimum Dependencies for Dependency Injection?
问题描述
使用Spring的依赖注入(仅限核心框架)所需的最小依赖项是什么?我使用Spring作为一个独立的应用程序,我想尽量减少我必须随应用程序提供的依赖项数量。
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.
我想我可以系统地删除一个Jar并查看应用程序是否中断,但如果有人有明确的答案会更好。
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.
哦,我正在使用Spring 2.5。
Oh, and I'm using Spring 2.5.
推荐答案
查看Spring 2.5下载附带的 readme.txt
。
Check out the readme.txt
that comes with the download of Spring 2.5.
假设您没有AOP,JDBC,交易或ORM,那么您最好的选择可能是:
Assuming you don't have AOP, JDBC, Transactions, or ORM, then your best bet is probably:
- spring-core
- spring-beans
- spring-context
这篇关于什么是Spring对依赖注入的最小依赖性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!