摘要:
JavaConfig是Spring的一个子项目,在Spring4之后, POJO类 package com.wang.POJO;import lombok.Data;import org.springframework.beans.factory.annotation.Value;import or 阅读全文
摘要:
在Spring4之后,要使用注解开发,必须要保证aop包的导入 使用注解 1.bean 2.属性如何注入 import lombok.Data; import org.springframework.beans.factory.annotation.Value; import org.springf 阅读全文
摘要:
自动装配是Spring满足bean依赖的一种方式! Spring会在上下文中自动寻找,并自动给bean装配属性! 在Spring中有三种装配的方式: 1.在xml中显式的配置 pojo类 public interface makevoice { public void makevoice(); } 阅读全文
摘要:
Spring官方,Beans作用域类型 ScopeDescription singleton (Default) Scopes a single bean definition to a single object instance for each Spring IoC container. pr 阅读全文