原文:https://blog.csdn.net/michael_f2008/article/details/77715075 //Builder Pattern public class NutritionFacts{ public final int servingSize; public final int servings; public final int calories; public final int fat; public final int sodium; public f…
package cn.xf.cp.ch02.item2; /** * * 功能:当我们的构造参数有很多,超出可控范围的时候,用build模式 时间:下午8:25:05 文件:NutritionFacts.java * * @author Administrator * */ public class NutritionFacts { private final int param1; private final int param2; private final int param3; priv…
问题背景: 笔者所在的项目组最近把生产环境Tomcat迁移到Linux,算是顺利运行了一段时间,最近一个低概率密度的(too many open files)问题导致服务假死并停止响应客户端客户端请求. 进入服务器查看日志,发现tomcat凌晨6-7点的日志丢失,查看进程端口仍旧开放. root@# lsof -i: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java root 0t0 TCP *: (LISTEN) 从存档的日志找到一…
2016.07.26 qq:992591601,欢迎交流 首先介绍些基本概念: Annotations(also known as metadata)provide a formalized way to add information to your code so that you can easily use that data at some later point. Annotations are partly motivated by a general trend toward c…
adt-bundle-linux-x86_64-20131030下新建project提示找不到adb和R.java问题的解决 在ubuntu14.04下,搭建Android开发环境,下载官方的adt-bundle-linux-x86_64-20131030后.启动eclipse,新建一个项目.提示找不到"R"文件,即R文件未成.启动模拟器提示"...Cannot run program "/home/zenail/adt-bundle-linux-x86_64-20…
项目忽然出现 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决方法 0.环境: 新装win8.1系统,Tomcat配置无误. 1.错误: 项目中某一.jps页面忽然出现错误,鼠标点上去为:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Buil…