网站批量发布,成都兼职建设网站,软件项目管理方案,网站怎么做图片动态图您可以在将在运行时执行的JPA持久性上下文定义中定义并链接到SQL脚本。 有标准化的属性来定义脚本#xff0c;以分别说明如何创建模式#xff0c;批量加载数据和删除模式#xff1a; persistence version2.1 xmlnshttp://xmlns.jcp.org/xml/ns/persi… 您可以在将在运行时执行的JPA持久性上下文定义中定义并链接到SQL脚本。 有标准化的属性来定义脚本以分别说明如何创建模式批量加载数据和删除模式 persistence version2.1 xmlnshttp://xmlns.jcp.org/xml/ns/persistencexmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://xmlns.jcp.org/xml/ns/persistencehttp://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsdpersistence-unit nameprod transaction-typeJTApropertiesproperty namejavax.persistence.schema-generation.database.actionvaluedrop-and-create/property namejavax.persistence.schema-generation.create-script-sourcevaluecreate-schema.sql /property namejavax.persistence.schema-generation.sql-load-script-sourcevalueload-data.sql /property namejavax.persistence.schema-generation.drop-script-sourcevaluedrop-schema.sql //properties/persistence-unit
/persistence SQL文件应驻留在类路径中。 这篇帖子从我的新闻通讯004中转贴了 翻译自: https://www.javacodegeeks.com/2017/12/jpa-persistence-xml-sql-script-definitions.html