摘要:
ApplicationContext ac=ClassPathXmlApplicationContext("beans.xml"); 阅读全文
摘要:
ApplicationContext:创建对象采用立即加载的方式。 BeanFactory:创建对象采用延迟加载的方式。 阅读全文
摘要:
ClassPathXmlApplicationContext:它可以加载类路径下的配置文件,文件必须在类路径下。 FileSystemXmlApplicationContext:它可以加载磁盘任意路径下的配置文件,必须有访问权限。 AnnotationConfigApplicationContext 阅读全文
摘要:
package com.example.ui; import com.example.factory.BeanFactory; import com.example.service.IAccountService; import com.example.service.impl.AccountSer 阅读全文
摘要:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 阅读全文
摘要:
官网:http://spring.io/ 下载地址:http://repo.springsource.org/libs-release-local/org/springframework/spring 阅读全文
摘要:
package com.example.ui; import com.example.factory.BeanFactory; import com.example.service.IAccountService; /** * 模拟一个表现层,用于调用业务层 */ public class Clie 阅读全文
摘要:
package com.example.ui; import com.example.factory.BeanFactory; import com.example.service.IAccountService; import com.example.service.impl.AccountSer 阅读全文
摘要:
package com.example.service.ui; import com.example.service.IAccountService; import com.example.service.impl.AccountServiceImpl; /** * 模拟一个表现层,用于调用业务层 阅读全文
摘要:
降低依赖-编译期不依赖,运行期才依赖 1. 编译器依赖 package com.example.jdbc; import java.sql.*; public class JdbcDemo { public static void main(String[] args) throws SQLExce 阅读全文