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

1.4 KiB
Raw Permalink Blame History

title description published date tags editor dateCreated
10.使用mongo数据字典 使用mongo数据字典 true 2021-11-25T07:22:51.993Z wg-basic markdown 2021-11-25T07:15:41.957Z

引入依赖

<dependency>
  <groupId>ink.wgink</groupId>
  <artifactId>mongo-module-dictionary</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>

yml文件添加mongo配置

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

需要增加的菜单mongo的查看菜单

菜单 路径
数据字典 /route/mongo/data/list-tree-mongo
地区字典 /route/mongo/area/list-tree-mongo

这里需要注意的是mongo菜单中的数据默认是没有的只有在普通菜单中进行数据同步之后才会出现。 {.is-warning}

业务接口

菜单 路径
数据字典 ink.wgink.mongo.module.dictionary.service.IMongoDataService
地区字典 ink.wgink.mongo.module.dictionary.service.IMongoAreaService