camunda源代码编译运行(二):构建并运行camunda源代码工程

接上一篇文章:camunda源代码编译运行(一):下载编译camunda源代码

Camunda 7.19源代码一共有178个maven工程和1个angular前端工程,这么多工程中包括了大量的QA测试包、JDK不同版本适配(比如:Java EE和Jakarta EE)、多种中间件部署包(比如:Tomcat、Jboss、wildfly)、spring和springboot集成适配包等,我们仅仅需要把Camunda的流程引擎包和REST服务包的源代码拿来使用,下面通过IDEA开发工具,从代码层面整合Camunda的流程引擎源代码。

3.1、Camunda包结构分析

Camunda 7.19源代码一共有178个maven工程和1个angular前端工程,他们之间有什么样的依赖和引用关系,我们首先要分析清楚,然后才能把流程引擎和resf服务包的源代码拷贝过来使用。

下面我们就分析camunda-bpm-platform-7.19.0源代码中pom工程的引用和依赖关系。

首先,打开camunda-bpm-platform-7.19.0\engine工程的pom.xml,发现该工程继承了父工程camunda-database-settings。

打开父工程camunda-bpm-platform-7.19.0\database的pom.xml,发现它又继承了父工程camunda-parent。

打开父工程camunda-bpm-platform-7.19.0\parent的pom.xml,发现它又继承了父工程camunda-root。

打开父工程camunda-bpm-platform-7.19.0根目录下的pom.xml,发现它又继承了父工程camunda-bpm-release-parent,该工程没有源代码,就是camunda官方定义的发布版本的顶级工程了,是通过mvn依赖动态下载的。

至此,我们从camunda流程引擎内核包入手分析,找到了相关maven工程父子继承关系,即engine(BPMN流程引擎核心工程)—》database(多种数据库配置工程)—》parent(第三方Jar配置工程)—》root(camunda源代码聚合工程)。

有了以上分析,下面我们在自己的笔记本电脑上新建Java工程,把camunda核心源代码拷贝进来编译通过,最后通过springboot方式,把camunda源代码运行起来。

3.2、新建maven聚合工程

新建pom父工程,命名为camunda7-source-dev,version设置为7.19-SNAPSHOT,注意packaging的值为pom,该工程为聚合项目。

该工程的目的就是多个maven工程聚合,也可以根据需要配置一些manve的全局设置,比如仓库地址。

Pom.xml源文件如下:

<?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.yuncheng</groupId><artifactId>camunda7-source-dev</artifactId><version>7.19-SNAPSHOT</version><packaging>pom</packaging><modules>
<!--        <module>camunda-engine</module>-->
<!--        <module>camunda-engine-rest</module>-->
<!--        <module>camunda-boot</module>--></modules><properties><maven.compiler.source>11</maven.compiler.source><maven.compiler.target>11</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties></project>

3.3、新建maven父工程

通过以上分析camunda工程结构,发现camunda-engine流程引擎依赖了camunda-parent工程,而camunda-parent工程里定义了流程引擎需要的第三方Jar。这里我们也参考camunda-parent工程,新建一个自己的parent工程。

在刚才建的聚合工程camunda7-source-dev下,新建一个camunda-parent子工程。

我们需要把camunda-bpm-platform-7.19.0\parent\pom.xml文件内容拷贝过来,最后的pom.xml源文件如下:

