(Activiti6.0.0)SpringProcessEngineConfiguration配置bean时属性注入不了,问题已经找到

             SpringProcessEngineConfiguration配置bean时属性注入不了

我用Spring搭建了个activiti的项目,但是在配置 org.activiti.spring.SpringProcessEngineConfiguration的bean时注入不了属性 请高手帮我看看,具体配置信息我放报错信息的最后面;

SpringProcessEngineConfiguration 这个源码中有属性set方法,而且在测试test中加载配置文件是完全没问题的;

 错误日志:

F:\apache-tomcat-8.0.24\bin\catalina.bat run
[2018-10-19 01:42:48,368] Artifact avtiviti20181017:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE:   "C:\Users\sukai\.IntelliJIdea2017.2\system\tomcat\Unnamed_avtiviti20181017"
Using CATALINA_HOME:   "F:\apache-tomcat-8.0.24"
Using CATALINA_TMPDIR: "F:\apache-tomcat-8.0.24\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_45"
Using CLASSPATH:       "F:\apache-tomcat-8.0.24\bin\bootstrap.jar;F:\apache-tomcat-8.0.24\bin\tomcat-juli.jar"
19-Oct-2018 13:42:50.315 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.24
19-Oct-2018 13:42:50.318 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jul 1 2015 20:19:55 UTC
19-Oct-2018 13:42:50.318 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.24.0
19-Oct-2018 13:42:50.318 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7
19-Oct-2018 13:42:50.319 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1
19-Oct-2018 13:42:50.319 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
19-Oct-2018 13:42:50.319 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_45\jre
19-Oct-2018 13:42:50.319 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_45-b15
19-Oct-2018 13:42:50.319 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
19-Oct-2018 13:42:50.320 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\sukai\.IntelliJIdea2017.2\system\tomcat\Unnamed_avtiviti20181017
19-Oct-2018 13:42:50.320 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         F:\apache-tomcat-8.0.24
19-Oct-2018 13:42:50.321 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
19-Oct-2018 13:42:50.321 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
19-Oct-2018 13:42:50.321 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
19-Oct-2018 13:42:50.322 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
19-Oct-2018 13:42:50.322 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
19-Oct-2018 13:42:50.322 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\sukai\.IntelliJIdea2017.2\system\tomcat\Unnamed_avtiviti20181017\conf\logging.properties
19-Oct-2018 13:42:50.323 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
19-Oct-2018 13:42:50.323 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=128M
19-Oct-2018 13:42:50.323 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=512m
19-Oct-2018 13:42:50.323 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=F:\apache-tomcat-8.0.24\endorsed
19-Oct-2018 13:42:50.324 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\sukai\.IntelliJIdea2017.2\system\tomcat\Unnamed_avtiviti20181017
19-Oct-2018 13:42:50.324 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=F:\apache-tomcat-8.0.24
19-Oct-2018 13:42:50.324 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=F:\apache-tomcat-8.0.24\temp
19-Oct-2018 13:42:50.325 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.
19-Oct-2018 13:42:50.325 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
19-Oct-2018 13:42:51.550 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1m 19 Mar 2015)
19-Oct-2018 13:42:51.789 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
19-Oct-2018 13:42:51.812 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
19-Oct-2018 13:42:51.821 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2238 ms
19-Oct-2018 13:42:51.907 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
19-Oct-2018 13:42:51.907 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.24
19-Oct-2018 13:42:51.925 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
19-Oct-2018 13:42:51.942 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
19-Oct-2018 13:42:51.944 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 122 ms
Connected to server
[2018-10-19 01:42:52,256] Artifact avtiviti20181017:war exploded: Artifact is being deployed, please wait...
19-Oct-2018 13:43:02.581 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/F:/ideaProject/avtiviti20181017/target/avtiviti20181017/WEB-INF/lib/logback-classic-1.1.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/F:/ideaProject/avtiviti20181017/target/avtiviti20181017/WEB-INF/lib/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
13:43:02,707 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
13:43:02,708 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
13:43:02,708 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/F:/ideaProject/avtiviti20181017/target/avtiviti20181017/WEB-INF/classes/logback.xml]
13:43:02,815 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
13:43:02,822 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/F:/ideaProject/avtiviti20181017/target/avtiviti20181017/WEB-INF/classes/logback.xml] 
13:43:02,822 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 30 seconds
13:43:02,833 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
13:43:02,842 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
13:43:02,854 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@20:22 - no applicable action for [Encoding], current ElementPath  is [[configuration][appender][Encoding]]
13:43:02,857 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
13:43:02,925 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
13:43:02,931 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
13:43:02,932 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@34:23 - no applicable action for [Encoding], current ElementPath  is [[configuration][appender][Encoding]]
13:43:02,944 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@25964013 - No compression will be used
13:43:02,947 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@25964013 - Will use the pattern C:/Users/sukai/.IntelliJIdea2017.2/system/tomcat/Unnamed_avtiviti20181017/logs//JKApp.log.%d{yyyy-MM-dd}.log for the active file
13:43:02,957 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'C:/Users/sukai/.IntelliJIdea2017.2/system/tomcat/Unnamed_avtiviti20181017/logs//JKApp.log.%d{yyyy-MM-dd}.log'.
13:43:02,957 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
13:43:02,958 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Fri Oct 19 13:43:02 CST 2018
13:43:02,962 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - This appender no longer admits a layout as a sub-component, set an encoder instead.
13:43:02,962 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
13:43:02,962 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
13:43:02,966 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: C:/Users/sukai/.IntelliJIdea2017.2/system/tomcat/Unnamed_avtiviti20181017/logs//JKApp.log.2018-10-19.log
SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
13:43:02,966 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [null]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
13:43:02,968 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
13:43:02,968 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
13:43:02,970 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
13:43:02,970 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.db.DBAppender]
13:43:02,979 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [DB]
13:43:02,985 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@61:67 - no applicable action for [dataSource], current ElementPath  is [[configuration][appender][connectionSource][dataSource]]
13:43:02,986 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@66:75 - no applicable action for [sqlDialect], current ElementPath  is [[configuration][appender][connectionSource][dataSource][sqlDialect]]
13:43:03,495 |-INFO in ch.qos.logback.core.db.DriverManagerConnectionSource@7dc05e76 - Driver name=MySQL Connector Java
13:43:03,495 |-INFO in ch.qos.logback.core.db.DriverManagerConnectionSource@7dc05e76 - Driver version=mysql-connector-java-5.1.32 ( Revision: jess.balint@oracle.com-20140716155848-mlwabor66widht1n )
13:43:03,495 |-INFO in ch.qos.logback.core.db.DriverManagerConnectionSource@7dc05e76 - supportsGetGeneratedKeys=true
13:43:03,504 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
13:43:03,507 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@28b49c25 - Registering current configuration as safe fallback point

