【问题标题】:How to connect different DB based on the user input obtained by the REST service in Java?如何根据Java中REST服务获得的用户输入连接不同的数据库?
【发布时间】:2017-07-11 11:08:36
【问题描述】:

我需要根据用户的输入创建连接到不同数据库的应用程序。实现这一目标的最佳解决方案是什么?我在 Google 上搜索过,但找不到资源。

【问题讨论】:

    标签: java web-services rest jdbc informix


    【解决方案1】:

    你显然没有在搜索上投入太多精力。有多种解决方案,例如https://stackoverflow.com/a/10593773。 如果你要使用 Spring,我会推荐这个:http://www.baeldung.com/spring-data-jpa-multiple-databases

    【讨论】:

    • 虽然这在理论上可以回答这个问题,it would be preferable 在此处包含答案的基本部分,并提供链接以供参考。
    猜你喜欢
    • 2023-03-24
    • 1970-01-01
    • 2015-11-17
    • 2017-11-22
    • 1970-01-01
    • 2011-12-20
    • 2014-08-07
    • 2016-07-10
    • 2016-01-24
    相关资源
    最近更新 更多