摘要:
测试 public class MyTest { ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); @Test public void test(){ BookServ 阅读全文
摘要:
一、IOC创建对象的三种方式 1、使用无参构造器,也是默认的创建方式 2、使用有参构造器 1)第一种:下标赋值 : <constructor-arg index="0" value="zhangsan"/> 2)第二种:类型赋值: <constructor-arg type="java.lang.S 阅读全文
摘要:
普通配置<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta 阅读全文