Home > Java > javaTutorial > How to build a SpringBoot integrated MongoDB environment

How to build a SpringBoot integrated MongoDB environment

王林
Release: 2023-06-02 20:15:55
forward
1344 people have browsed it

Download MongoDBHow to build a SpringBoot integrated MongoDB environment

Create a directory under the D drive
In D:\MongoDB\Data
Extract the downloaded installation file in the D:\MongoDB directory
How to build a SpringBoot integrated MongoDB environment

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
How to build a SpringBoot integrated MongoDB environment

Configure MongoDB environment variables
I Right-click the computer properties, select Advanced System Settings
How to build a SpringBoot integrated MongoDB environment

Click on Environment Variables
How to build a SpringBoot integrated MongoDB environment

Select PATH and click Edit
How to build a SpringBoot integrated MongoDB environment

Create a new bin directory path after decompression of MongoDB (mine is D:\MongoDB\mongodb-win32-x86_64-2008plus-ssl-4.0.3\bin)
How to build a SpringBoot integrated MongoDB environment

##CMD Enter mogod -help in the window and the following figure shows that the configuration is successful


How to build a SpringBoot integrated MongoDB environment

Write a script to start MongoDB

Create a new mongodb.bat file

How to build a SpringBoot integrated MongoDB environment

Write the file content

mongod --dbpath=D:\MongoDB\Data

How to build a SpringBoot integrated MongoDB environment

Enter the CMD window again and enter mongodb to display the following picture. Successful startup


How to build a SpringBoot integrated MongoDB environment

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template