spring的配置文件 以及Spring 连接数据池
摘要:spring api 多个用id 一个用.class getBean第一种通过id获取 第二种获取类的只要是这个类都获取 Spring 连接数据池 @Test //通过Spring配置文件 连接c3p0数据池 public void test4() throws Exception{ Applica
阅读全文
posted @
2021-11-25 13:45
ziwang520
阅读(60)
推荐(0) 编辑
Spring-第二节- 注入依赖
摘要:set方法注入依赖 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchem
阅读全文
posted @
2021-11-23 13:00
ziwang520
阅读(33)
推荐(0) 编辑
Spring-第一节
摘要:Spring 1 导入坐标 2 创建Bean 3 创建applicationContext.xml配置文件 4 在配置文件当中配置bean 5 创建applicationContext对象 通过getBean方法获取对应id的类 package com.jc.dao.Demo; import com
阅读全文
posted @
2021-11-22 11:36
ziwang520
阅读(37)
推荐(0) 编辑