上一页 1 2 3 4 5 6 7 8 9 ··· 20 下一页

2017年5月17日

mysql重连,连接丢失:The last packet successfully received from the server--转载

摘要: 1.1 错误信息: 1.2 解决方法 - 如果使用的是JDBC,在JDBC URL上添加?autoReconnect=true,如: - 如果是在Spring中使用DBCP连接池,在定义datasource增加属性validationQuery和testOnBorrow,如: - 如果是在Sprin 阅读全文

posted @ 2017-05-17 11:18 AlexGeng 阅读(8198) 评论(1) 推荐(0) 编辑

2017年5月2日

Listener 监听Session内的对象

摘要: Listener用于监控Session内的对象,分别是HttpSessionBindingListener与HttpSessionActivationListener。它们的触发时机分别为: HttpSessionBindingListener:当对象被放到Session里时执行valueBound 阅读全文

posted @ 2017-05-02 22:50 AlexGeng 阅读(241) 评论(0) 推荐(0) 编辑

2017年4月18日

Listener 监听对象的属性变化

摘要: Listener用于监听Session、context、Request的属性变化,接口名称格式为xxxAttributeListener,包括HttpSessionAttributeListener、ServletContextAttributeLIstener、ServletRequesAttri 阅读全文

posted @ 2017-04-18 22:29 AlexGeng 阅读(799) 评论(0) 推荐(0) 编辑

Listener 监听对象的创建和销毁

摘要: HttpSessionListener、ServletContextListener、ServletRequestListener分别用于控制Session、context、request的创建和销毁。触发时机分别为: HttpSessionListener:监听Session的创建和销毁。创建se 阅读全文

posted @ 2017-04-18 22:19 AlexGeng 阅读(1537) 评论(0) 推荐(0) 编辑

2017年4月9日

Java以UTF-8编码读写文件

摘要: java中文件操作体现了设计模式中的装饰者模式 。 以utf-8编码写入文件: FileOutputStream fos = new FileOutputStream("test.txt"); OutputStreamWriter osw = new OutputStreamWriter(fos, 阅读全文

posted @ 2017-04-09 11:35 AlexGeng 阅读(20596) 评论(0) 推荐(0) 编辑

2017年4月6日

caller和callee的区别

摘要: caller返回一个函数的引用,这个函数调用了当前的函数;callee放回正在执行的函数本身的引用,它是arguments的一个属性 callercaller返回一个函数的引用,这个函数调用了当前的函数。使用这个属性要注意:1 这个属性只有当函数在执行时才有用2 如果在JavaScript程序中,函 阅读全文

posted @ 2017-04-06 10:35 AlexGeng 阅读(262) 评论(0) 推荐(0) 编辑

Java中String与byte[]的转换

摘要: String s = "fs123fdsa";//String变量 byte b[] = s.getBytes();//String转换为byte[] String t = new String(b);//bytep[]转换为String 做JAVA经常会碰到中文乱码问题,还有各种编码的问题,特别是 阅读全文

posted @ 2017-04-06 10:10 AlexGeng 阅读(534) 评论(0) 推荐(0) 编辑

2017年4月1日

mybatis example 使用AND 和OR 联合查询

摘要: mybatis example 使用AND 和OR 联合查询 生成代码如下: 阅读全文

posted @ 2017-04-01 11:19 AlexGeng 阅读(11162) 评论(0) 推荐(0) 编辑

2017年3月30日

Unicode编码:保存中文cookie

摘要: 中文和英文字符不同,中文属于Unicod字符,在内存中站4个字符,而英文属于ASCII字符,内存中只占2个字符。Cookie中使用Unicode字符时需要对Unicode字符进行编码,否则会乱码。编码使用java.net.URLEncoder类的encode(String str,String en 阅读全文

posted @ 2017-03-30 16:14 AlexGeng 阅读(3401) 评论(0) 推荐(0) 编辑

2016年10月17日

linux的文件种类与扩展名

摘要: 一、文件种类: 1.普通文件(regular file)第一个字符为[ - ] 包括:①纯文本档(ASCII):这是Linux系统中最多的一种文件类型,称为纯文本档。是因为内容为我们人类可以直接读到的数据,例如数字、字母等等。 ②二进制文件(binary): 你的Linux中的可执行文件(scrip 阅读全文

posted @ 2016-10-17 18:04 AlexGeng 阅读(3799) 评论(0) 推荐(1) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 20 下一页

导航