Home  >  Article  >  Java  >  How to install Docker mongoDB and collect springboot logs

How to install Docker mongoDB and collect springboot logs

王林
王林forward
2023-05-11 14:13:211006browse

One: Docker installs mongodb

The first step: Docker installs mongodb

The second step: Start mongodb in docker

Step Three: Configure mongodb user information

Two: Springboot collects logs to mongodb

Collecting logs is particularly rough

Step one: Add configuration to pom.xml

Step two: Configure the connection in application.yml

Step three: aop slice log Obtain

Three: Look at the effect of storing logs

Docker mongoDB怎么安装并收集springboot日志

Remarks: Please pay attention to the mongodb version used: 4.2. 1 Configure and use it in sequence

If you are using the latest version, there may be problems with various permissions being passed, then please switch to the 4.2.1 stable version. Using the latest version feels a bit like a guinea pig.

The above is the detailed content of How to install Docker mongoDB and collect springboot logs. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete