- 博客(17)
- 资源 (3)
- 收藏
- 关注
原创 java静态代码块输出顺序
class Parent { static { System.out.println("静态代码块Parent static"); } { System.out.println("构造代码块Parent {}"); } public Parent() { System.out.println("构造方...
2019-12-16 14:45:42 306 1
原创 PageBean封装分页对象
package com.cpy.common.util;import com.github.pagehelper.PageInfo;import java.beans.IntrospectionException;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;im...
2019-12-15 00:15:29 812 1
原创 PageJson分页数据对象实体
import com.alibaba.fastjson.JSONObject;import com.github.pagehelper.PageInfo;import java.beans.IntrospectionException;import java.lang.reflect.InvocationTargetException;import java.util.ArrayLis...
2019-12-15 00:14:28 809
原创 Java批量修改数据逻辑
List<samples> samples = dao.getSamples();if (samples.size() > 0) { final int total = samples.size();// 总记录数 final int batchSize = 10000; // 每次插入记录数 int toIndex = batchSize; /...
2019-12-04 09:27:25 1469
原创 Linux安装配置mysql
-- 检查是否安装mysql,如果已安装,以下都不要安装了rpm -qa | grep mysql-serversudo yum -y install mysql-serversudo vi /etc/my.cnf在[mysqld]节点下修改default-character-set的编码为utf8default-character-set=utf8-- 开机启动配置sudo...
2018-05-11 23:33:38 122
原创 实用工具类Tool
import java.io.Closeable;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.util.Map;import java.util.regex.Matcher;import java.util.regex.Pattern;im...
2018-05-11 22:35:36 709
原创 CookieUtil工具类
import org.apache.commons.lang3.StringUtils;import javax.servlet.http.Cookie;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class CookieUtil {...
2018-05-11 22:04:25 2532
原创 安装配置JDK
Linux环境下安装JDKcurl -o jdk-8u171-linux-x64.tar.gz http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz?AuthParam=1526018647_fad162587aec43471...
2018-05-11 21:48:24 223
原创 JavaBean和Map对象互转
import java.beans.BeanInfo;import java.beans.Introspector;import java.beans.PropertyDescriptor;import java.lang.reflect.Method;import java.util.HashMap;import java.util.Map;public class BeanToM...
2018-05-11 21:07:34 208
原创 日期转换工具类JodaTimeUtil
引入依赖包 <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.3</version> </dependency>
2018-05-11 20:56:34 1556
原创 Java通用JsonUtil
首先引入依赖包 <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.12</version> &a
2018-05-11 20:47:57 988
原创 Java中枚举的简单示例
public enum PaymentEnum { ONLINE_PAY(1, "在线支付"), CASH_ONLY(2,"现金支付"); PaymentEnum(int code,String value) { this.code = code; this.value = value; } private String value; p...
2018-05-11 20:14:56 476
原创 HTML特殊字符大全
HTML特殊字符大全<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>HTML特殊字符大全</title></head&
2018-05-05 16:47:08 1312
原创 雪花飞舞动画
雪花飞舞动画JQuery版<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>雪花飞舞动画</title> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jque
2018-05-05 16:39:10 320
原创 form表单内容转javascript对象
form表单内容转javascript对象,便于ajax提交数据function serializeFormObject(selector) { var a, o, h, i, e; a = $(selector).serializeArray(); o = {}; h = o.hasOwnProperty; for (i = 0; i < a...
2017-11-23 14:46:19 1372
原创 ios中设置view的圆角角度
// view为你要设置的视图- (void) setRoundCorners:(UIView *)view borderColor:(CGColorRef)color borderWidth:(CGFloat)width cornerRadius:(CGFloat)radius{[[view layer] setBorderColor:color]; // 设置边框颜色[[vie
2012-01-19 12:29:05 801
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人