Download MongoDB
Create a directory under the D drive
In D:\MongoDB\Data
Extract the downloaded installation file in the D:\MongoDB directory
win R open the CMD window
Enter the bin directory (mine is D:\MongoDB\mongodb-win32-x86_64-2008plus-ssl-4.0.3\bin)
Start MongoDB input: mongod.exe --dbpath=D:\MongoDB\Data
After success, the default database port of MongoDB connected to 27017 is displayed
Configure MongoDB environment variables
I Right-click the computer properties, select Advanced System Settings
Click on Environment Variables
Select PATH and click Edit
Create a new bin directory path after decompression of MongoDB (mine is D:\MongoDB\mongodb-win32-x86_64-2008plus-ssl-4.0.3\bin)
Create a new mongodb.bat file
mongod --dbpath=D:\MongoDB\Data
The above is the detailed content of How to build a SpringBoot integrated MongoDB environment. For more information, please follow other related articles on the PHP Chinese website!