<?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><parent><groupId>com.yuncheng</groupId><artifactId>camunda7-source-dev</artifactId><version>7.19-SNAPSHOT</version></parent><packaging>pom</packaging><artifactId>camunda-parent</artifactId><properties><maven.compiler.source>11</maven.compiler.source><maven.compiler.target>11</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><license.includeTransitiveDependencies>false</license.includeTransitiveDependencies><!-- These properties are used in both the BOM as well as camunda-parent and subprojects --><version.camunda>7.19.0</version.camunda><version.mybatis>3.5.6</version.mybatis><version.joda-time>2.1</version.joda-time><version.uuid-generator>3.2.0</version.uuid-generator><version.camunda.commons>1.12.0</version.camunda.commons><version.camunda.connect>1.5.6</version.camunda.connect><version.camunda.spin>1.19.0</version.camunda.spin><version.camunda.template-engines>2.1.0</version.camunda.template-engines><version.camunda.ee.xslt-plugin>1.1.0</version.camunda.ee.xslt-plugin><version.feel-scala>1.15.3</version.feel-scala><plugin.version.javadoc>3.0.1</plugin.version.javadoc><!-- database driver versions --><version.h2>2.1.214</version.h2><version.h2-v1>1.4.190</version.h2-v1><!-- used for instance migration qa --><version.oracle-12>12.1.0.2</version.oracle-12><version.oracle-19>19.3.0.0</version.oracle-19><version.oracle>${version.oracle-12}</version.oracle><version.mariadb>1.7.6</version.mariadb><version.mariadb-v1>1.1.8</version.mariadb-v1><version.mysql>8.0.32</version.mysql><version.sqlserver>8.4.1.jre8</version.sqlserver><version.db2-11.5>11.5.0.0</version.db2-11.5><version.db2>${version.db2-11.5}</version.db2><version.postgresql>42.5.4</version.postgresql><version.liquibase>4.8.0</version.liquibase><!-- CockroachDB is compatible with PostgreSQL 9.5,so a different version of the JDBC driver needs to be used --><version.cockroachdb>42.2.9</version.cockroachdb><!-- needed for sql script and backward compatibility checks --><camunda.version.old>7.18.0</camunda.version.old><!-- Testcontainers JDBC URL parameters. By default, an empty string --><database.tc.params /><version.quarkus>2.16.4.Final</version.quarkus><version.spring.framework>5.3.22</version.spring.framework><version.spring-boot>2.7.9</version.spring-boot><version.cxf>3.0.3</version.cxf><version.resteasy>3.15.3.Final</version.resteasy><version.jersey2>2.34</version.jersey2><!-- use minimum version of resteasy and jersey --><version.jaxrs.api>2.0.1.Final</version.jaxrs.api><version.groovy>2.4.21</version.groovy><version.graal.js>21.1.0</version.graal.js><version.icu.icu4j>68.2</version.icu.icu4j><version.gson>2.8.9</version.gson><version.openjpa>2.4.3</version.openjpa><version.hibernate>5.6.5.Final</version.hibernate><version.hikaricp>4.0.3</version.hikaricp><version.jackson>2.14.1</version.jackson><version.xml.bind-api>2.3.3</version.xml.bind-api><version.xml.jaxb-impl>2.3.6</version.xml.jaxb-impl><version.snakeyaml>1.33</version.snakeyaml><version.slf4j>1.7.26</version.slf4j><version.logback>1.2.11</version.logback><version.junit>4.13.1</version.junit><version.assertj>2.9.1</version.assertj><version.mockito>4.3.1</version.mockito><version.wiremock>2.27.2</version.wiremock><version.wiremock-jre8>2.27.2</version.wiremock-jre8><version.testcontainers>1.16.0</version.testcontainers><version.commonj>1.1.0</version.commonj><version.bouncycastle>1.47</version.bouncycastle><!-- application servers --><version.wildfly>27.0.1.Final</version.wildfly><version.wildfly.core>19.0.1.Final</version.wildfly.core><version.wildfly26>26.0.1.Final</version.wildfly26><version.wildfly26.core>18.0.4.Final</version.wildfly26.core><version.tomcat>9.0.72</version.tomcat><version.arquillian>1.1.10.Final</version.arquillian><version.shrinkwrap.resolvers>2.2.2</version.shrinkwrap.resolvers><version.selenium>4.1.4</version.selenium><version.freemarker>2.3.31</version.freemarker><version.jboss-javaee-spec>3.0.2.Final</version.jboss-javaee-spec><version.jakarta-ee-spec>10.0.0</version.jakarta-ee-spec></properties><dependencyManagement><dependencies><dependency><groupId>com.h2database</groupId><artifactId>h2</artifactId><version>${version.h2}</version></dependency><dependency><groupId>com.oracle.jdbc</groupId><artifactId>ojdbc7</artifactId><version>${version.oracle}</version></dependency><dependency><groupId>com.oracle.ojdbc</groupId><artifactId>ojdbc8</artifactId><version>${version.oracle}</version></dependency><dependency><groupId>org.mariadb.jdbc</groupId><artifactId>mariadb-java-client</artifactId><version>${version.mariadb}</version></dependency><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId><version>${version.mysql}</version></dependency><dependency><groupId>com.microsoft.sqlserver</groupId><artifactId>mssql-jdbc</artifactId><version>${version.sqlserver}</version></dependency><dependency><groupId>org.postgresql</groupId><artifactId>postgresql</artifactId><version>${version.postgresql}</version></dependency><dependency><groupId>com.ibm.db2</groupId><artifactId>jcc</artifactId><version>${version.db2}</version></dependency><dependency><groupId>org.camunda.bpm</groupId><artifactId>camunda-bom</artifactId><version>${version.camunda}</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><build><pluginManagement><plugins><!-- test plugins --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.22.2</version><configuration><runOrder>hourly</runOrder><systemPropertyVariables><myWorkingDir>${project.build.directory}</myWorkingDir></systemPropertyVariables><argLine>-Xmx968m -Duser.language=en -Duser.region=US -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${project.build.directory}/heap_dump.hprof</argLine><redirectTestOutputToFile>true</redirectTestOutputToFile></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-failsafe-plugin</artifactId><version>2.16</version><configuration><argLine>-Xmx968m</argLine><runOrder>hourly</runOrder></configuration><executions><execution><goals><goal>integration-test</goal><goal>verify</goal></goals></execution></executions></plugin><!-- code plugins --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><version>2.8</version></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-resources-plugin</artifactId><version>2.6</version></plugin><!-- artifact plugins --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><configuration><createSourcesJar>true</createSourcesJar></configuration><executions><execution><phase>package</phase><goals><goal>shade</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><version>1.8</version></plugin><plugin><groupId>org.codehaus.mojo</groupId><artifactId>build-helper-maven-plugin</artifactId><version>1.9.1</version></plugin><plugin><groupId>org.codehaus.cargo</groupId><artifactId>cargo-maven3-plugin</artifactId><version>1.10.5</version></plugin><plugin><groupId>net.kennychua</groupId><artifactId>maven-urlpoller-plugin</artifactId><version>1.0.3</version></plugin><plugin><groupId>org.codehaus.mojo</groupId><artifactId>sql-maven-plugin</artifactId><version>1.5</version><configuration><keepFormat>true</keepFormat></configuration></plugin><plugin><groupId>org.codehaus.mojo</groupId><artifactId>clirr-maven-plugin</artifactId><version>2.8</version></plugin><plugin><groupId>org.codehaus.mojo</groupId><artifactId>exec-maven-plugin</artifactId><version>1.4.0</version></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>3.3.2</version></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><configuration><failOnError>false</failOnError><additionalJOptions><additionalJOption>-Xdoclint:none</additionalJOption><additionalJOption>--ignore-source-errors</additionalJOption></additionalJOptions><doctitle>Camunda Platform Javadocs ${project.version}</doctitle><windowtitle>Camunda Platform Javadocs ${project.version}</windowtitle></configuration></plugin></plugins></pluginManagement></build><profiles></profiles><repositories><repository><id>JBoss public</id><name>jboss</name><url>https://repository.jboss.org/nexus/content/groups/public/</url></repository><!-- required for commonJ dependency --><repository><id>com.springsource.repository.bundles.external</id><name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name><url>https://repo.spring.io/plugins-release</url></repository></repositories><licenses><license><name>The Apache Software License, Version 2.0</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url></license></licenses><organization><name>camunda services GmbH</name><url>http://www.camunda.com</url></organization><url>http://www.camunda.org</url>
</project>

