代码改变世界

Java 动态代理

2017-02-15 01:22 by 甘雨路, 280 阅读, 0 推荐, 收藏, 编辑
摘要:package cn.zr.proxy.dao; public interface PersonDao { public void eat(String name); } package cn.zr.proxy.dao.impl; import cn.zr.proxy.dao.PersonDao; public class PersonDaoImpl implements P... 阅读全文

mybatis 框架 的应用之四(一对一 与 一对多)

2017-02-15 00:32 by 甘雨路, 271 阅读, 0 推荐, 收藏, 编辑
摘要:lf-driver=com.mysql.jdbc.Driver lf-url=jdbc:mysql://localhost:3306/test?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8 lf-user=LF lf-password=LF ... 阅读全文

mybatis 框架 的应用之三(操作两张没有关联的表,存在主键和外键关系)

2017-02-14 11:41 by 甘雨路, 2061 阅读, 0 推荐, 收藏, 编辑
摘要:#注意:要配置开启多条语句操作,否则会报错( org.apache.ibatis.exceptions.PersistenceException) lf-driver=com.mysql.jdbc.Driver lf-url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&allowMultiQuer... 阅读全文

mybatis 框架 的应用之二(批量添加、实现分页查询)

2017-02-14 09:36 by 甘雨路, 1471 阅读, 0 推荐, 收藏, 编辑
摘要:lf-driver=com.mysql.jdbc.Driver lf-url=jdbc:mysql://localhost:3306/test lf-user=LF lf-password=LF NAME,AGE,AD... 阅读全文

hibernate 框架的简单使用

2017-02-12 22:36 by 甘雨路, 224 阅读, 0 推荐, 收藏, 编辑
摘要:com.mysql.jdbc.Driver jdbc:mysql:///test LF LF true true update ... 阅读全文

Java c3p0 连接 MySQL

2017-02-08 19:12 by 甘雨路, 3696 阅读, 0 推荐, 收藏, 编辑
摘要:root jdbc:mysql://localhost:3306/test com.mysql.jdbc.Driver 20 25 5 package cn.zr.testfilter.pojo; public class Use... 阅读全文

Oracle 复制表

2017-02-06 17:21 by 甘雨路, 194 阅读, 0 推荐, 收藏, 编辑
摘要:-- 复制表 create table newtable as select * from t_stu; select * from newtable; -- 复制表结构,但不复制数据 create table newt as select * from t_stu where 1=2; select * from newt; 阅读全文

web 应用中访问 Spring 具体实现

2017-02-06 10:39 by 甘雨路, 259 阅读, 0 推荐, 收藏, 编辑
摘要:user=LF password=LF jdbcUrl=jdbc:oracle:thin:@localhost:1521:orcl driverClass=oracle.jdbc.driver.OracleDriver initialPoolSize=15 maxPoolSize=30 minPoolSize=5 ... 阅读全文

oracle 创建表 外键约束

2017-02-05 17:07 by 甘雨路, 727 阅读, 0 推荐, 收藏, 编辑
摘要:create table usertable( id int primary key, username varchar(32) not null, birthday date, sex char(1), address varchar(256) ); create table orders( ... 阅读全文

oracle 通过序列实现某字段自增

2017-02-05 16:26 by 甘雨路, 1100 阅读, 0 推荐, 收藏, 编辑
摘要:-- 创建表 create table items( id int primary key, name varchar(32) not null, price int not null, detail varchar(100), pic varchar(512), createtime date ... 阅读全文
上一页 1 2 3 4 5 6 7 8 9 10 ··· 22 下一页