bytefish / bytefish.de

Resources for building my personal website.
https://www.bytefish.de
MIT License
4 stars 8 forks source link

Tables are not getting created while dynamically tenant details in tenant.json #54

Closed mohammadsuha closed 5 months ago

mohammadsuha commented 1 year ago

I have followed the same example specified in https://www.bytefish.de/blog/spring_boot_multitenancy_configuration.html application is starting as expected but i add new tenant details in tenant.json the datasource is getting created and added to the map but the tables are not getting created using the entities.

Do we need to call afterPropertiesSet after creating the datasource or do we need to do something else?

bytefish commented 1 year ago

I will look into it, but I cannot promise when. Looking at it now, I think the approach is rather crude and there may be better ways to reload the Tenants (for example with a Cache).

I think this repository and article has a much better and more real-life implementation for Multitenant applications: