終於搞定了在此感謝chenjin的指點
從日整合失敗後這塊就一直是我的心病我甚至都跑去了去發了一個帖這還是我第一次用英文問問題呢
最後的配置結果是
hibernatecfgxmljbpmcfgxml在關聯spring後保持不變只需要更改spirng的配置文件就好了
<?xml version=
encoding=
UTF
?>
<!DOCTYPE beans PUBLIC
//SPRING//DTD BEAN//EN
beans
dtd
>
<beans>
<bean id=
dataSource
class=
org
springframework
jdbc
datasource
DriverManagerDataSource
>
<property name=
driverClassName
>
<value>com
mysql
jdbc
Driver</value>
</property>
<property name=
url
>
<value>jdbc:mysql://localhost:
/test</value>
</property>
<property name=
username
>
<value>root</value>
</property>
<property name=
password
>
<value/>
</property>
</bean>
<!
Hibernate SessionFactory
>
<bean id=
sessionFactory
class=
org
springframework
orm
hibernate
LocalSessionFactoryBean
>
<property name=
dataSource
>
<ref local=
dataSource
/>
</property>
<property name=
mappingLocations
>
<value>classpath*:/org/jbpm/**/*
hbm
xml</value>
</property>
<property name=
hibernateProperties
>
<props>
<prop key=
hibernate
dialect
>org
hibernate
dialect
MySQLDialect</prop>
<prop key=
hibernate
hbm
ddl
auto
>update</prop>
<prop key=
hibernate
jdbc
batch_size
>
</prop>
</props>
</property>
</bean>
<!
Transaction manager for a single Hibernate SessionFactory (alternative to JTA)
>
<bean id=
transactionManager
class=
org
springframework
orm
hibernate
HibernateTransactionManager
>
<property name=
sessionFactory
>
<ref local=
sessionFactory
/>
</property>
</bean>
<!
reading jBPM process definitions
>
<bean id=
websaleWorkflow
class=
org
springmodules
workflow
jbpm
definition
ProcessDefinitionFactoryBean
>
<property name=
definitionLocation
value=
processdefinition
xml
/>
</bean>
<!
jBPM configuration
>
<bean id=
jbpmConfiguration
class=
org
springmodules
workflow
jbpm
LocalJbpmConfigurationFactoryBean
>
<property name=
sessionFactory
ref=
sessionFactory
/>
<property name=
configuration
value=
jbpm
cfg
xml
/>
<property name=
processDefinitions
>
<list>
<ref local=
websaleWorkflow
/>
</list>
</property>
<property name=
createSchema
value=
true
/>
</bean>
<!
jBPM template
>
<bean id=
jbpmTemplate
class=
org
springmodules
workflow
jbpm
JbpmTemplate
>
<constructor
arg index=
ref=
jbpmConfiguration
/>
<constructor
arg index=
ref=
websaleWorkflow
/>
</bean>
</beans>
其中
<property name=
mappingLocations
>
<value>classpath*:/org/jbpm/**/*
hbm
xml</value>
</property>
很關鍵我就是想spring會通過jbpm找到hibernatecfgxml而沒有設置才失敗的
From:http://tw.wingwit.com/Article/program/Java/ky/201311/27975.html