我使用的是guice persistence,它依赖于我在persistence.xml中列出我的持久性单元。据我所知,没有办法在运行时将PersistenceUnitInfo传递给guice-persist。
有没有一种方法可以让maven在编译时为我加入这些,以避免我拥有一个包含所有持久性单元的文件?
发布于 2016-05-26 18:45:03
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="de.cware.cweb.projects.ee.user">
<class>de.cware.cweb.services.user.model.JpaUserImpl</class>
</persistence-unit>
<persistence-unit name="de.cware.cweb.projects.ee.role">
<class>de.cware.cweb.services.role.model.JpaRoleImpl</class>
</persistence-unit>
</persistence>https://stackoverflow.com/questions/37458055
复制相似问题