3.4、新建流程引擎源码工程

在聚合工程camunda7-source-dev下,新建一个camunda-engine流程引擎子工程,需要把该工程的父工程配置为camunda-parent

我们需要把camunda-bpm-platform-7.19.0\engine\pom.xml文件内容拷贝过来,最后的pom.xml源文件如下:

<?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><parent><groupId>com.yuncheng</groupId><artifactId>camunda-parent</artifactId><version>7.19-SNAPSHOT</version><relativePath>../camunda-parent</relativePath></parent><artifactId>camunda-engine</artifactId><properties><maven.compiler.source>11</maven.compiler.source><maven.compiler.target>11</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><test.includes /><!-- without a special test profile we don't want to exclude anything, this expressions should never match --><test.excludes>$.</test.excludes><history.level>full</history.level><mail.server.port>5025</mail.server.port><authorizationCheckRevokes>auto</authorizationCheckRevokes><jdbcBatchProcessing>true</jdbcBatchProcessing><!-- We shade artifacts into the jar, so we need to generate a dependency BOMfor the license book --><skip-third-party-bom>false</skip-third-party-bom><camunda.artifact>org.camunda.bpm</camunda.artifact><version.camunda>7.19.0</version.camunda></properties><dependencyManagement><dependencies><dependency><groupId>org.camunda.bpm</groupId><artifactId>camunda-core-internal-dependencies</artifactId><version>${version.camunda}</version><scope>import</scope><type>pom</type></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-framework-bom</artifactId><version>${version.spring.framework}</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>jakarta.platform</groupId><artifactId>jakarta.jakartaee-bom</artifactId><version>${version.jakarta-ee-spec}</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><dependencies><!-- camunda dependencies --><dependency><groupId>org.camunda.bpm.model</groupId><artifactId>camunda-bpmn-model</artifactId></dependency><dependency><groupId>org.camunda.bpm.model</groupId><artifactId>camunda-cmmn-model</artifactId></dependency><dependency><groupId>org.camunda.bpm.dmn</groupId><artifactId>camunda-engine-dmn</artifactId><exclusions><exclusion><groupId>de.odysseus.juel</groupId><artifactId>juel-api</artifactId></exclusion><exclusion><groupId>de.odysseus.juel</groupId><artifactId>juel-spi</artifactId></exclusion><exclusion><groupId>de.odysseus.juel</groupId><artifactId>juel-impl</artifactId></exclusion><!-- these exclusions are needed when building with Maven >= 3.3see CAM-11822 for details --><exclusion><groupId>com.lihaoyi</groupId><artifactId>fastparse_2.13</artifactId></exclusion><exclusion><groupId>com.lihaoyi</groupId><artifactId>sourcecode_2.13</artifactId></exclusion><exclusion><groupId>com.lihaoyi</groupId><artifactId>geny_2.13</artifactId></exclusion><exclusion><groupId>org.scala-lang</groupId><artifactId>scala-library</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.camunda.commons</groupId><artifactId>camunda-commons-logging</artifactId></dependency><dependency><groupId>org.camunda.commons</groupId><artifactId>camunda-commons-typed-values</artifactId></dependency><dependency><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-beans</artifactId></dependency><dependency><groupId>joda-time</groupId><artifactId>joda-time</artifactId></dependency><dependency><groupId>com.google.code.gson</groupId><artifactId>gson</artifactId></dependency><dependency><groupId>org.camunda.connect</groupId><artifactId>camunda-connect-core</artifactId></dependency><dependency><groupId>org.camunda.connect</groupId><artifactId>camunda-connect-connectors-all</artifactId><scope>runtime</scope></dependency><!-- provided dependencies --><dependency><groupId>org.apache.ant</groupId><artifactId>ant</artifactId><scope>provided</scope></dependency><dependency><groupId>org.hibernate.javax.persistence</groupId><artifactId>hibernate-jpa-2.0-api</artifactId><scope>provided</scope></dependency><dependency><groupId>org.apache.geronimo.specs</groupId><artifactId>geronimo-jta_1.1_spec</artifactId><scope>provided</scope></dependency><dependency><groupId>com.fasterxml.uuid</groupId><artifactId>java-uuid-generator</artifactId><scope>provided</scope></dependency><dependency><groupId>org.jboss.spec</groupId><artifactId>jboss-javaee-web-6.0</artifactId><type>pom</type><scope>provided</scope></dependency><dependency><groupId>jakarta.transaction</groupId><artifactId>jakarta.transaction-api</artifactId><scope>provided</scope></dependency><dependency><groupId>jakarta.servlet</groupId><artifactId>jakarta.servlet-api</artifactId><scope>provided</scope></dependency><dependency><groupId>jakarta.ejb</groupId><artifactId>jakarta.ejb-api</artifactId><scope>provided</scope></dependency><dependency><groupId>org.apache.tomcat</groupId><artifactId>catalina</artifactId><scope>provided</scope></dependency><dependency><groupId>org.jboss</groupId><artifactId>jboss-vfs</artifactId><version>3.1.0.Final</version><scope>provided</scope></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-email</artifactId><scope>provided</scope></dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId><scope>provided</scope></dependency><!-- test dependencies  --><dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><scope>test</scope></dependency><dependency><groupId>com.h2database</groupId><artifactId>h2</artifactId><scope>test</scope></dependency><dependency><groupId>org.apache.openjpa</groupId><artifactId>openjpa</artifactId><scope>test</scope></dependency><dependency><groupId>org.subethamail</groupId><artifactId>subethasmtp-wiser</artifactId><scope>test</scope></dependency><dependency><!-- required for DiagramQueryTest --><groupId>commons-io</groupId><artifactId>commons-io</artifactId><scope>test</scope></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><scope>test</scope></dependency><dependency><groupId>org.camunda.commons</groupId><artifactId>camunda-commons-testing</artifactId><scope>test</scope></dependency><dependency><groupId>org.camunda.bpm</groupId><artifactId>camunda-test-utils-testcontainers</artifactId><version>${version.camunda}</version><scope>test</scope></dependency><dependency><groupId>org.hamcrest</groupId><artifactId>hamcrest-library</artifactId><scope>test</scope></dependency><dependency><groupId>org.assertj</groupId><artifactId>assertj-core</artifactId><scope>test</scope></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><scope>test</scope></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jcl-over-slf4j</artifactId><scope>test</scope></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jul-to-slf4j</artifactId><scope>test</scope></dependency><dependency><groupId>com.github.tomakehurst</groupId><artifactId>wiremock</artifactId><scope>test</scope></dependency><dependency><groupId>org.codehaus.groovy</groupId><artifactId>groovy-jsr223</artifactId><scope>test</scope></dependency><dependency><groupId>org.python</groupId><artifactId>jython</artifactId><scope>test</scope></dependency><dependency><groupId>org.jruby</groupId><artifactId>jruby-complete</artifactId><scope>test</scope></dependency><dependency><groupId>org.graalvm.js</groupId><artifactId>js</artifactId><scope>test</scope></dependency><dependency><groupId>org.graalvm.js</groupId><artifactId>js-scriptengine</artifactId><scope>test</scope></dependency><dependency><groupId>org.camunda.bpm</groupId><artifactId>camunda-bpm-archunit</artifactId><version>${version.camunda}</version><scope>test</scope></dependency></dependencies><build><!-- filter test configurations to inject properties --><resources><resource><directory>src/main/resources</directory></resource><resource><directory>src/main/resources</directory><filtering>true</filtering><includes><include>org/camunda/bpm/engine/product-info.properties</include></includes></resource></resources><testResources><testResource><directory>src/test/resources</directory></testResource><testResource><directory>src/test/resources</directory><filtering>true</filtering><includes><include>**/camunda.cfg.xml</include><include>**/*camunda.cfg.xml</include><include>**/camunda.cfg.*.xml</include><include>testconfig.properties</include><include>**/testcontainers.properties</include></includes></testResource></testResources><plugins><plugin><artifactId>maven-surefire-plugin</artifactId><configuration><failIfNoTests>false</failIfNoTests><trimStackTrace>false</trimStackTrace><redirectTestOutputToFile>true</redirectTestOutputToFile><includes><include>%regex[.*(${test.includes}).*Test.*.class]</include></includes><excludes><exclude>**/*TestCase.java</exclude><exclude>%regex[.*(${test.excludes}).*Test.*.class]</exclude></excludes><dependenciesToScan><dependency>org.camunda.bpm:camunda-bpm-archunit</dependency></dependenciesToScan></configuration></plugin><plugin><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><executions><execution><phase>generate-sources</phase><goals><goal>cleanVersions</goal></goals></execution><execution><id>bundle-manifest</id><phase>process-classes</phase><goals><goal>manifest</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><executions><execution><goals><goal>test-jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><configuration><promoteTransitiveDependencies>false</promoteTransitiveDependencies><createSourcesJar>true</createSourcesJar><createDependencyReducedPom>true</createDependencyReducedPom><keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope><artifactSet><excludes><exclude>org.camunda.bpm.model:*</exclude><exclude>org.camunda.bpm.dmn:*</exclude><exclude>org.camunda.commons:*</exclude><exclude>org.camunda.connect:*</exclude><exclude>org.camunda.feel:*</exclude><exclude>org.springframework:*</exclude><exclude>org.slf4j:*</exclude><exclude>org.apache.commons:*</exclude><exclude>com.sun.mail:*</exclude><exclude>javax.activation:*</exclude><exclude>org.mybatis:mybatis:*</exclude><exclude>commons-logging:*</exclude><exclude>joda-time:*</exclude></excludes></artifactSet><relocations><relocation><pattern>com.google.gson</pattern><shadedPattern>camundajar.impl.com.google.gson</shadedPattern></relocation></relocations><transformers><transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /></transformers><shadeTestJar>true</shadeTestJar></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><executions><execution><id>copy-upgrade-scripts-liquibase</id><phase>compile</phase><goals><goal>run</goal></goals><configuration><target><!-- copy all upgrade scripts after 7.15 --><mkdir dir="target/classes/org/camunda/bpm/engine/db/liquibase/upgrade" /><copy todir="target/classes/org/camunda/bpm/engine/db/liquibase/upgrade"><fileset dir="target/classes/org/camunda/bpm/engine/db/upgrade" excludes="*_6.*_*,*_7.0_*,*_7.1_*,*_7.2_*,*_7.3_*,*_7.4_*,*_7.5_*,*_7.6_*,*_7.7_*, *_7.8_*,*_7.9_*,*_7.10_*,*_7.11_*,*_7.12_*,*_7.13_*,*_7.14_*,*_7.15_*" /></copy></target></configuration></execution></executions></plugin></plugins><pluginManagement><plugins><!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--><plugin><groupId>org.eclipse.m2e</groupId><artifactId>lifecycle-mapping</artifactId><version>1.0.0</version><configuration><lifecycleMappingMetadata><pluginExecutions><pluginExecution><pluginExecutionFilter><groupId>org.apache.felix</groupId><artifactId>maven-bundle-plugin</artifactId><versionRange>[2.1.0,)</versionRange><goals><goal>cleanVersions</goal><goal>manifest</goal></goals></pluginExecutionFilter><action><ignore /></action></pluginExecution></pluginExecutions></lifecycleMappingMetadata></configuration></plugin></plugins></pluginManagement></build><profiles><profile><id>distro</id><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><executions><execution><id>attach-sources</id><phase>package</phase><goals><goal>jar-no-fork</goal></goals></execution></executions></plugin></plugins></build></profile><profile><id>h2-in-memory</id><activation><activeByDefault>true</activeByDefault></activation><properties><database.url>jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000;LOCK_TIMEOUT=10000</database.url><database.driver>org.h2.Driver</database.driver><database.username>sa</database.username><database.password /><hibernate.dialect>org.hibernate.dialect.H2Dialect</hibernate.dialect></properties><dependencies><dependency><groupId>com.h2database</groupId><artifactId>h2</artifactId><scope>test</scope></dependency></dependencies><build><pluginManagement><plugins><plugin><groupId>org.codehaus.mojo</groupId><artifactId>sql-maven-plugin</artifactId><dependencies><dependency><groupId>com.h2database</groupId><artifactId>h2</artifactId><version>${version.h2}</version></dependency></dependencies></plugin></plugins></pluginManagement></build></profile></profiles></project>

到这里,你可以通过IDEA的maven工具先执行mvn clean install命令,把相关依赖包下载下来,同时验证一下这几个maven工程是否能编译通过。

接下来,拷贝camunda-bpm-platform-7.19.0\engine引擎包下的源代码到自己刚刚新建的camunda-engine工程下,再执行mvn clean install命令进行编译打包,检查是否可以通过。由于camunda-engine源代码中有大量的测试用例,编译比较耗时,这里通过mvn clean install -DskipTests=true命令跳过测试用例执行。

3.5、新建REST服务源码工程

在聚合工程camunda7-source-dev下,新建一个camunda-engine-rest流程引擎rest服务子工程,需要把该工程的父工程配置为camunda-parent

我们需要把camunda-bpm-platform-7.19.0\engine-rest\engine-rest\pom.xml文件内容拷贝过来,最后的pom.xml源文件如下:

<?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><parent><groupId>com.yuncheng</groupId><artifactId>camunda-parent</artifactId><version>7.19-SNAPSHOT</version><relativePath>../camunda-parent</relativePath></parent><artifactId>camunda-engine-rest</artifactId><properties><maven.compiler.source>11</maven.compiler.source><maven.compiler.target>11</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><version.rest-assured>4.5.0</version.rest-assured><!-- override groovy version with the one used by rest-assured --><version.groovy>3.0.9</version.groovy><version.apache.httpcore>4.4.5</version.apache.httpcore><version.commons-codec>1.15</version.commons-codec><!-- pin tomcat version for engine-rest --><version.tomcat>7.0.50</version.tomcat><rest.http.port>38080</rest.http.port><javax.activation.version>1.1.1</javax.activation.version></properties><dependencyManagement><dependencies><dependency><!-- Import dependency management from Spring Boot --><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${version.spring-boot}</version><scope>import</scope><type>pom</type></dependency><dependency><groupId>org.codehaus.groovy</groupId><artifactId>groovy-bom</artifactId><version>${version.groovy}</version><scope>import</scope><type>pom</type></dependency><dependency><groupId>org.camunda.bpm</groupId><artifactId>camunda-core-internal-dependencies</artifactId><version>${version.camunda}</version><scope>import</scope><type>pom</type></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><version>${version.xml.jaxb-impl}</version></dependency><dependency><groupId>io.rest-assured</groupId><artifactId>rest-assured</artifactId><version>${version.rest-assured}</version></dependency><dependency><groupId>com.fasterxml.jackson</groupId><artifactId>jackson-bom</artifactId><version>${version.jackson}</version><scope>import</scope><type>pom</type></dependency><dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpcore</artifactId><version>${version.apache.httpcore}</version></dependency><dependency><groupId>commons-codec</groupId><artifactId>commons-codec</artifactId><version>${version.commons-codec}</version></dependency></dependencies></dependencyManagement><dependencies><dependency><groupId>commons-fileupload</groupId><artifactId>commons-fileupload</artifactId><exclusions><exclusion><groupId>commons-io</groupId><artifactId>commons-io</artifactId></exclusion></exclusions></dependency><!-- override managed version from commons-fileupload --><dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId></dependency><dependency><groupId>com.fasterxml.jackson.jaxrs</groupId><artifactId>jackson-jaxrs-json-provider</artifactId><exclusions><exclusion><groupId>jakarta.activation</groupId><artifactId>jakarta.activation-api</artifactId></exclusion><exclusion><groupId>jakarta.xml.bind</groupId><artifactId>jakarta.xml.bind-api</artifactId></exclusion></exclusions></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId></dependency><dependency><groupId>com.fasterxml.jackson.datatype</groupId><artifactId>jackson-datatype-jsr310</artifactId></dependency><!-- provided deps --><dependency><groupId>org.jboss.spec.javax.servlet</groupId><artifactId>jboss-servlet-api_3.0_spec</artifactId><scope>provided</scope></dependency><dependency><groupId>com.yuncheng</groupId><artifactId>camunda-engine</artifactId><version>7.19-SNAPSHOT</version><scope>provided</scope><exclusions><exclusion><groupId>org.springframework</groupId><artifactId>spring-jcl</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.camunda.commons</groupId><artifactId>camunda-commons-logging</artifactId><scope>provided</scope></dependency><dependency><groupId>javax.activation</groupId><artifactId>activation</artifactId><version>${javax.activation.version}</version><scope>provided</scope></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><scope>test</scope></dependency><!-- test --><dependency><groupId>junit</groupId><artifactId>junit</artifactId><scope>test</scope></dependency><dependency><groupId>org.apache.tomcat.embed</groupId><artifactId>tomcat-embed-jasper</artifactId><version>${version.tomcat}</version><scope>test</scope></dependency><dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><scope>test</scope><exclusions><exclusion><groupId>org.hamcrest</groupId><artifactId>hamcrest-core</artifactId></exclusion></exclusions></dependency><dependency><groupId>io.rest-assured</groupId><artifactId>rest-assured</artifactId><scope>test</scope></dependency><dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpcore</artifactId><scope>test</scope></dependency><dependency><groupId>commons-codec</groupId><artifactId>commons-codec</artifactId><scope>test</scope></dependency><dependency><groupId>com.h2database</groupId><artifactId>h2</artifactId><scope>test</scope></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>${version.spring.framework}</version><scope>test</scope><exclusions><exclusion><groupId>org.springframework</groupId><artifactId>spring-jcl</artifactId></exclusion></exclusions></dependency><!-- Tomcat for resteasy and wink --><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><scope>test</scope></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jcl-over-slf4j</artifactId><scope>test</scope></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jul-to-slf4j</artifactId><scope>test</scope></dependency><dependency><groupId>org.camunda.commons</groupId><artifactId>camunda-commons-testing</artifactId><scope>test</scope></dependency><dependency><groupId>org.apache.tomcat.embed</groupId><artifactId>tomcat-embed-core</artifactId><version>${version.tomcat}</version><scope>test</scope></dependency><dependency><groupId>org.apache.tomcat.embed</groupId><artifactId>tomcat-embed-logging-juli</artifactId><version>${version.tomcat}</version><scope>test</scope></dependency><dependency><groupId>org.assertj</groupId><artifactId>assertj-core</artifactId><scope>test</scope></dependency></dependencies><build><testResources><testResource><directory>src/test/resources</directory><filtering>true</filtering></testResource></testResources><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><executions><execution><goals><goal>test-jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><configuration><failOnMissingWebXml>false</failOnMissingWebXml></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><configuration><systemPropertyVariables><restEasyVersion>${version.resteasy}</restEasyVersion></systemPropertyVariables></configuration></plugin></plugins></build><profiles><profile><id>distro</id><dependencies><dependency><groupId>org.jboss.spec.javax.ws.rs</groupId><artifactId>jboss-jaxrs-api_2.1_spec</artifactId><scope>provided</scope></dependency></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><configuration><skipTests>true</skipTests></configuration></plugin></plugins></build></profile><profile><id>jersey2</id><activation><activeByDefault>true</activeByDefault></activation><dependencies><dependency><groupId>javax.ws.rs</groupId><artifactId>javax.ws.rs-api</artifactId><version>2.0.1</version><scope>provided</scope></dependency><dependency><groupId>org.glassfish.jersey.containers</groupId><artifactId>jersey-container-grizzly2-http</artifactId><version>${version.jersey2}</version><scope>test</scope></dependency><dependency><groupId>org.glassfish.jersey.containers</groupId><artifactId>jersey-container-servlet</artifactId><version>${version.jersey2}</version><scope>test</scope></dependency><dependency><groupId>org.glassfish.jersey.inject</groupId><artifactId>jersey-hk2</artifactId><version>${version.jersey2}</version><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><configuration><excludes><exclude>**/rest/standalone/**</exclude></excludes><redirectTestOutputToFile>true</redirectTestOutputToFile></configuration><executions><execution><id>encoding-test</id><phase>test</phase><goals><goal>test</goal></goals><configuration><argLine>-Dfile.encoding=ISO-8859-1</argLine><includes><include>**/ProcessDefinitionRestServiceInteractionTest.java</include><include>**/TaskRestServiceInteractionTest.java</include></includes></configuration></execution></executions></plugin><plugin><groupId>org.codehaus.mojo</groupId><artifactId>build-helper-maven-plugin</artifactId><executions><execution><id>add-test-source</id><phase>generate-test-sources</phase><goals><goal>add-test-source</goal></goals><configuration><sources><source>src/test/java-jersey2</source></sources></configuration></execution><execution><id>add-test-resource</id><phase>generate-test-resources</phase><goals><goal>add-test-resource</goal></goals><configuration><resources><resource><directory>src/test/resources-jersey2</directory></resource></resources></configuration></execution></executions></plugin></plugins></build></profile></profiles>
</project>

