领先一步
VMware 提供培训和认证,助您加速进步。
了解更多这周我与 Joris 一起研究 Spring 2.1 的内容。我们正在准备一个使用所有三种方式进行依赖注入的示例。该示例不仅突出了依赖注入,还具有基于 Hibernate 的后端。
Spring 2.1 中的几个功能需要 ASM 字节码操作框架。Hibernate 也通过 CGLIB 使用 ASM。ASM 1.5.3 和 2.2.3 之间存在二进制不兼容性。前者由 Hibernate 使用,后者由 Spring 在各种场景中使用;特别是某些 AOP 功能和新的 @Autowired 功能。
更新:请先阅读解决方案 3!
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.1.ga</version>
<exclusions>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm-attrs</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>2.2.3</version>
</dependency>