摘要:
对于其中的一些内容 @Repository(value="userDao") 该注解是告诉Spring,让Spring创建一个名字叫“userDao”的UserDaoImpl实例。 当Service需要使用Spring创建的名字叫“userDao”的UserDaoImpl实例时,就可以使用@Reso 阅读全文
摘要:
这次讲的是基于配置文件的方式(不适用注解方式) 1、因为没有使用注释。需要在xml的配置文件中添加bean。已确定bean实例。这样来在main得到相应的对象。 这是自己创建的需要使用的bean的文件在xml中的配配置。 2、之后再bean二等配置文件中。对自己写好的切片的bean也要在xml中进行 阅读全文