摘要: IOC创建对象的方式 1.默认使用无参构造创建对象,如果没有则报错 2.假设要使用有参构造创建对象 ​ 1.直接通过参数来设置 <bean id="user" class="com.liqiliang.pojo.User"> <!--默认无参构造创建对象--> <!-- <property name 阅读全文
posted @ 2020-05-09 19:33 阿亮在努力 阅读(190) 评论(0) 推荐(0)
摘要: HelloSpring spring入门及概述 package com.liqiliang.pojo; public class Hello { private String str; public String getStr() { return str; } public void setStr 阅读全文
posted @ 2020-05-09 17:26 阿亮在努力 阅读(201) 评论(0) 推荐(0)
摘要: IOC理论推导改进之后的代码 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XML 阅读全文
posted @ 2020-05-09 17:23 阿亮在努力 阅读(98) 评论(0) 推荐(0)
摘要: IOC理论推导 1.UserDaoImpl接口 package com.liqilaing.dao; public interface UserDao { void getUser(); } 2.UserDaoImpl实现类 package com.liqilaing.dao; public cla 阅读全文
posted @ 2020-05-09 16:04 阿亮在努力 阅读(142) 评论(0) 推荐(0)