02 2015 档案

golang 多线程查找文件内容
摘要:1 package main 2 3 import ( 4 "fmt" 5 "io/ioutil" 6 "os" 7 "path/filepath" 8 "strings" 9 )10 11 var matchCount = 012 var ch = ma... 阅读全文

posted @ 2015-02-27 10:05 modprobe 阅读(1805) 评论(0) 推荐(0)

golang substring
摘要:在java下习惯了String.subString(start,end)然后再golang继续敲substring木有了,看了下代码,也是原生支持的但是百度发现有些人竟然把字符串转成字符数组再根据下标取,简直误人子弟go的string 支持直接根据 index 截取字符串的例如str := "hel... 阅读全文

posted @ 2015-02-27 10:04 modprobe 阅读(958) 评论(0) 推荐(0)

org.apache.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set. Authorization cache cannot be obtained.
摘要:项目中用spring shiro来处理权限的问题,但是启动的时候会打印如下日志org.apache.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set. Authorization ca... 阅读全文

posted @ 2015-02-27 10:02 modprobe 阅读(6571) 评论(0) 推荐(0)

jsp页面中使用 splitfn:split注意事项
摘要:我们有一个 字段存储内容是 xxxx意见~~@~~是在页面上需要分开显示,格式为xxx意见 是使用${fn:split(comments, '~~@~~')[1]}来分割是发现出现@符文字就被隔断了,测试了下,有可能split只能对单个字符做拆分所以修改如下 ${fn:substring(comme... 阅读全文

posted @ 2015-02-27 09:56 modprobe 阅读(565) 评论(0) 推荐(0)

在web项目中配置log4j
摘要:在web.xml中添加如下代码1 2 contextConfigLocation3 classpath*:*.xml4 5 6 7 org.springframework.web.util.Log4jConfigListener8 阅读全文

posted @ 2015-02-27 09:53 modprobe 阅读(286) 评论(0) 推荐(0)