領先一步
VMware 提供培訓和認證,以加速您的進展。
了解更多這週我和 Joris 一起研究 Spring 2.1 的東西。我們準備了一個範例,使用所有三種方法來進行依賴注入。這個範例不僅突顯了依賴注入,還包含一個基於 Hibernate 的後端。
Spring 2.1 中的幾個功能需要 ASM 位元組碼操作框架。 Hibernate 也透過 CGLIB 使用 ASM。 ASM 1.5.3 和 2.2.3 之間存在二進位不相容性。前者被 Hibernate 使用,後者被 Spring 在各種情況下使用;特別是在某些 AOP 功能和新的 @Autowired 功能中。
更新:請先閱讀解決方案三!
<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>