自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

字节叔叔

记录编程、创业过程中踩过的坑

  • 博客(10)
  • 问答 (1)
  • 收藏
  • 关注

原创 Difference between JOIN and JOIN FETCH in JPA

where to use a regular JOIN and where a JOIN FETCH?For example, if we have these two queriesFROM Employee empJOIN emp.department depandFROM Employee empJOIN FETCH emp.department de

2017-05-31 12:56:35 960

原创 深度工作:在一个纷扰的世界里通过专注获得成功的规则

现代商业中,协作的地位仅次于忠诚。企业把员工集结到开放式的办公室里,鼓励彼此之间随机建立关系。除了电子邮件和电话等,现在管理者又有了微信等新的协作工具。管理学家们鼓励员工成为好的企业公民,互相帮助,排忧解难。但是一股强烈的反对浪潮也正在袭来:最近的一期《哈佛商业评论》的封面故事正是关于“协作超负荷”的;乔治敦大学的卡尔·纽波特刚刚出版了一部名为《深度工作:在一个纷扰的世界里通过专注获得成功

2017-05-31 10:01:00 1234

原创 Spring推荐使用构造器注入,我不推荐

Field injection:++ less code to write-- unsafe code - more complicated to testConstructor injection:++ safe code - more code to write (see the hint to Lombok) + easy to test

2017-05-29 21:35:06 1893

原创 jpa findone 和 getone的区别

/** * Retrieves an entity by its id. * * @param id must not be {@literal null}. * @return the entity with the given id or {@literal null} if none found * @throws Illegal

2017-05-24 22:32:49 7356

原创 How do you specify a byte literal in Java?

问题:If I have a methodvoid f(byte b);how can I call it with a numeric argument without casting?f(0); gives an error.答案:You cannot. A basic numeric constant is considered an integer (or

2017-05-24 09:51:15 284

原创 JPA字段/属性访问策略(JPA field access strategy)

1. 通过@javax.persistence.Id设置JPA默认访问策略(推荐) 如果@javax.persistence.Id修饰字段(field),则采用基于字段(field)的访问策略 如果@javax.persistence.Id修饰getter方法(property),则采用基于属性(property)的访问策略2. 通过@javax.persisten

2017-05-23 12:34:02 1327

原创 简单实现JPA实体继承映射

一个简单实现父类加注解:@MappedSuperclass @MappedSuperclasspublic class Traceability implements Serializable { /** * 创建时间 **/ private Date createDt; /** * 更新时间 *

2017-05-16 15:06:24 3695

原创 AES加密出现InvalidKeyException: Illegal key size解决方案

今日遇到如下错误:java.security.InvalidKeyException: Illegal key size因为美国法律限制,JAVA默认支持AES  128 Bit 的key, 如果你计划使用 192 Bit 或者 256 Bit key, java complier 会抛出 Illegal key size Exception解决方案有两种: 需要安装Ja

2017-05-15 11:13:11 11006

原创 docker wordpress 文件2M上传限制问题

在docker-library/wordpress镜像中,目前没有默认的php.ini文件,解决的方法有两种,我们推荐的为第二种:A) 在docker file里添加以下两行RUN touch /usr/local/etc/php/conf.d/uploads.ini \ && echo "upload_max_filesize = 10M;" >> /usr/local/etc/php/

2017-05-08 14:52:05 5029

原创 icloud 5g内存使用攻略

icloud目前6元每月即可升至20GB,25元每月升至200GB,68元每月升至500GB,138元的土豪可以有1TB空间使用。如何不花钱让5GB的免费空间够用呢?首先需要关闭部分应用内数据备份进入设置-iCloud:把照片等内容关掉,只打开icloud drive,通讯录,钱包,备份,查找我的iphone这几个我觉得重要的东西。设置要备份的数据,去除图片图库这样

2017-05-08 14:44:32 6112

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除