java 查找数组中最接近的一个数字
摘要:public static Integer getNumberThree(Integer[] intarray,Integer number){ int index = Math.abs(number-intarray[0]); int result = intarray[0]; for (int
阅读全文
posted @
2019-07-30 17:32
爷的眼睛闪亮
阅读(3715)
推荐(1) 编辑
Springboot设置跨域的三种方式
摘要:方式一(精细配置) 在需要跨域的整个Controller或者单个方法上添加@CrossOrigin注解 方式二(全局配置) 第一种写法 @Configurationpublic class WebMvcConfig extends WebMvcConfigurerAdapter { @Overrid
阅读全文
posted @
2019-07-25 16:36
爷的眼睛闪亮
阅读(1863)
推荐(0) 编辑
用shedlock实现分布式定时任务锁
摘要:添加包 <dependency> <groupId>net.javacrumbs.shedlock</groupId> <artifactId>shedlock-spring</artifactId> <version>2.2.0</version> </dependency> <dependenc
阅读全文
posted @
2019-07-24 16:01
爷的眼睛闪亮
阅读(1237)
推荐(0) 编辑
Mysql 查询今天,这周,这个月,今年的数据
摘要:今天 昨天 近7天 近30天 本月 上一月 查询本季度数据 查询上季度数据 查询本年数据 查询上年数据 查询当前这周的数据 查询上周的数据 查询上个月的数据 查询当前月份的数据 查询距离当前现在6个月的数据
阅读全文
posted @
2019-07-06 16:27
爷的眼睛闪亮
阅读(2128)
推荐(0) 编辑
查看库建表的时间
摘要:SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'jeesite' ORDER BY create_time DESC;
阅读全文
posted @
2019-07-04 11:11
爷的眼睛闪亮
阅读(145)
推荐(0) 编辑