wiki-files/wg-basic/mongo-dictionary-module.md

48 lines
882 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 10.使用mongo数据字典
description: 使用mongo数据字典
published: true
date: 2021-11-25T07:15:41.957Z
tags: wg-basic
editor: markdown
dateCreated: 2021-11-25T07:15:41.957Z
---
# 引入依赖
```xml
<dependency>
<groupId>ink.wgink</groupId>
<artifactId>mongo-module-dictionary</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
```
# yml文件添加mongo配置
```yml
spring:
data:
mongodb:
uri: mongodb://username:username@IP:PORT/db
```
# 设置菜单
引入依赖之后要使用mongo需要修 **数据字典**、**地区字典** 的菜单配置
原有配置
| 菜单 | 路径 |
| :-: | :-: |
| 数据字典 | `/route/data/list-tree` |
| 地区字典 | `/route/area/list-tree` |
修改为
| 菜单 | 路径 |
| :-: | :-: |
| 数据字典 | `/route/mongo/data/list-tree` |
| 地区字典 | `/route/mongo/area/list-tree` |