servlet一些问题

spring配置文件中bean有多个属性,class属性必须指向实现类,只有实现类才可以new,一个接口没办法new
默认是单例模式
只有从spring容器中拿出来的bean才能使用 才被称作bean  想要使用spring中的bean必须从spring中拿,不能直接不注入就使用
想要注入 必须通过他们之间的依赖

 property (属性) 相当于class所指向类中的属性 name指class中属性的名字  (

property是bean的class中存在的属性。其中property的name属性对应class所指向的类的属性的
名字ref指向的是bean的id。

)

原文地址:https://www.cnblogs.com/nuliyao123/p/14462470.html