接下来,拷贝camunda-bpm-platform-7.19.0\engine-rest\engine-rest工程下的源代码到自己刚刚新建的工程里,再执行mvn clean install命令进行编译打包,检查是否可以通过。

3.6、新建Springboot启动工程

以上4个步骤新建了4个Java maven工程,如果这4个工程均可编译通过,说明camunda源代码迁移这一步骤是没有问题的,接下来就是需要把camunda流程引擎基于源代码方式运行起来。

在聚合工程camunda7-source-dev下,新建一个名称为camunda-boot 的工程,即流程引擎的springboot启动工程。

在该工程下把需要把刚刚新建的流程引擎工程camunda-engine和流程引擎服务工程camunda-engine-rest引入进来,确保它是基于源代码运行的,最后的pom.xml源文件如下:

<?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><parent><groupId>com.yuncheng</groupId><artifactId>camunda-parent</artifactId><version>7.19-SNAPSHOT</version><relativePath>../camunda-parent</relativePath></parent><artifactId>camunda-boot</artifactId><properties><maven.compiler.source>11</maven.compiler.source><maven.compiler.target>11</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><!--定义使用camunda的版本--><version.camunda>7.19.0</version.camunda></properties><dependencyManagement><dependencies><dependency><!-- Import dependency management from Spring Boot --><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${version.spring-boot}</version><scope>import</scope><type>pom</type></dependency></dependencies></dependencyManagement><dependencies><dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>1.2.15</version></dependency><dependency><groupId>com.h2database</groupId><artifactId>h2</artifactId></dependency><dependency><groupId>com.yuncheng</groupId><artifactId>camunda-engine</artifactId><version>7.19-SNAPSHOT</version></dependency><dependency><groupId>com.yuncheng</groupId><artifactId>camunda-engine-rest</artifactId><version>7.19-SNAPSHOT</version></dependency><dependency><groupId>org.camunda.bpm.springboot</groupId><artifactId>camunda-bpm-spring-boot-starter-rest</artifactId><version>${version.camunda}</version><!--排除官方引用jar包,用自己工程里的源代码包--><exclusions><exclusion><groupId>org.camunda.bpm</groupId><artifactId>camunda-engine</artifactId></exclusion><exclusion><groupId>org.camunda.bpm</groupId><artifactId>camunda-engine-rest-core</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.camunda.bpm.springboot</groupId><artifactId>camunda-bpm-spring-boot-starter</artifactId><version>${version.camunda}</version><!--排除官方引用jar包,用自己工程里的源代码包--><exclusions><exclusion><groupId>org.camunda.bpm</groupId><artifactId>camunda-engine</artifactId></exclusion></exclusions></dependency></dependencies></project>

