smile_elims

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  java

摘要:Gson gson = new GsonBuilder().registerTypeAdapter(BigDecimal.class, new BigDecimalAdapter()).serializeNulls().create(); 我这块是将bigdecimal转字符串,如果有其他需求比方说 阅读全文
posted @ 2020-11-20 14:59 smile_elims 阅读(868) 评论(0) 推荐(0)

摘要:integer a=123 integer b=123 integer c=250 integer d=250 a==b(true) c==d (false) Integer中把-128-127 缓存了下来 c==d 是对比的地址 这时候应该用 equals 可以参考:https://blog.cs 阅读全文
posted @ 2019-11-21 14:39 smile_elims 阅读(134) 评论(0) 推荐(0)

摘要:服务器1:192.168.1.1服务器2:192.168.1.2 192.168.1.1 ssh root@192.168.1.1 password 123456 关闭防火墙 service iptables stop $yum -y install nfs$vi /etc/exports--编辑 阅读全文
posted @ 2019-05-08 14:34 smile_elims 阅读(223) 评论(0) 推荐(0)

摘要:问题:js函数可能有多个,之间有相互调用关系,有jquery jar包 org.mozilla.javascript-1.7.2 js envjs-1.2.js java代码 阅读全文
posted @ 2017-12-12 13:29 smile_elims 阅读(439) 评论(0) 推荐(0)

摘要:Thumbnailator 是一个为Java界面更流畅的缩略图生成库。从API提供现有的图像文件和图像对象的缩略图中简化了缩略过程,两三行代码就能够从现有图片生成缩略图,且允许微调缩略图生成,同时保持了需要写入到最低限度的代码量。同时还支持根据一个目录批量生成缩略图。 http://code.goo 阅读全文
posted @ 2017-03-24 16:53 smile_elims 阅读(536) 评论(0) 推荐(0)

摘要:读取xls 异常:Invalid header signature POI 这一般是由于第三方工具自动生成的excel文件的文件不太规范,你可以手动打开Excel(如果可以打开)再另存为-》保存Excel就可以了 阅读全文
posted @ 2017-03-13 16:09 smile_elims 阅读(197) 评论(0) 推荐(0)

摘要:原文:http://blog.csdn.net/sinat_29581293/article/details/52122191 Apache POI 是用Java编写的免费开源的跨平台的 Java API,Apache POI提供API给Java程式对Microsoft Office格式档案读和写的 阅读全文
posted @ 2017-03-13 16:05 smile_elims 阅读(239) 评论(0) 推荐(0)

摘要:// 发送url地址获取信息 public static String sendPost(String jsonStr, String path) { String msg = "";// 保存调用http服务后的响应信息 try { byte[] data = jsonStr.getBytes(); jav... 阅读全文
posted @ 2016-08-04 11:18 smile_elims 阅读(2398) 评论(0) 推荐(0)

摘要:// 更改文件名称 public static void chenckFileName(String oldFile, String newFileName) { File file = new File(oldFile); // 指定文件名及路径 File newFile = new File(newFileName); if (newF... 阅读全文
posted @ 2016-08-04 11:15 smile_elims 阅读(222) 评论(0) 推荐(0)

摘要:url格式不正确,可能有"www.baidu.com" "这个不能有 阅读全文
posted @ 2016-08-04 11:14 smile_elims 阅读(325) 评论(0) 推荐(0)

摘要:转自 :http://zqc-0101.iteye.com/blog/1140140 MessageFormat用来格式化一个消息,通常是一个字符串,比如: String str = "I'm not a {0}, age is {1,number,short}", height is {2,num 阅读全文
posted @ 2016-06-23 09:11 smile_elims 阅读(186) 评论(0) 推荐(0)

该文被密码保护。
posted @ 2016-04-22 16:14 smile_elims 阅读(2) 评论(0) 推荐(0)

摘要:常用快捷键 Ctrl + Shift + R 搜索文件Ctrl + Shift + T 搜索类型Ctrl + O 搜索成员 智能提示 Windows > Preferences > General > Keys > Content Assist 在此设置智能提示快捷键 Windows > Prefe 阅读全文
posted @ 2016-03-22 19:53 smile_elims 阅读(237) 评论(0) 推荐(0)

摘要:web.xml 阅读全文
posted @ 2016-03-18 20:47 smile_elims 阅读(2874) 评论(0) 推荐(0)

摘要:/** * 缓存池 * @author xiaoquan * @create 2015年3月13日 上午10:32:13 * @see */ public class CachePool { private static CachePool instance;//缓存池唯一实例 private st 阅读全文
posted @ 2016-01-29 19:28 smile_elims 阅读(268) 评论(0) 推荐(0)

摘要:在配置文件中加入 <prop key="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</prop> 加入之后不能更新删除,不加不能使用代参查询(好烦躁,有 阅读全文
posted @ 2016-01-22 17:44 smile_elims 阅读(933) 评论(0) 推荐(0)

摘要:package md5;import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;/* * MD5 算法*/public class MD5 { // 全局数组 private... 阅读全文
posted @ 2016-01-19 20:33 smile_elims 阅读(336) 评论(0) 推荐(0)

摘要:在  new bean()中,对象里要有其构造方法,查询参数必须是构造方法中的参数,get set也要同步   类似于 String hql= "select  new A(a.id, a.name, a.pass, a.bid,b.name) from A a,B b where a.bid=b. 阅读全文
posted @ 2016-01-14 11:49 smile_elims 阅读(1042) 评论(0) 推荐(0)

摘要:解决办法:在属性的get方法上加上一段注解标识它是临时属性,不是数据库字段就OK@Transientpublic List getChildList() {return childList;}public void setChildList(List childList) {this.childLi... 阅读全文
posted @ 2016-01-11 10:35 smile_elims 阅读(1322) 评论(0) 推荐(0)

摘要:@Repositorypublic class BaseDao extends HibernateDaoSupport{ protected Class objectClass; protected String className; protected String alias... 阅读全文
posted @ 2016-01-08 10:02 smile_elims 阅读(215) 评论(0) 推荐(0)