jdk8中的forEach使用return执行下一次遍历
摘要:jdk8中的forEach使用return执行下一次遍历 在使用foreach()处理集合时不能使用break和continue这两个方法, 也就是说不能按照普通的for循环遍历集合时那样根据条件来中止遍历, 而如果要实现在普通for循环中的效果时,可以使用return来达到, 也就是说如果你在一个
阅读全文
mybatis常见面试、笔试题汇总
摘要:mybatis常见面试、笔试题汇总 转载:https://www..com/huststl/p/7570993.html和https://blog..net/m0_37204491/article/details/70155540 1、#{}和${}的区别是什么? 答: ${}是Properties
阅读全文
【thymeleaf】模板中定义变量
摘要:1 <div th:with="param1=1"> 2 <a th:href="@{/link(p1=${param1})}">link</a> 3 </div> 【thymeleaf】模板中定义变量 th:with 定义变量 使用 th:with 定义变量。形如: 1 <th:block th:
阅读全文
com.github.pagehelper.PageException: 处理排序失败: net.sf.jsqlparser.JSQLParserException
摘要:com.github.pagehelper.PageException: 处理排序失败: net.sf.jsqlparser.JSQLParserException net.sf.jsqlparser.parser.ParseException: Encountered unexpected tok
阅读全文
java定时任务调度-Timer(1)
摘要:一。定义 有且仅有一个后台线程对多个业务线程进行定时定频率的调度 二。 Timer > Timer Task (中有run();方法) 通过 new Timer().schedule() 来调用 Timer Task的run()方法 TimerTask是一个抽象类,它的子类由 Timer 安排为一次
阅读全文
oracle通用函数,nvl,nvl2,NULLIF ,coalesce
摘要:Oracle 通用函数 ① NVL 函数 将空值转换成一个已知的值: 可以使用的数据类型有日期、字符、数字。 函数的一般形式: NVL(commission_pct,0) NVL(hire_date,'01-JAN-97') NVL(job_id,'No Job Yet') (注意select 原数
阅读全文
Thymeleaf中each标签遍历list如何获取index
摘要:<tr th:each="user,userStat:${users}">userStat是状态变量,有 index,count,size,current,even,odd,first,last等属性,如果没有显示设置状态变量,thymeleaf会默 认给个“变量名+Stat"的状态变量。 对arr
阅读全文
获得日期中的月份
摘要:/** 判断是否为同一月份 */ public boolean compareMonths(Date rechargeDate,Date date){ Calendar c = Calendar.getInstance(); c.setTime(rechargeDate); int recharge
阅读全文
spring 的aop proxy 代理
摘要:前些日子一朋友在需要在目标对象中进行自我调用,且需要实施相应的事务定义,且网上的一种通过BeanPostProcessor的解决方案是存在问题的。因此专门写此篇帖子分析why。 aop概念请参考【http://www.iteye.com/topic/1122401】和【http://jinnians
阅读全文
Java BigDecimal
摘要:1构造函数(主要测试参数类型为double和String的两个常用构造函数) BigDecimal aDouble =new BigDecimal(1.22); System.out.println("construct with a double value: " + aDouble); BigD
阅读全文