接下来,新建一个SpringBootApplication启动类:

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;@SpringBootApplication
public class Camunda7Application {private static final Logger log = LoggerFactory.getLogger(Camunda7Application.class);public static void main(String[] args) {ConfigurableApplicationContext application = SpringApplication.run(Camunda7Application.class, args);Environment env = application.getEnvironment();String port = env.getProperty("server.port");String path = env.getProperty("server.servlet.context-path");if (path == null || "".equals(path)) {path = "/";}log.info("\n----------------------------------------------------------\n" +"\tApplication is running!\n" +"\tPort:\t" + port + "\n" +"\tPath:\t" + path + "\n" +"----------------------------------------------------------");}
}

最后,新建一个springboot启动的application.yaml配置文件,我这里用的是druid连接池,H2数据库,你也可以根据需要切换成mysql数据库

server:port: 8080
spring:datasource:druid:stat-view-servlet:enabled: trueallow:web-stat-filter:enabled: truedynamic:druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)# 连接池的配置信息# 初始化大小,最小,最大initial-size: 5min-idle: 5maxActive: 20# 配置获取连接等待超时的时间maxWait: 60000# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒timeBetweenEvictionRunsMillis: 60000# 配置一个连接在池中最小生存的时间,单位是毫秒minEvictableIdleTimeMillis: 300000validationQuery: SELECT 1 FROM DUALtestWhileIdle: truetestOnBorrow: falsetestOnReturn: false# 打开PSCache,并且指定每个连接上PSCache的大小poolPreparedStatements: truemaxPoolPreparedStatementPerConnectionSize: 20# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙filters: stat,slf4j# 通过connectProperties属性来打开mergeSql功能;慢SQL记录connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000wall:comment-allow: truedatasource:master:url: jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000;LOCK_TIMEOUT=10000username: sapassword:driver-class-name: org.h2.Driver
camunda:bpm:database:type: h2schema-update: trueauto-deployment-enabled: false # 自动部署 resources 下的 bpmn文件admin-user:id: demopassword: demo

