• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
流白的日记
博客园    首页    新随笔    联系   管理    订阅  订阅
02 2018 档案
工作心得

摘要:1、尽可能的将代码进行优化; 2、尽可能的让代码可以通用; 3、尽可能的将代码进行可重复调用; 4、尽量不要太多的使用js代码。 为了减少代码的更改: 将菜单的数据向数据库进行转移,并为了用户体验,将数据提前加载到内存中去,方便获取。 技术: 使用监听器,将数据放入内存中,前端进行解析。 阅读全文
posted @ 2018-02-26 15:43 流白的日记 阅读(113) 评论(0) 推荐(0)
Jsoup爬虫最终修订版

摘要:另外解释一下:html/text和val的区别: html添加带有标签的时候使用,text获取文本 val是只有当有value这个属性的时候才能使用比如:<input type="text" value="XX"></input>这个时候使用val() <span>您好!</span>这个时候使用t 阅读全文
posted @ 2018-02-14 18:00 流白的日记 阅读(109) 评论(0) 推荐(0)
关于spring整合velocity之后的Jsoup爬数据使用fastjson的一些小问题

摘要:1、导入jar包 2、代码编写 犯的错误: 1、虽然导入fastjson.jar但是没有在web.xml中配置转换,因此汇报No converter found for return value of type: class java.util.ArrayList 解决方案: 2、刚开始使用jsp来 阅读全文
posted @ 2018-02-14 10:46 流白的日记 阅读(310) 评论(0) 推荐(0)
时间的一些格式的转换

摘要:@Test public void test4() { Calendar instance = Calendar.getInstance(); 强调将得到具体的时间 instance.set(instance.get(Calendar.YEAR),instance.get(Calendar.MONT 阅读全文
posted @ 2018-02-11 16:47 流白的日记 阅读(170) 评论(0) 推荐(0)
发送邮件

摘要:1.导入jar包 <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-email</artifactId> <version>1.3.3</version> </dependency> <dependency> 阅读全文
posted @ 2018-02-11 16:18 流白的日记 阅读(189) 评论(0) 推荐(0)
加载properties配置文件

摘要:配置文件的路径为根路径: //获取该配置文件的相对路径 String path = SysTemplate.class.getClassLoader().getResource("generator.properties").getPath(); File file = new File(path) 阅读全文
posted @ 2018-02-06 11:44 流白的日记 阅读(91) 评论(0) 推荐(0)
String的一些方法

摘要:1、将个位数以零补位 @Test public void Test3() { for (int i = 0; i < 11; i++) { String format = String.format("%1$02d", i); System.out.println(format); } } 输出结果 阅读全文
posted @ 2018-02-06 09:46 流白的日记 阅读(97) 评论(0) 推荐(0)
html中文乱码问题解决

摘要:html已经添加了 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 可是还是中文乱码, 这个时候你需要去你的eclipse的工作空间找到该项目下的这个html文件,然后打开设置编码格式为utf-8就可以解决了 阅读全文
posted @ 2018-02-05 18:02 流白的日记 阅读(144) 评论(0) 推荐(0)
一个404异常信息的解决方案

摘要:以前使用Spring Mvc时候都是返回jsp页面,今天想返回html页面, 结果一直报页面一直报404,log日志报Did not find handler method for [/index.html],但是改成jsp就可以正常运行了。 原因是: servlet容器通过这个请求的流程如下: 如 阅读全文
posted @ 2018-02-05 17:11 流白的日记 阅读(116) 评论(0) 推荐(0)
File工具类

摘要:ctrl+o查看该类的方法属性等信息 属性separatorChar--》 系统依赖的默认名称分隔符。这个字段是 初始化以包含系统值的第一个字符。 属性<code> file.separator > < /code>。在UNIX系统上,这个值。 字段<code> ' / ' > < /code>;在 阅读全文
posted @ 2018-02-02 11:37 流白的日记 阅读(93) 评论(0) 推荐(0)
mysql数据库

摘要:sql语句的关键词: create table tbl_mim_card( id int not null auto_increment, id_type char(20) colleate gbk_bin comment "证件类型", ) collate:指定排序规则,可以写在任何sql语句的各 阅读全文
posted @ 2018-02-02 09:33 流白的日记 阅读(106) 评论(0) 推荐(0)

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3