开发者

Properties file for database connection GWT

Hi is it possible to use a properties file in GWT that contains database details and then just change it anytime if for example, your database details change? This file would be read by java.sql.开发者_如何学JAVAConnection so that the system could connect to the database. Thanks


It is possible to use files to configure GWT. Every GWT "module" has a definition xml file, and you can always define constants in your Java code too.

On the server side, you can use all of the Java tools you're used to, as long as your server supports them! GWT does not place any additional constraints on your server code.


I suggest you to try with an ORM (object-relational mapping) in order to handle your database communication. In this case you will naturally use a configuration-property file.

There is a good article that provides some info about using GWT with Hibernate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