[英]google app engine : switch sql cloud database instance , keeping the source code same java eclipse
The application is hosted in google app engine, we are using google cloud sql as database. 该应用程序托管在Google App Engine中,我们使用Google Cloud SQL作为数据库。
we are in testing phase of our application, so we have to database 我们处于应用程序的测试阶段,因此我们必须数据库
so can anyone please suggest a way to switch from live database to test database without changing the source code, for now we have created 2 different source code with different urls to connect to different database instances and have created 2 instance of application but we want to keep the source code same. 所以任何人都可以建议一种在不更改源代码的情况下从实时数据库切换到测试数据库的方法,因为现在我们已经创建了2个具有不同url的不同源代码以连接到不同的数据库实例,并创建了2个应用程序实例,但是我们想要保持源代码相同。
there are many ways to do this. 有很多方法可以做到这一点。 you could pass a url parameter to indicate which db to use.
您可以传递一个url参数来指示要使用的数据库。 you could also have an admin page where you select which db all will use.
您还可以在管理页面上选择所有要使用的数据库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.