Multitenancy with Spring JPA

前端 未结 2 1093
北海茫月
北海茫月 2021-01-14 06:59

I am looking around for a multitenancy solution for my web application. I would like to implement a application with Separate Schema Model. I am thinking to have a datasour

2条回答
  •  [愿得一人]
    2021-01-14 07:29

    I have worked with a number of multi-tenancy systems. The challenge here is how you keep

    1. open architecture and
    2. provide a solution that evolves with your business.

    Let's look at second challenge first. Multi-tenancy systems has a tendency to evolve where you'll need to support use cases where same data (record) can be accessed by multiple tenants with different capacity (e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=355458). So, the system ultimately needs Access Control List.

    To keep the open architecture you can code to a standard (like JPA). Coding to EclipseLink or Hibernate makes me uncomfortable.

    Spring Security ACL provides very flexible community supported solution to both these challenges. Give that a try. I did and been happy with it's performance. However, I must caution you, it took me some digging to get my head around it.

提交回复
热议问题