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/>
开启属性注解