mongodb doesn’t work on latest Mac OS(10.15)

I updated to Mac 10.15 today. When I run mongod the terminal: ➜ /Users/william > mongod 2019-10-08T17:02:44.183+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify –sslDisabledProtocols ‘none’ 2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] MongoDB starting : pid=43162 port=27017 dbpath=/data/db 64-bit host=Williams-MacBook-Pro-6.local 2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] db version v4.0.3 2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] git…

What type of variable, I need to define to insert following type of data (Spring-boot, Mongodb)

Data type: “label”:”Price”,”type”:”RANGE_SELECT”,”value”:{“min”:1,”max”:100,”default”:50} “label”:”Wi-Fi”,”type”:”SWITCH”,”value”:”true” “label”:”Start Date”,”type”:”DATE_PICKER”,”value”:”” The variable type I described as following: private String label; private String type; private List < String > value; ERROR: “message”: “JSON parse error: Cannot deserialize instance of java.util.ArrayList out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.ArrayList out of START_OBJECT token\n at [Source: (PushbackInputStream);…

mongodb doesn’t work on latest Mac OS(10.15)

I updated to Mac 10.15 today. When I run mongod the terminal: ➜ /Users/william > mongod 2019-10-08T17:02:44.183+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify –sslDisabledProtocols ‘none’ 2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] MongoDB starting : pid=43162 port=27017 dbpath=/data/db 64-bit host=Williams-MacBook-Pro-6.local 2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] db version v4.0.3 2019-10-08T17:02:44.209+0800 I CONTROL [initandlisten] git…

MongoDB upsert array document with golang

I have a document like below: { “_id”: “1.0”, files: [ {“name”: “file_1”, “size”: 1024, “create_ts”: 1570862776426}, {“name”: “file_2”, “size”: 2048, “create_ts”: 1570862778426} ] } And I want to upsert “files” with “file_x”: 1 if “file_x” already in “files”, then update, for example “file_x” is: {“name”: “file_2”, “size”: 4096, “create_ts”: 1570862779426} after upsert document is:…