- 博客(7)
- 收藏
- 关注
转载 spring加载xml读取properties配置文件
<!--读取单个properties配置文件 --> <context:property-placeholder location="classpath:com/bc/hawkeye/config/mysql_mongodb.properties"/> <!-- 连接池 --> <bean id="dataSource" class="com.mchan...
2018-05-18 09:51:29
1532
原创 poi 生成Excel 并发送到ftp服务器(不生成本地文件)
jar包 <dependency> <groupId>fr.opensagres.xdocreport</groupId> <artifactId>org.apache.poi.xwpf.converter.core</artifactId> <version>1.0.6</ver...
2018-05-08 11:35:48
4476
原创 poi 生成Excel 并保存到 本地
jar包 <dependency> <groupId>fr.opensagres.xdocreport</groupId> <artifactId>org.apache.poi.xwpf.converter.core</artifactId> <version>1.0...
2018-05-08 11:04:23
10782
1
原创 MongoDB 查询时间段
map.put("时间字段", new Document("$gte",小的时间).append("$lte",大的时间));例:map.put("date", new Document("$gte",new Date(date.getTime()-1000*60*5)).append("$lte",date));
2018-05-05 09:47:29
1092
原创 MongoDB查询字符串类型数字 最值
先找字符串长度最长的,再按降序排列,取第一个 /** * 查询数据 最大值(字符串型) * fieldname 要查询的字段名 */ public String findMaxString(String fieldname){ int i = 6; Document document = new Document(fieldname,new Document("...
2018-05-03 14:47:23
2387
原创 MongoDB 查询数据 最值
MongoDB 1.同一字段字符串型数字与数值型数字同时存在时,求出的最值是字符串型数字中的最值。当仅有数值型数字时,求出的最值是数值型数字中的最值。(下面这种形式时是这样)2.当查询的数据是字符串型数字,先比较第一位。/** * 查询数据 最大值 * fieldname 要查询的字段名 */ public String findMax(String fieldname){ List...
2018-04-26 09:44:54
1278
原创 MongoDB 比较大小(数值型,字符串型数字) 字符串比较($gt,$lt)
数据库中类型是字符串,传入的要比较的值的类型就是字符串;数据库中类型是数值型,传入的要比较的值的类型就是相应的数值类型;MongoDB将字符串按UTF-8进行字典排序,并可将$gt($ greater than,大于)和$lt($ less than,小于)用于字符串查询列出所有name字段首字母在D前的文档:>db.people.find( { name: { $lt:"D" } } );...
2018-04-25 18:29:41
18788
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人