更新时间:2023-09-21 18:39:16
我明白的方式是,您需要与数据源一起多次使用春天。 p>
可能你有一个春天的扩展可能有助于
https://github.com/mariofts/spring-multitenancy
I have a project that has the following requeriments:
I read about using Dynamic Data Source Routing. The CustomerContextHolder
has a field which is ThreadLocal
. Is ThreadLocal
a guarantee that the user A will access the schema A following my criteria? Will the code be thread safe?
The way i understand is that you need multi tenency for spring along with datasource.
Probably you have have a look to spring extension which might help