我们在我们的应用程序中实现了多租户选项。每个租户都有独立的数据库。使用应用程序过滤器我可以管理或分配请求中的每个租户。我们在春季启动计划程序中该如何做呢?我们如何在Spring调度器中实现多租户选项?
@component
public class scheduler{
@Scheduled(fixedRate = 5000)
public void reminderEmail() {
//how can we fetch the exact data from exact tenant DB?
//since there is no request how can we get the tenant name for
fetching exact tenant db?
}
}
请让我知道我们该怎么做到这一点?
如果每个租户有一个单独的数据库中找到,不能你在说你每个租户所需要的数据库表? (nitpick:你在问题标题中有一个错字。) –