spring bean配置文件(spring基础二)

背景:今天看了spring测试工程bean的xml配置文件,整体复习一下bean基础。 我目前常见bean属性:id,class,property这三个。 1.id和class id:是这个bean在全局的唯一标识。 class:是被@server注解的类的位置,一般包名+类名。 举个例子: 定义一个抽象接口,被@server注解[email protected]和@Component都是用来注解
相关文章
相关标签/搜索