1. 自動裝配: 在xml中配置Bean的autowire屬性
autowire=“byName” / “byType” / “default”(需要在beans中配置default-autowire=“byName”)
2. spring2.5開始全面支持註解
容器中配置 <context:annotation-config/>
開啓屬性註解
1. 自動裝配: 在xml中配置Bean的autowire屬性
autowire=“byName” / “byType” / “default”(需要在beans中配置default-autowire=“byName”)
2. spring2.5開始全面支持註解
容器中配置 <context:annotation-config/>
開啓屬性註解