随笔分类 - Spring 笔记
摘要:方法二:返回object,使用工具类自动添加回调函数
阅读全文
摘要:1. 在source中添加资源文件 resource.properties 2. applicationContext-dao.xml 中添加 <!-- 加载配置文件 --> <context:property-placeholder location="classpath:resource/*.p
阅读全文
摘要:1. 加入 Spring 1). 加入 jar 包 2). 配置 web.xml 文件 3). 加入 Spring 的配置文件. new一个spring 配置文件: applicationContext.xml (eclipse集成spring, 插件springsource-tool-suite-
阅读全文
该文被密码保护。
摘要:1. 准备工作 1> 添加接口 BookShopDao package com.tx; public interface BookShopDao { //根据书号获取书的单价 public int findBookPriceByIsbn(int isbn); //更新书的库存, 使书号对应的书的库存
阅读全文
摘要:1. 新建资源文件 db.properities 2. 新建配置文件 bean-jdbc.xml <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSourc
阅读全文
摘要:1. 通过 xml 赋值给 bean <bean id="user" class="com.test.User"> <property name="name" value="张三"></property> <property name="age" value="20"></property> <pr
阅读全文