【发布时间】:2012-02-27 17:08:03
【问题描述】:
我正在使用 JPA2.0 (Eclipselink) 与 DB 进行交互,并且我有 persistence.xml 文件,其中包含一些 DB 配置。我想隐藏用于访问数据库的密码。我正在使用 Eclipse IDE。 persistence.xml 文件中使用了以下配置标签。
<property name="javax.persistence.jdbc.user" value="app"/>
<property name="javax.persistence.jdbc.password" value="password"/>
我不想在xml 中提及密码。我该怎么做?
注意:我的应用程序是由 Swing 和 Apache 的 Derby Embedded DB 组成的。
【问题讨论】:
标签: java jpa passwords persistence embedded-database