mongo
Haiyoung
seeing much, suffering much and studying much.
展开
-
org.springframework.data.mapping.MappingException: Map key xxx.yyyyy contains dots but no replacemen
org.springframework.data.mapping.MappingException: Map key xxx.yyyyy contains dots but no replacement was configured!当map中key包含 "." 时,默认会抛出异常,需要显示的配置替换策略,可以在数据源配置里设置mapKeyDotReplacement的值org.sprin...原创 2018-07-26 21:34:59 · 7001 阅读 · 2 评论 -
spring-data-mongo Aggregation 聚合查询 子文档过滤
spring data mongo Aggregation 聚合查询 子文档过滤对文档的values字段按照时间进行过滤原始文档{ "_id" : ObjectId("5ad43fbdbe65d9168fe22a6d"), "key" : "test", "values" : [ { "p" : 20.3199原创 2018-06-30 11:23:39 · 7906 阅读 · 0 评论 -
python连接MongoDB和PostgreSQL
from pymongo import MongoClientimport psycopg2import datetimeimport randomimport osos.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'import sysfrom decimal import *def get_date(days):...原创 2018-01-08 21:35:54 · 886 阅读 · 0 评论 -
解决Mongodb不能连接到服务器的问题
下载好mongodb-linux-x86_64-ubuntu1604-3.4.10.tgz并解压到 /usr/local/mongodb在根目录下创建路径 /data/db$ sudo mkdir -p /data/db$ export PATH= /usr/local/mongodb/bin:$PATH $ mongod $ mongo 运行报错如下所示: $ ...原创 2017-12-04 18:45:40 · 9546 阅读 · 0 评论