- 博客(13)
- 收藏
- 关注
转载 hibernate的强转类型
Query query1 = session.createSQLQuery("select count(*) from user u where u.name like ? ").setParameter(0, "%lis%") ; Query query2 = session.createQuery("select count(*) from User ") ; Sysstem...
2018-04-02 15:19:00 132
转载 (教训) form表单提交时,action url中参数无效
今天提交一个表单,内容参考如下: <form action="web?a="+id> <input type="hidden" name='user_id' value="46" /> <input type="hidden" name='user_name' value="name" /> ... <input...
2018-03-29 14:28:00 293
转载 工作心得
1、尽可能的将代码进行优化; 2、尽可能的让代码可以通用; 3、尽可能的将代码进行可重复调用; 4、尽量不要太多的使用js代码。 为了减少代码的更改: 将菜单的数据向数据库进行转移,并为了用户体验,将数据提前加载到内存中去,方便获取。 技术: 使用监听器,将数据放入内存中,前端进行解析。 转载于:https://www.cnblogs.com/df1151...
2018-02-26 15:43:00 73
转载 Jsoup爬虫最终修订版
package com.zdf.jsoup; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.jsoup.nodes.Docum...
2018-02-14 18:00:00 84
转载 关于spring整合velocity之后的Jsoup爬数据使用fastjson的一些小问题
1、导入jar包 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.o...
2018-02-14 10:46:00 85
转载 时间的一些格式的转换
@Test public void test4() { Calendar instance = Calendar.getInstance(); 强调将得到具体的时间 instance.set(instance.get(Calendar.YEAR),instance.get(Calendar.MONTH),instance.get(Calendar.DAY_OF_MONTH),9,0...
2018-02-11 16:47:00 113
转载 发送邮件
1.导入jar包 <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-email</artifactId> <version>1.3.3</version> </dependency&g...
2018-02-11 16:18:00 137
转载 加载properties配置文件
配置文件的路径为根路径: //获取该配置文件的相对路径 String path = SysTemplate.class.getClassLoader().getResource("generator.properties").getPath(); File file = new File(path); Properties pps = new Properties();...
2018-02-06 11:44:00 102
转载 String的一些方法
1、将个位数以零补位 @Test public void Test3() { for (int i = 0; i < 11; i++) { String format = String.format("%1$02d", i); System.out.println(format); } } 输出结果:00, 01, 02, 03, 0...
2018-02-06 09:46:00 71
转载 html中文乱码问题解决
html已经添加了 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 可是还是中文乱码, 这个时候你需要去你的eclipse的工作空间找到该项目下的这个html文件,然后打开设置编码格式为utf-8就可以解决了。 转载于:https://www.cnblogs.com/df115...
2018-02-05 18:02:00 74
转载 一个404异常信息的解决方案
以前使用Spring Mvc时候都是返回jsp页面,今天想返回html页面, 结果一直报页面一直报404,log日志报Did not find handler method for [/index.html],但是改成jsp就可以正常运行了。 原因是: servlet容器通过这个请求的流程如下: 首先由Servlet容器调用DispatcherServlet。 Disp...
2018-02-05 17:11:00 239
转载 File工具类
ctrl+o查看该类的方法属性等信息 属性separatorChar--》 系统依赖的默认名称分隔符。这个字段是 初始化以包含系统值的第一个字符。 属性<code> file.separator > < /code>。在UNIX系统上,这个值。 字段<code> ' / ' > &l...
2018-02-02 11:37:00 76
转载 mysql数据库
sql语句的关键词: create table tbl_mim_card( id int not null auto_increment, id_type char(20) colleate gbk_bin comment "证件类型", ) collate:指定排序规则,可以写在任何sql语句的各个部分,比如:orderBy后,Group b...
2018-02-02 09:33:00 67
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人