gpt4 book ai didi

java - 如何自动创建 Multi-Tenancy 架构?

转载 作者:行者123 更新时间:2023-12-02 09:37:58 26 4
gpt4 key购买 nike

我正在开发一个使用 Java、Spring 和 PostgreSQL 的项目,该项目将有多个商店,每个商店将彼此独立,拥有自己的产品。我对 Multi-Tenancy 数据库有点陌生。每个商店都有自己单独的用户,其角色低于管理所有商店的角色。用户将使用自己的凭据登录,生成一个身份验证 token ,我可以使用该 token 来识别他们并为注册为商家的用户创建一个新商店。我应该走什么路?或者我应该使用什么框架来帮助我将商店彼此分开?

最佳答案

尝试CUBA Platform基于Spring框架。

CUBA Platform Guides : Introduction to Working with Data

CUBA compiles mainstream JVM technologies into a powerful environment, responding to modern development standards and common requirements of business applications.

CUBA 平台的 Multi-Tenancy 插件

有经过生产测试的开源 Multitenancy addon对于CUBA平台:

The add-on implements a single database multitenancy support for CUBA applications.
It enables using a single application instance to serve multiple tenants — groups of users that are invisible to each other and do not share any data they have write access to.

The component supports two types of data: - Common data — shared across tenants. - Tenant-specific data — not accessible to other tenants.

All tenants have their own admin users which can create tenant users and assign tenant-specific roles and permissions.

Features

  • Access differentiation to data for groups of users within a single application.
  • Simple configuring of tenant-specific entities.
  • User interface for managing tenants.

Links

multitenancy-addon on GitHub

免责声明:我在 haulmont.com 工作

关于java - 如何自动创建 Multi-Tenancy 架构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57346262/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com