英文:
How to implement spring boot Redis multi tenancy?
问题
我在使用Spring Boot和Redis创建多租户应用时遇到了问题。我使用了与如何在Spring Boot中实现Redis多租户中提到的相同解决方案,但没有成功。是否有一种不同的方法来在Spring Boot中实现Redis多租户?
英文:
I am facing issues while creating a Multitenant application using spring boot and Redis. I have used the same solution which is mentioned in How to implement multitenancy for Redis in spring boot. But it didn't work. Is there a different way to implement Redis multitenancy with Spring boot.
答案1
得分: 1
我通过添加一个检查,如果数据源不在缓存中,则从所需的源中获取并创建连接,找到了解决方案。还明确更改了调用 afterPropertiesSet(),如https://stackoverflow.com/questions/59661914/how-to-implement-multitenancy-for-redis-in-spring-boot/59676369#59676369 中所述。
英文:
I found the solution by adding a check if the data source not available in the cache then pull from the required source and create a connection. Also changed calling afterPropertiesSet() explicitly which is mentioned in https://stackoverflow.com/questions/59661914/how-to-implement-multitenancy-for-redis-in-spring-boot/59676369#59676369
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论