13:43:03.573[RMI TCP Connection(2)-127.0.0.1][INFO ]Root WebApplicationContext: initialization started ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.ContextLoader.initWebApplicationContext:189
13:43:03.619[RMI TCP Connection(2)-127.0.0.1][INFO ]Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1f122fbc: display name [Root WebApplicationContext]; startup date [Fri Oct 19 13:43:03 CST 2018]; root of context hierarchy ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.prepareRefresh:411
13:43:03.876[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-activemq.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:04.501[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-activiti.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:04.797[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-dao.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:05.059[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-quartz.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:05.098[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-redis.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:05.126[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-shiro.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:05.153[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-redis.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:05.175[RMI TCP Connection(2)-127.0.0.1][INFO ]Overriding bean definition for bean 'redisManager': replacing [Generic bean: class [org.crazycake.shiro.RedisManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-redis.xml]] with [Generic bean: class [org.crazycake.shiro.RedisManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-redis.xml]] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.s.DefaultListableBeanFactory.registerBeanDefinition:467
13:43:05.177[RMI TCP Connection(2)-127.0.0.1][INFO ]Overriding bean definition for bean 'redisSessionDAO': replacing [Generic bean: class [org.crazycake.shiro.RedisSessionDAO]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-redis.xml]] with [Generic bean: class [org.crazycake.shiro.RedisSessionDAO]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-redis.xml]] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.s.DefaultListableBeanFactory.registerBeanDefinition:467
13:43:05.187[RMI TCP Connection(2)-127.0.0.1][INFO ]Loading XML bean definitions from file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-trans.xml] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.x.XmlBeanDefinitionReader.loadBeanDefinitions:323
13:43:05.775[RMI TCP Connection(2)-127.0.0.1][INFO ]Overriding bean definition for bean 'transactionManager': replacing [Generic bean: class [org.springframework.jdbc.datasource.DataSourceTransactionManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-activiti.xml]] with [Generic bean: class [org.springframework.jdbc.datasource.DataSourceTransactionManager]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-trans.xml]] ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.s.DefaultListableBeanFactory.registerBeanDefinition:467
13:43:05.825[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1f122fbc]: org.springframework.beans.factory.support.DefaultListableBeanFactory@174d8429 ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.obtainFreshBeanFactory:426
13:43:06.153[RMI TCP Connection(2)-127.0.0.1][INFO ]No cache or cacheManager properties have been set.  Authorization cache cannot be obtained. ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.a.s.r.AuthorizingRealm.getAuthorizationCacheLazy:248
13:43:06.154[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'monitorRealm' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:06.208[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:06.273[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'redisManager' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:06.310[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'shiroCacheManager' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:06.345[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'redisSessionDAO' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:06.370[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'shareSession' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:06.372[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'sessionManager' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:06.396[RMI TCP Connection(2)-127.0.0.1][INFO ]Bean 'securityManager' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.s.XmlWebApplicationContext.postProcessAfterInitialization:1196
13:43:08.099[RMI TCP Connection(2)-127.0.0.1][INFO ]Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@174d8429: defining beans [dataSourceActiviti,transactionManager,processEngineConfiguration,processEngine,repositoryService,runtimeService,taskService,historyService,managementService,identityService,formService,dynamicBpmnService,activitiRule,helloBean,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,org.springframework.scheduling.quartz.SchedulerFactoryBean#0,SMSScheduler,SMSSDetail_1,cronTrigger_1,SMSSDetail_2,cronTrigger_2,redisManager,redisSessionDAO,shiroFilter,lifecycleBeanPostProcessor,monitorRealm,securityManager,org.springframework.beans.factory.config.MethodInvokingFactoryBean#0,org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator#0,org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0,shiroEhcacheManager,shiroCacheManager,sessionManager,shareSession,txAdvice]; root of factory hierarchy ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.s.DefaultListableBeanFactory.preInstantiateSingletons:414
13:43:08.615[RMI TCP Connection(2)-127.0.0.1][INFO ]Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@174d8429: defining beans [dataSourceActiviti,transactionManager,processEngineConfiguration,processEngine,repositoryService,runtimeService,taskService,historyService,managementService,identityService,formService,dynamicBpmnService,activitiRule,helloBean,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,org.springframework.scheduling.quartz.SchedulerFactoryBean#0,SMSScheduler,SMSSDetail_1,cronTrigger_1,SMSSDetail_2,cronTrigger_2,redisManager,redisSessionDAO,shiroFilter,lifecycleBeanPostProcessor,monitorRealm,securityManager,org.springframework.beans.factory.config.MethodInvokingFactoryBean#0,org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator#0,org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0,shiroEhcacheManager,shiroCacheManager,sessionManager,shareSession,txAdvice]; root of factory hierarchy ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.b.f.s.DefaultListableBeanFactory.destroySingletons:421
13:43:08.626[RMI TCP Connection(2)-127.0.0.1][ERROR]Context initialization failed ProcessDefinitionId=     executionId= mdcProcessInstanceID= mdcBusinessKey= o.s.w.c.ContextLoader.initWebApplicationContext:215
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineConfiguration' defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-activiti.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource' of bean class [org.activiti.spring.SpringProcessEngineConfiguration]: Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1648)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
19-Oct-2018 13:43:08.633 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
19-Oct-2018 13:43:08.636 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:463)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:413)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/349453949.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource' of bean class [org.activiti.spring.SpringProcessEngineConfiguration]: Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:801)
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
	... 62 common frames omitted
19-Oct-2018 13:43:08.681 WARNING [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2018-10-19 01:43:08,702] Artifact avtiviti20181017:war exploded: Error during artifact deployment. See server log for details.

Spring加载了activiti配置的bean: 

 报错信息:

 Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource' of bean class [org.activiti.spring.SpringProcessEngineConfiguration]: Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineConfiguration' defined in file [F:\ideaProject\avtiviti20181017\target\avtiviti20181017\WEB-INF\classes\spring\applicationContext-activiti.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource' of bean class [org.activiti.spring.SpringProcessEngineConfiguration]: Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
19-Oct-2018 13:43:08.633 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
19-Oct-2018 13:43:08.636 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource' of bean class [org.activiti.spring.SpringProcessEngineConfiguration]: Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:801)
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
	... 62 common frames omitted
19-Oct-2018 13:43:08.681 WARNING [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2018-10-19 01:43:08,702] Artifact avtiviti20181017:war exploded: Error during artifact deployment. See server log for details.

 配置文件:

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID" version="2.5">
  <display-name>ActivitiDemo</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>


  <!-- 加载spring容器 -->
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:spring/applicationContext-*.xml</param-value>
  </context-param>
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <!-- 解决post乱码 -->
  <filter>
    <filter-name>CharacterEncodingFilter</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>
  <filter-mapping>
    <filter-name>CharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>


  <!-- springmvc的前端控制器 -->
  <servlet>
    <servlet-name>ActivitiDemo</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <!-- contextConfigLocation不是必须的, 如果不配置contextConfigLocation, springmvc的配置文件默认在:WEB-INF/servlet的name+"-servlet.xml" -->
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:spring/springmvc.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>ActivitiDemo</servlet-name>
    <!-- 伪静态化    seo  -->
    <url-pattern>/</url-pattern>
  </servlet-mapping>
</web-app>

spring/applicationContext-activiti.xml

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
       xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">

    <!--druid数据源-->
<!--    <bean id ="dataSourceActiviti" class="com.alibaba.druid.pool.DruidDataSource">-->
        <!--采用内存数据库-->
        <!-- <property name="url" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000;MVCC=TRUE" />
         <property name="driverClassName" value="org.h2.Driver" />
         <property name="username" value="sa" />
         <property name="password" value="" />-->

        <!--自己本地的数据库-->
    <!--    <property name="url" value="jdbc:mysql://localhost:3306/activiti8unit?useUnicode=true&amp;characterEncoding=utf-8&amp;usessl=false" />
        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <property name="username" value="root" />
        <property name="password" value="root" />
        <property name="initialSize" value="1"/>
        <property name="maxActive" value="10"/>
        <property name="filters" value="stat,slf4j"/>
    </bean>-->

    <!-- 配置数据源 -->
    <bean id="dataSourceActiviti" class="org.apache.commons.dbcp.BasicDataSource"
          destroy-method="close">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost:3306/activiti8unit?useUnicode=true&amp;characterEncoding=utf-8&amp;usessl=false"/>
        <property name="username" value="root"/>
        <property name="password" value="root"/>
        <!-- 初始化连接大小 -->
        <property name="initialSize" value="1"></property>
        <!-- 连接池最大数量 -->
        <property name="maxActive" value="10"></property>
        <!-- 连接池最大空闲 -->
        <property name="maxIdle" value="10"></property>
        <!-- 连接池最小空闲 -->
        <property name="minIdle" value="2"></property>
        <!-- 获取连接最大等待时间 -->
        <property name="maxWait" value="10000"></property>
    </bean>
    <!--创建事物管理器-->
    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSourceActiviti"/>

    </bean>
   <!-- p:name="yiibai"-->

    <!--Spring集成-->
    <!--要单独创建数据库,因为speing要单独对我们的事物做处理 事物是基于数据库的事物-->
    <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">

         <property name="dataSource" ref="dataSourceActiviti"/>
        <property name="databaseSchemaUpdate" value="true" />
        <!--注入事物管理器-->
        <property name="transactionManager" ref="transactionManager"/>

    </bean>
    <!--构造流程引擎对象-->
    <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
        <!--指定流程引擎配置对象-->
        <property name="processEngineConfiguration" ref="processEngineConfiguration"/>
    </bean>

    <!--把服务暴露给Spring-->
    <!-- 创建activiti提供的各种服务 -->
    <!-- 工作流仓储服务 -->
    <bean id="repositoryService" factory-bean="processEngine"
          factory-method="getRepositoryService" />
    <!-- 工作流运行服务 -->
    <bean id="runtimeService" factory-bean="processEngine"
          factory-method="getRuntimeService" />
    <!-- 工作流任务服务 -->
    <bean id="taskService" factory-bean="processEngine"
          factory-method="getTaskService" />
    <!-- 工作流历史数据服务 -->
    <bean id="historyService" factory-bean="processEngine"
          factory-method="getHistoryService" />
    <!-- 工作流管理服务 -->
    <bean id="managementService" factory-bean="processEngine"
          factory-method="getManagementService" />
    <!-- 工作流唯一服务(用户服务) -->
    <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService"/>
    <!-- 表单服务 -->
    <bean id="formService" factory-bean="processEngine" factory-method="getFormService"/>
    <bean id="dynamicBpmnService" factory-bean="processEngine" factory-method="getDynamicBpmnService"/>


    <!--配置测试 Rule-->
    <bean id="activitiRule" class="org.activiti.engine.test.ActivitiRule">
        <property name="processEngine"  ref="processEngine"/>
    </bean>
    <bean id="helloBean" class="com.su.test.HelloBean"></bean>

</beans>


pom:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.su.Activiti</groupId>
  <artifactId>avtiviti20181017</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>war</packaging>

  <name>avtiviti20181017 Maven Webapp</name>
  <!-- FIXME change it to the project's website -->
  <url>http://www.example.com</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!-- spring版本号 -->
    <!--<spring.version>4.2.5.RELEASE</spring.version>-->
    <spring.version>4.1.6.RELEASE</spring.version>
    <!-- mybatis版本号 -->
    <mybatis.version>3.2.4</mybatis.version>
    <!-- log4j日志文件管理包版本 -->
    <slf4j.version>1.7.6</slf4j.version>
    <log4j.version>1.2.9</log4j.version>
    <!-- plugin versions -->
    <plugin.mybatis.generator>1.3.1</plugin.mybatis.generator>
    <plugin.maven-compiler>3.1</plugin.maven-compiler>
    <!--activiti版本-->
    <activiti.version>5.21.0</activiti.version>

  </properties>


  <dependencies>
    <!-- spring核心包 -->
    <!-- springframe start -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>4.1.6.RELEASE</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-oxm</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>${spring.version}</version>
    </dependency>
<!--    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context-support</artifactId>
      <version>${spring.version}</version>
    </dependency>-->

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aspects</artifactId>
      <version>${spring.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${spring.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-expression</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <!-- springframe end -->
    <!--定时器-->
    <dependency>
      <groupId>org.quartz-scheduler</groupId>
      <artifactId>quartz</artifactId>
      <!--<version>1.8.6</version>-->
      <version>2.2.1</version>
    </dependency>
   <!-- <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
      <version>2.5.6.SEC03</version>
    </dependency>-->
    <!-- mybatis核心包 -->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>${mybatis.version}</version>
    </dependency>
    <!-- mybatis/spring包 -->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-spring</artifactId>
      <version>1.2.2</version>
    </dependency>
    <!-- mysql驱动包 -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.32</version>
    </dependency>
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>druid</artifactId>
      <version>1.1.4</version>
    </dependency>
    <dependency>
      <groupId>com.zaxxer</groupId>
      <artifactId>HikariCP</artifactId>
      <version>2.7.8</version>
    </dependency>
    <dependency>
      <groupId>c3p0</groupId>
      <artifactId>c3p0</artifactId>
      <version>0.9.1.1</version>
    </dependency>

    <dependency>
      <groupId>com.microsoft.sqlserver</groupId>
      <artifactId>mssql-jdbc</artifactId>
      <version>6.2.2.jre7</version>
    </dependency>
    <!-- junit测试包 -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <!-- dbcp数据源 -->
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.4</version>
    </dependency>
    <!-- json数据 -->
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
      <version>1.9.13</version>
    </dependency>
    <!-- 映入JSON -->
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.8.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.8.0</version>
    </dependency>

    <!-- 日志文件管理包 -->
    <!-- log start -->
    <!-- Logging -->
  <!--  <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.6.6</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <version>1.6.6</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.6.6</version>
      <scope>runtime</scope>
    </dependency>-->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>1.1.11</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.1.11</version>
    </dependency>

    <!-- log end -->
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.6</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.1</version>
    </dependency>

    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>1.7.4</version>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.3</version>
    </dependency>
    <!--servlet-->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.0</version>
      <scope>provided</scope>
    </dependency>
    <!--xml processing begin-->
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>
    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.2.2</version>
    </dependency>
    <!--xml processing end-->

    <!--json processing-->
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>fastjson</artifactId>
      <version>1.1.41</version>
    </dependency>

    <!--httpClient-->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.5.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpmime</artifactId>
      <version>4.5.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.4.1</version>
    </dependency>
    <dependency>
      <groupId>org.jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>1.1</version>
    </dependency>

    <!--upload,download -->
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.3.1</version>
    </dependency>

    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.8.3</version>
    </dependency>

    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.3.2</version>
    </dependency>

    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>

    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4.7</version>
    </dependency>

    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <version>2.4</version>
      <classifier>jdk15</classifier>
    </dependency>

    <dependency>
      <groupId>com.aliyun.oss</groupId>
      <artifactId>aliyun-sdk-oss</artifactId>
      <version>2.2.1</version>
    </dependency>

    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.1</version>
    </dependency>

    <dependency>
      <groupId>com.qiniu</groupId>
      <artifactId>qiniu-java-sdk</artifactId>
      <version>[7.0.0, 7.0.99]</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi</artifactId>
      <version>3.8</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/bsh/bsh -->
    <dependency>
      <groupId>bsh</groupId>
      <artifactId>bsh</artifactId>
      <version>1.3.0</version>
    </dependency>

    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <version>1.6</version>
    </dependency>


    <!-- 添加shiro web支持 -->
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-core</artifactId>
      <version>1.2.5</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-guice</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-all</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-web</artifactId>
      <version>1.2.5</version>
    </dependency>
    <dependency>
      <groupId>fakepath</groupId>
      <artifactId>shiro-redis</artifactId>
      <version>3.0.0</version>
    </dependency>
    <!-- 添加shiro spring支持 -->
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-spring</artifactId>
      <version>1.2.5</version>
    </dependency>
    <dependency>
      <groupId>net.sf.ehcache</groupId>
      <artifactId>ehcache</artifactId>
      <version>1.6.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-all</artifactId>
      <version>1.2.2</version>
    </dependency>
    <dependency>
      <groupId>com.tancheng.tcwl</groupId>
      <artifactId>tcwl</artifactId>
      <version>1.1.2</version>
      <classifier>common</classifier>
    </dependency>
    <dependency>
      <groupId>com.tancheng.xmemcached</groupId>
      <artifactId>xmemcached</artifactId>
      <version>2.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>3.8</version>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.jexcelapi</groupId>
      <artifactId>jxl</artifactId>
      <version>2.6.12</version>
    </dependency>

    <!--流程引擎-->
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-spring</artifactId>
      <version>${activiti.version}</version>
    </dependency>

    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-engine</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-bpmn-converter</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-json-converter</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-form-api</artifactId>
      <!--<version>${activiti.version}</version>-->
      <version>6.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-form-model</artifactId>
      <!--<version>${activiti.version}</version>-->
      <version>6.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-rest</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-common-rest</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-image-generator</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-engine</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-bpmn-model</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-process-validation</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-dmn-api</artifactId>
      <version>6.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-bpmn-layout</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-json-converter</artifactId>
      <version>${activiti.version}</version>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-bpmn-converter</artifactId>
      <version>${activiti.version}</version>
    </dependency>
 <!--   <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-root</artifactId>
      <version>${activiti.version}</version>
    </dependency>-->


    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <version>1.8.3</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>23.0</version>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.3.176</version>
    </dependency>

   <!-- redis-->
    <dependency>
      <groupId>redis.clients</groupId>
      <artifactId>jedis</artifactId>
      <version>2.9.0</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-redis</artifactId>
      <version>1.8.9.RELEASE</version>
    </dependency>

    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>dubbo</artifactId>
      <version>2.5.3</version>
    </dependency>
    <dependency>
      <groupId>com.github.pagehelper</groupId>
      <artifactId>pagehelper</artifactId>
      <version>4.1.4</version>
    </dependency>
  </dependencies>

  <build>
    <finalName>avtiviti20181017</finalName>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.7.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>

        <!-- mybatis generator 自动生成代码插件 -->
        <plugin>
          <groupId>org.mybatis.generator</groupId>
          <artifactId>mybatis-generator-maven-plugin</artifactId>
          <version>1.3.2</version>
          <configuration>
            <configurationFile>${basedir}/src/main/resources/generator/generatorConfig.xml</configurationFile>
            <overwrite>true</overwrite>
            <verbose>true</verbose>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>

test代码:

测试中 代码没问题,配置文件也能加载

import static org.junit.Assert.assertEquals;

import org.activiti.engine.*;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.activiti.engine.test.ActivitiRule;
import org.activiti.engine.test.Deployment;
import org.activiti.spring.SpringProcessEngineConfiguration;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import org.apache.commons.dbcp.BasicDataSource;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring/applicationContext-activiti.xml"})
public class ConfigStringTest {
 private static final Logger LOGGER =   LoggerFactory.getLogger(ConfigStringTest.class);

 @Rule
/* public ActivitiRule activitiRule = new ActivitiRule();*///整个流程引擎的启动和创建过程都固定好了
/* public ActivitiRule activitiRule = new ActivitiRule("activiti_mdc.cfg.xml");*/
 @Autowired
 public  ActivitiRule activitiRule;
 @Autowired
 public RuntimeService runtimeService;
 @Autowired
 public RepositoryService repositoryService;
 @Autowired
 public FormService formService;

/* public  FormEngineFormService  formEngineFormService;
 public  FormEngineRepositoryService  formEngineRepositoryService;*/
@Autowired
 public DynamicBpmnService dynamicBpmnService;
 @Autowired
 public HistoryService historyService;
 @Autowired
 public  IdentityService identityService;
@Autowired
 public  ManagementService  managementService;
 @Autowired
 public  BasicDataSource   basicDataSource;

 @Autowired
 public  TaskService   taskService;

 @Test
 @Deployment(resources = {"activitit/activitit-bpmn20/my-process_spring.bpmn20.xml"})//加载流程引擎文件(测试)
 public void test() {
  //打开MDC记录日志
  /*LogMDC.setMDCEnabled(true);*///正常执行是不打印日志
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("my-process");
  Task task = taskService.createTaskQuery().singleResult();
  assertEquals("Activiti is awesome!", task.getName());
  taskService.complete(task.getId());


 }

 @Test
 public void a(){
  SpringProcessEngineConfiguration a = new SpringProcessEngineConfiguration();
  a.setDataSource(basicDataSource);
 }

}

==============================================================================================

==============================================================================================

问题已经找到,原因是 Activiti 6.0.0 jar 与  dubbo 2.5.3 jar包冲突;

把这个Jar删掉问题就完美解决!

不容易啊!

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

_无往而不胜_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值