在往上看了很多关于spring与jbpm整合的列子,搞了两天,今天终于把jbpm与springmvc整合成功了,哈哈~~~,整个过程中这样那样的错误不断产生,弄得头大,最后把juel-api.jar、juel-api.jar、juel-engine.jar放到tomcat6下,网上说juel-api.jar会与tomcat6的
el-api.jar冲突。目前还没发生错误,就算万事大吉了,到时如果出错删除它试试
------------------------------
记录下来
-------------------------------------------------------
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright : adobocode.com , 2010 -->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID" version="2.4">
<display-name>springmvc-jbpm</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
springmvc-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
default-autowire="byType" xmlns:p="http://www.springframework.org/schema/p"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<mvc:annotation-driven />
<context:component-scan base-package="com.boda.controller" />
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
<bean
class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="mediaTypes">
<map>
<entry key="html" value="text/html" />
<entry key="json" value="application/json" />
</map>
</property>
<property name="viewResolvers">
<list>
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
</list>
</property>
<property name="defaultViews">
<list>
<bean
class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" />
</list>
</property>
</bean>
</beans>
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
default-autowire="byName">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@localhost:1521:orcl</value>
</property>
<property name="username">
<value>jbpm_301</value>
</property>
<property name="password">
<value>jbpm</value>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan" value="com.boda.model"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>
<property name="mappingLocations">
<list>
<value>classpath:jbpm.execution.hbm.xml</value>
<value>classpath:jbpm.history.hbm.xml</value>
<value>classpath:jbpm.identity.hbm.xml</value>
<value>classpath:jbpm.repository.hbm.xml</value>
<value>classpath:jbpm.task.hbm.xml</value>
</list>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean class="org.springframework.transaction.support.TransactionTemplate">
<constructor-arg ref="transactionManager"></constructor-arg>
</bean>
<tx:annotation-driven/>
<bean id="departmentService" class="com.boda.service.impl.DepartmentServiceImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- jbpm工作流 -->
<bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper">
<property name="jbpmCfg" value="spring-jbpm4.cfg.xml"></property>
</bean>
<bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine">
</bean>
</beans>
spring-jbpm4.cfg.xml
<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
<process-engine-context>
<string name="spring.cfg" value="spring-jbpm4.xml" />
</process-engine-context>
<import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.tx.spring.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.bpmn.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.console.cfg.xml" />
<!--
<import resource="jbpm.jobexecutor.cfg.xml" />
-->
</jbpm-configuration>
分享到:
相关推荐
Spring+hibernate4+SpringMVC+Jbpm4.4 。Jbpm 4.4 整合 spring,数据库是mysql,hibernate大版本是4。供以后参考使用
在学习jbpm5的过程中,发现很难找到一个合适的,能跑的起来的,整合ssh的例子,之前在csdn上花费不少分下了好多个,能跑起来的好像就1个,不是jar包不匹配就是些其他的莫名奇妙的错误,对应刚刚接触jbpm的人来说,一...
springmvc整合hibernate,jbpm实现快速开发办公系统
jBPM4.4入门开发实例 看着好的亲 一定要下载给分啊。
springmvc整合hibernate,jbpm实现快速开发办公系统 运行环境 jdk6+tomcat6+mysql+eclipse 项目技术(必填) spring mvc+hibernate+jbpm+jsp 数据库文件 压缩包sql/jroo.sql jar包文件 链接: ...
jBPM4工作流应用指南和实例(含全jar包)包太大,分卷了,下载的时候注意是四个分卷包。 注意:只收一卷的金币。其他都免费
这个是在整合JBPM前,先集成SpringMVC3.2和Hibernate4.2的代码,并配置了二级缓存。
本系统采用SpringMVC+Hibernate+Spring框架整合开发,数据库使用MySQL,构建工具是Gradle。其中前台页面使用了Bootstrap中的一个模板AdminLTE进行美化,可导入IntelliJ IDEA使用。 参考了多个OA相关的项目,大概实现...
activiti5.14+spring4.0+srping Mvc4.0+mybatis3.0.5+maven环境搭建,可以跑起来,并且可以逆向生成相关的数据库表
本系统采用SpringMVC+Hibernate+Spring框架整合开发,数据库使用MySQL,构建工具是Gradle。其中前台页面使用了Bootstrap中的一个模板AdminLTE进行美化,可导入IntelliJ IDEA使用。 参考了多个OA相关的项目,大概实现...
jbpm4.4和spring整合,并实现了流程发布,压缩包内还带有一个mxGraph流程设计器设计.