会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
哈哈
呵呵
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2014年11月11日
Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String'
摘要: 一、发现问题 Mybatis查询传入一个字符串传参数,报There is no getter for property named 'num' in 'class java.lang.String'。二、解决问题无论参数名,都要改成"_parameter"。三、原因分析Mybatis默认采用ONGL...
阅读全文
posted @ 2014-11-11 18:12 箜篌
阅读(14765)
评论(0)
推荐(0)
2014年10月11日
线程安全时间戳
摘要: private static AtomicLong uniqueseed = new AtomicLong(System.currentTimeMillis() ); long st = uniqueseed .incrementAndGet()
阅读全文
posted @ 2014-10-11 14:41 箜篌
阅读(766)
评论(0)
推荐(0)
2014年10月10日
java 文件快速复制
摘要: public void fileChannelCopy(File s, File t) { FileInputStream fi = null; FileOutputStream fo = null; FileChannel in = null; FileChannel out = null...
阅读全文
posted @ 2014-10-10 14:01 箜篌
阅读(434)
评论(0)
推荐(0)
MyBatis+MySQL 返回插入的主键ID
摘要: 需求:使用MyBatis往MySQL数据库中插入一条记录后,需要返回该条记录的自增主键值。方法:在mapper中指定keyProperty属性,示例如下:Xml代码 收藏代码 insert into user(userName,password,comment) ...
阅读全文
posted @ 2014-10-10 10:41 箜篌
阅读(215)
评论(0)
推荐(0)
2014年9月26日
javax.imageio.IIOException: Can't create cache file!(使用uploadfile插件上传文件)
摘要: 报错原因可能是:使用tomcat时tomcat下没有temp文件夹。
阅读全文
posted @ 2014-09-26 16:22 箜篌
阅读(374)
评论(0)
推荐(0)
2014年9月24日
tomcat启动时报:IOException while loading persisted sessions: java.io.EOFException的解决方案
摘要: 错误的原因是:EOFException表示输入过程中意外地到达文件尾或流尾的信号,导致从session中获取数据失败。这是由于tomcat上次非 正常关闭时有一些活动session被持久化(表现为一些临时文件),在重启时,tomcat尝试去恢复这些session的持久化数据但又读取失败造成 的。此异...
阅读全文
posted @ 2014-09-24 13:25 箜篌
阅读(210)
评论(0)
推荐(0)
2014年9月12日
百度地图根据经纬度得到地理位置
摘要: String url = "http://api.map.baidu.com/geocoder/v2/?ak=2uZgkxkTV4BCdGfAWN6m3cra&callback=renderReverse&location=39.983424,116.322987&output=json&pois=...
阅读全文
posted @ 2014-09-12 16:40 箜篌
阅读(510)
评论(0)
推荐(1)
根据经纬度算距离
摘要: public double getDistance(double startLat,double startLong,double endLat,double endLong){ //startLong 起始坐标点经度 //startLat 起始坐标点维度 //endLong 目标坐标...
阅读全文
posted @ 2014-09-12 13:33 箜篌
阅读(255)
评论(0)
推荐(0)
2014年9月11日
js判断上传文件大小
摘要: var isIE = /msie/i.test(navigator.userAgent) && !window.opera; var fileSize = 0; if (isIE && !target.files) { var filePath = tar...
阅读全文
posted @ 2014-09-11 11:32 箜篌
阅读(383)
评论(0)
推荐(0)
2014年9月9日
maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported by m2e
摘要: 解决办法:在plugins之前添加如下pluginManagement,二者前后顺序如下: org.eclipse.m2e ...
阅读全文
posted @ 2014-09-09 18:33 箜篌
阅读(341)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告