调整 YudaoDataPermissionAutoConfiguration 的自动配置

This commit is contained in:
YunaiV 2022-11-13 10:07:30 +08:00
parent bb2303e789
commit 7a08c293dc

View File

@ -27,9 +27,8 @@ public class YudaoDataPermissionAutoConfiguration {
@Bean
public DataPermissionDatabaseInterceptor dataPermissionDatabaseInterceptor(MybatisPlusInterceptor interceptor,
List<DataPermissionRule> rules) {
DataPermissionRuleFactory ruleFactory) {
// 创建 DataPermissionDatabaseInterceptor 拦截器
DataPermissionRuleFactory ruleFactory = dataPermissionRuleFactory(rules);
DataPermissionDatabaseInterceptor inner = new DataPermissionDatabaseInterceptor(ruleFactory);
// 添加到 interceptor
// 需要加在首个主要是为了在分页插件前面这个是 MyBatis Plus 的规定