提交 69e80bd3 编写于 作者: C Calvin

# 修复JBoss里部署失败的bug,原来忘记写baseScanPackage了,另外persistence.xml可以彻底删除了.

上级 4e1d3230
@echo off
echo [INFO] Package the war in target dir.
cd %~dp0
cd ..
call mvn package -Dmaven.test.skip=true
cd bin
pause
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
<!-- Keep this file empty, Spring will scan the @Entity classes -->
<persistence-unit name="defaultPU" transaction-type="RESOURCE_LOCAL">
<mapping-file>META-INF/orm.xml</mapping-file>
</persistence-unit>
</persistence>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm/orm_2_0.xsd" version="2.0">
</entity-mappings>
\ No newline at end of file
......@@ -22,9 +22,8 @@
<!-- Jpa Entity Manager 配置 -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="defaultPU"/>
<property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter"/>
<property name="persistenceXmlLocation" value="classpath*:META-INF/jpa_persistence.xml" />
<property name="packagesToScan" value="org.springside.examples.quickstart"/>
<property name="jpaProperties">
<props>
<!-- 命名规则 My_NAME->MyName -->
......
@echo off
echo [INFO] Package the war in target dir.
cd %~dp0
cd ..
call mvn package -Dmaven.test.skip=true
cd bin
pause
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
<!-- Keep this file empty, Spring will scan the @Entity classes -->
<persistence-unit name="defaultPU" transaction-type="RESOURCE_LOCAL">
<mapping-file>META-INF/orm.xml</mapping-file>
</persistence-unit>
</persistence>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm/orm_2_0.xsd" version="2.0">
</entity-mappings>
\ No newline at end of file
......@@ -22,9 +22,8 @@
<!-- Jpa Entity Manager 配置 -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="defaultPU"/>
<property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter"/>
<property name="persistenceXmlLocation" value="classpath*:META-INF/jpa_persistence.xml" />
<property name="packagesToScan" value="org.springside.examples.showcase"/>
<property name="jpaProperties">
<props>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</prop>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册