Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[错误报告]: 描述 关于过滤多租户插件使用@InterceptorIgnore的问题 #6476

Open
3 tasks done
c834292137 opened this issue Sep 9, 2024 · 1 comment
Open
3 tasks done

Comments

@c834292137
Copy link

确认

  • 我的版本是最新版本, 我的版本号与 version 相同, 并且项目里无依赖冲突
  • 我已经在 issue 中搜索过, 确认问题没有被提出过
  • 我已经修改标题, 将标题中的 描述 替换为遇到的问题

当前程序版本

3.5.7

问题描述

官网的文档示例写法是可以作用于非mapper的方法上:
该注解用于指定在执行 MyBatis-Plus 的某个方法时,是否忽略特定的拦截器。MyBatis-Plus 提供了多个拦截器,用于实现如分页、逻辑删除、多租户等功能。通过使用@InterceptorIgnore注解,开发者可以控制哪些拦截器在执行特定方法时应该被忽略。

@service
public class UserService {
@Autowired
private UserMapper userMapper;

@InterceptorIgnore(tenantLine = "1") // 忽略多租户拦截器
public List<User> selectUsers() {
    return userMapper.selectList(null);
}

}
但是实测只能作用于mapper的方法或类,是我的使用问题吗

详细堆栈日志

No response

@miemieYaho
Copy link
Member

文档有问题稍后会修正,只能支持mapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants