LocalDate date=LocalDate.now(); int month=date.getMonthValue(); int today=date.getDayOfMonth(); date=date.minusDays(today-1); DayOfWeek weekDay= date.getDayOfWeek(); int value=weekDay.getValue(); System.out.println("Mon Tue Wed Thu Fri Sat Sun")
核心思路: 在测试前,将标准输出定向到ByteArrayOutputStream中去 用输出流文件断言内容 测试完成,将标准输出修改为console 具体操作示例 基本通用复制粘贴操作 public String sep = System.getProperty("line.separator"); public ByteArrayOutputStream out = null; @Before public void setUp() throws Throwable{ out = n
某个类明明是有的,可是eclipse 启动tomcat服务器运行web项目,出现如题异常. java.lang.ClassNotFoundException 信息: Set web app root system property: 'webapp.root' = [F:\work_space_Soft\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\lottes_03_14\] 2013-5-31 3:14:43 o