# dbsearch **Repository Path**: pansoft_ospexpand/dbsearch ## Basic Information - **Project Name**: dbsearch - **Description**: 全库查找并替换敏感数据内容 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-10-20 - **Last Updated**: 2024-07-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 数据库敏感内容处理 > 根据设置替换的内容,批量查找并替换数据库中的敏感内容。 1、`application.yml`设置数据源 ```yml spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://XXXX:3306/DBName username: XXX password: XXX ``` 2、`application.yml`设置替换配置 ```yml # 查询替换配置 search: # 替换规则:敏感内容->替换内容;多个内容逗号分割 replace: XXX->YYY,AAA->BBB # 要处理的数据库 database: # owner: XXX owners: XXX,YYY ``` > `replace`设置敏感内容和替换内容:格式为`敏感内容->替换内容;多个内容逗号分割` > > `database`设置`owner`和`owners`,其中`owners`优先,多个库或者用户之间使用逗号分隔