{"id":625,"date":"2021-11-29T05:30:42","date_gmt":"2021-11-29T05:30:42","guid":{"rendered":"http:\/\/robinluo.top\/?p=625"},"modified":"2021-11-29T16:08:59","modified_gmt":"2021-11-29T16:08:59","slug":"spring-activiti-starter","status":"publish","type":"post","link":"https:\/\/robinluo.top\/?p=625","title":{"rendered":"spring activiti starter"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">&lt;dependency>\n    &lt;groupId>org.activiti&lt;\/groupId>\n    &lt;artifactId>activiti-spring-boot-starter&lt;\/artifactId>\n    &lt;version>7.1.0.M6&lt;\/version>\n&lt;\/dependency>\n\n\u6ce8\u5165activiti \u7ec4\u4ef6\n\n\n\u521d\u59cb\u5316activiti \u8868\n\n\u4ee5\u4e0b\u5355\u5143\u6d4b\u8bd5\u7528\u4f8b \u7528\u6765\u521d\u59cb\u5316 activiti \u8868<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>@SpringBootTest\r\nclass ActivitiApplicationTests {\r\n\r\n    @Test\r\n    void contextLoads() {\r\n        ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(\"activiti.cfg.xml\");\r\n        processEngineConfiguration.buildProcessEngine();\r\n    }\r\n\r\n}\r\n<\/code><\/pre>\n\n\n\n<p>activiti.cfg.xml \u662f\u5728\u7c7b\u76ee\u5f55\u4e0b\u7684 \u4e00\u4e2aspring beans \u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\"\r\n       xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n       xsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans   http:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\">\r\n\r\n\r\n    &lt;bean id=\"dataSource\" class=\"com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper\" >\r\n        &lt;property name=\"driverClassName\" value=\"com.mysql.cj.jdbc.Driver\" \/>\r\n        &lt;property name=\"url\" value=\"jdbc:mysql:\/\/mysql.robinluo.top\/activiti?characterEncoding=UTF-8&amp;amp;nullCatalogMeansCurrent=true&amp;amp;serverTimezone=GMT&amp;amp;useSSL=false\" \/>\r\n        &lt;property name=\"username\" value=\"admin\" \/>\r\n        &lt;property name=\"password\" value=\"RobinLuo@2021\" \/>\r\n    &lt;\/bean>\r\n\r\n\r\n    &lt;bean id=\"processEngineConfiguration\" class=\"org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration\">\r\n        &lt;!-- ... -->\r\n        &lt;property name=\"databaseSchemaUpdate\" value=\"true\" \/>\r\n        &lt;property name=\"dataSource\" ref=\"dataSource\" \/>\r\n    &lt;\/bean>\r\n\r\n&lt;\/beans><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&lt;dependency> &lt;groupId>org.activiti&lt;\/groupId> &lt;artifactId>activiti-spring-boot-starter&lt;\/artifactId> &lt;version>7.1.0.M6&lt;\/version> &lt;\/dependency> \u6ce8\u5165activiti \u7ec4\u4ef6 \u521d\u59cb\u5316activiti \u8868 \u4ee5\u4e0b\u5355\u5143\u6d4b\u8bd5\u7528\u4f8b \u7528\u6765\u521d\u59cb\u5316 activiti \u8868 activiti.cfg.xml \u662f\u5728\u7c7b\u76ee\u5f55\u4e0b\u7684 \u4e00\u4e2aspring beans \u914d\u7f6e\u6587\u4ef6<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[105],"_links":{"self":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/625"}],"collection":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=625"}],"version-history":[{"count":2,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/625\/revisions"}],"predecessor-version":[{"id":627,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/625\/revisions\/627"}],"wp:attachment":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}