【发布时间】:2014-02-04 04:51:05
【问题描述】:
在网上快速搜索一下,可以发现人们在persistence.xml 中指定xmlns 和xsi:schemaLocation 的三个或四个变体。
指定 JPA 版本 2.1 的“正确”方式是什么?
我正在使用
<persistence version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
【问题讨论】:
-
配置文件强迫症...欢迎加入俱乐部。
标签: java jpa jpa-2.1 persistence.xml