Spring 实战-第二章-装配Bean
摘要:Bean是Spring对象的声明(装配wiring),要使用Spring,必须先装配需要使用的对象,有3种装配的方式 自动化装配Bean 自动化装配Bean很简单 1.声明接口 2.添加注解 @Component表明该类会作为组件类,并告知Spring要为这个类创建Bean。 3.增加配置,用于连接
阅读全文
posted @ 2017-08-30 17:55
posted @ 2017-08-30 17:55
posted @ 2017-08-24 16:32