以上这些完成后,启动springboot工程即可。

至此,我们完成了基于camunda源代码编译和运行流程引擎。

接下来通过rest服务接口验证camunda流程引擎的功能。

camunda源代码编译运行(三):验证camunda API接口功能

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/1113785.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

Nginx配置组成与性能调优

目录 一、Nginx配置介绍 1. 模块组成 2. 图示 3. 相关框架 二. 配置调优 1. 全局配置 1.1 关闭版本和修改版本 1.2 修改启动的进程数 1.3 cpu与work进程绑定 1.4 pid路径 1.5 nginx进程的优先级&#xff08;work进程的优先级&#xff09; 1.6 调试work进程打开的文…

大模型相关论文笔记

Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks 用于知识密集型NLP任务的检索增强生成 Facebook 2020 PDF CODE &#xff08;论文代码链接已失效&#xff0c;以上是最新链接&#xff09; 引言 大模型有幻觉问题&#xff08;hallucinations&#xff09;&…

web前端安全性——CSRF跨站请求伪造

承接上篇讲述的XSS跨站脚本攻击 跨站请求伪造&#xff08;CSRF&#xff09; 1、概念 CSRF(Cross-site request forgery) 跨站请求伪造:攻击者诱导受害者进入第三方网站&#xff0c;在第三方网站中&#xff0c;向被攻击网站发送跨站请求。利用受害者在被攻击网站已经获取的注…

Python Web开发记录 Day1:HTML

名人说&#xff1a;莫道桑榆晚&#xff0c;为霞尚满天。——刘禹锡&#xff08;刘梦得&#xff0c;诗豪&#xff09; 创作者&#xff1a;Code_流苏(CSDN)&#xff08;一个喜欢古诗词和编程的Coder&#x1f60a;&#xff09; 目录 一、HTML1、前端引入和HTML标签①前端引入②浏览…

Stylized Trees and Foliage

程式化的树木和树叶为你的场景提供了各种各样的树木和灌木。 需要安装 Shader Graph,以便对大多数部分使用自定义着色器! 有多种材料和模块化选择。材料上有多种颜色的叶子,甚至有模块化的树创建,可以用提供的模块化预制件构建自己的树。 在演示场景中可以看到以下包:风格…

linux设备树:phandle和port

linux设备树&#xff1a;phandle和port 参考文档&#xff1a; https://elixir.bootlin.com/linux/v5.10.209/source/Documentation/devicetree/bindings/graph.txt https://elixir.bootlin.com/linux/v6.8-rc5/source/Documentation/devicetree/bindings/display/rockchip/roc…

⭐北邮复试刷题LCR 018. 验证回文串__双指针 (力扣119经典题变种挑战)

