170923_Spring英文文档阅读(十四)_2.3 Usage scenarios_Dependency Management and Naming Conventions(一)

来源:互联网 发布:易语言dnf辅助源码模板 编辑:程序博客网 时间:2024/05/17 23:54

这里写图片描述

Dependency Management and Naming Conventions

翻译:依赖管理和命名规范

Dependency management and dependency injection are different things.

翻译:依赖管理和依赖注入是不同的事物。

什么是依赖管理?

什么是依赖注入?

依赖管理和依赖注入的不同点?

To get those nice features of Spring into your application (like dependency injection) you need to assemble all the libraries needed (jar files) and get them onto your classpath at runtime, and possibly at compile time.

“assemble”的意思?

这里写图片描述

“onto”和“on”的区别?

这里写图片描述

“and possibly at compile time”具体怎么翻译?

并且可能在编译时

翻译:为了将Spring的这些不错的功能引入到应用程序(如依赖注入)中,您需要组装所有需要的库(jar文件),并在运行时,以及可能在编译时将它们存入您的类路径。

These dependencies are not virtual components that are injected, but physical resources in a file system (typically).

翻译:这些依赖关系不是注入的虚拟组件,而是文件系统中的物理资源(通常为)。

The process of dependency management involves locating those resources, storing them and adding them to classpaths.

依赖管理进程包括定位这些资源,储存它们并将其添加至类路径之中。

Dependencies can be direct (e.g. my application depends on Spring at runtime), or indirect (e.g. my application depends on commons-dbcp which depends on commons-pool).

什么是commons-dbcp(DataBase Connection Pool,数据库连接池)?

由Apache提供的主流数据库连接池之一(DBCP、c3p0、proxool),单独使用DBCP需要使用commons-dbpc.jar、commons-collections.jar、commons-pool.jar三个包.

翻译:依赖关系可以是直接的(例如:我的应用程序在运行时依赖于Spring),或者是间接的(例如:我的应用程序依赖于依赖commons-pool的commons-dbcp)。

The indirect dependencies are also known as “transitive” and it is those dependencies that are hardest to identify and manage.

翻译:间接依赖关系也被称为“传递性”,它们是最难识别和管理的依赖关系。

阅读全文
0 0
原创粉丝点击