1. 程式人生 > >NetBeans+eclipseLink設定控制檯列印sql語句

NetBeans+eclipseLink設定控制檯列印sql語句

因為最近專案中用到netBeans開發,資料層用的是eclipseLink,想在控制檯看詳細sql,
eclipseLink和hibernate用使用上很相似,都是JPA的實現,配置檔案內容差不多。

<properties>
      <property name="javax.persistence.schema-generation.database.action" value="create"/>
      
      <property name="eclipselink.show_sql" value="true"/>
      <property name="eclipselink.logging.parameters" value="true"/>
      <property name="eclipselink.logging.level" value="ALL"/>
      <property name="eclipselink.logging.level.sql" value="ALL"/>
      <property name="eclipselink.weaving" value="static"/>
      <property name="clipselink.orm.throw.exceptions" value="true"/>
    </properties>