LCR 018. 验证回文串 给定一个字符串 s &#xff0c;验证 s 是否是 回文串 &#xff0c;只考虑字母和数字字符&#xff0c;可以忽略字母的大小写。 本题中&#xff0c;将空字符串定义为有效的 回文串 。 示例 1: 输入: s “A man, a plan, a canal: Panama” 输出: true 解释…

C#通过继承泛型类来分块显示学生的个人信息以及成绩信息

目录 一、涉及到的知识点 1.泛型类的继承 2.泛型类的可视化 &#xff08;1&#xff09;用UML图说明泛型类的可视化 &#xff08;2&#xff09;用实例说明泛型类的可视化 二、实例1 1.源码 2.生成效果 三、实例2 再发一个继承泛型类的应用案例。 一、涉及到的知识点 …

openEuler安装MySQL客户端、openEuler安装MySQL-client、openEuler部署MySQL-client

MySQL客户端下载链接&#xff1a;https://downloads.mysql.com/archives/community/ mysql-community-client-5.7.30-1.el7.x86_64.rpm mysql-community-common-5.7.30-1.el7.x86_64.rpm mysql-community-libs-5.7.30-1.el7.x86_64.rpm 3个必选 8.0.22以上的版本是4个&…

Facebook的未来蓝图:数字社交的下一个篇章

在数字化时代&#xff0c;社交媒体已经成为人们日常生活中不可或缺的一部分。而在众多的社交媒体平台中&#xff0c;Facebook一直处于领先地位&#xff0c;不断探索着数字社交的新领域和新形式。随着科技的不断发展和社会的不断变革&#xff0c;Facebook正在谱写着数字社交的未…

好书推荐| After Effects 2022案例实战全视频教程

After Effects 2022案例实战全视频教程 作者 &#xff1a;王红卫 书号&#xff1a;9787302631958 定价&#xff1a;99元 出版时间&#xff1a;2023年7月 作者介绍 王红卫 拥有多年设计师的经学经验&#xff0c;北京理工大学百事特教师&#xff0c;水木风云工作室创始人&a…

libgdx摄像头的移动

概述&#xff1a;要知道&#xff0c;做一个游戏&#xff0c;摄像头是必不可少的。接下来&#xff0c;我将讲解libgdx里面摄像头的移动 2d摄像头OrthographicCamera也叫做正交相机 结果展示&#xff1a; 按上下左右是可以移动的 OrthographicCamera camera的使用&#xff1a…

合纵连横 – 以 Flink 和 Amazon MSK 构建 Amazon DocumentDB 之间的实时数据同步

在大数据时代&#xff0c;实时数据同步已经有很多地方应用&#xff0c;包括从在线数据库构建实时数据仓库&#xff0c;跨区域数据复制。行业落地场景众多&#xff0c;例如&#xff0c;电商 GMV 数据实时统计&#xff0c;用户行为分析&#xff0c;广告投放效果实时追踪&#xff…

63-JQuery语法,选择器,事件,方法,遍历循环each,attr(),.prop()

1.一个JS库,用js封装很多的方法放到一个文件里面,直接拿了用就可以 文件名带min是压缩过的不带min是没压缩过的 2.JQuery语法 通过选取HTML元素,并对选取的元素执行某些操作 基础语法:$(selector).action() <!-- 需要把JQuery文件先引入才能用 --><script src…

ICRA 2024:UC伯克利、斯坦福大学等共同开发机器人强化学习套件(SERL),20分钟学会装配电路板!

近年来&#xff0c;机器人强化学习技术领域取得显著的进展&#xff0c;例如四足行走&#xff0c;抓取&#xff0c;灵巧操控等&#xff0c;但大多数局限于实验室展示阶段。将机器人强化学习技术广泛应用到实际生产环境仍面临众多挑战&#xff0c;这在一定程度上限制了其在真实场…

智慧社区的魔力:数据可视化的引领之力

在迅猛发展的科技时代&#xff0c;数据可视化作为一种强大的工具&#xff0c;为智慧社区的建设提供了无限可能。它不仅改变了我们对信息的获取方式&#xff0c;更为社区管理、居民生活等方面注入了新的活力。下面我就以可视化从业者的角度&#xff0c;简单聊聊这个话题。 数据可…

【招聘】资深后端开发工程师-飞书IM(杭州、北京)

职位描述 团队介绍&#xff1a;飞书是字节跳动旗下先进企业协作与管理平台&#xff0c;围绕目标、信息与人三个维度全方位助力组织升级。一站式整合即时沟通、日历、音视频会议、文档、云盘、邮箱等办公协作套件&#xff0c;让组织和个人工作更高效更愉悦。飞书目前已服务包括互…

python52-Python流程控制if分支之不要忘记冒号

从Python语法解释器的角度来看&#xff0c;Python冒号精确表示代码块的开始点&#xff0c;这个功能不仅在条件执行体中如此&#xff0c;后面的循环体、方法体、类体全都遵守该规则。 如果程序遗忘了冒号&#xff0c;那么Python解释器就无法识别代码块的开始点。例如如下程序。…

java内存详解

内存&#xff1a;可理解为“内存条”&#xff0c;所有软件在程序运行时都会进入到内存中 内存划分&#xff08;5块&#xff09; ① 栈&#xff08;Stack&#xff09; 主要运行方法&#xff0c;方法执行完毕会弹栈&#xff0c;释放空间 ② 堆&#xff08;Heap&#xff09; a.主…

Mysql第三关之事务、锁、高可用

简介 本章较深入探索Mysql核心机制&#xff0c;Innodb引擎架构&#xff0c;MVCC多版本并发控制、事务支撑、各种级别的锁、Mysql高可用设计等概括梳理。 Mysql组成架构 图片来自网络 在Mysql架构设计中&#xff0c;大概可以分为Mysql server层和存储引擎层。 Server层 s…