我遵循了这个指南- https://camunda.github.io/camunda-bpm-spring-boot-starter/docs/2.2.0/index.html,并创建了我自己的新springboot this camunda项目。

我希望将我之前创建的war文件部署到Camunda-ee本地服务器。我希望在卡蒙达驾驶舱看到这个。但它并不在那里。我非常感谢任何有用的信息,如何将Camunda springboot webapp项目部署到Camunda服务器。下面是我的代码:
@SpringBootApplication
@EnableProcessApplication
public class SlognSpringBootProcessApplication {
public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(SlognSpringBootProcessApplication.class);
springApplication.run(args);
}
}processes.xml:
<?xml version="1.0" encoding="UTF-8"?>
<process-application
xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<process-archive>
<process-engine>default</process-engine>
<properties>
<property name="isDeleteUponUndeploy">true</property>
<property name="isScanForProcessDefinitions">true</property>
</properties>
</process-archive>
</process-application>application.properties:
camunda.bpm.auto-deployment-enabled=truepom.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>net.slogn.camunda.bpm.spring.social</groupId>
<artifactId>camunda-bpm-spring-boot-starter-social-integration</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
</parent>
<properties>
<camunda-spring-starter.version>2.2.0</camunda-spring-starter.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.camunda.bpm.extension.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.camunda.bpm.extension.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-bom</artifactId>
<version>${camunda-spring-starter.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>发布于 2017-08-23 05:29:59
首先要注意的是:在使用@EnableProcessApplication时,自动部署是禁用的,因此您可以省略此设置:camunda.bpm.auto-deployment-enabled=true。
对于主要问题:您要做的是将Spring引导应用程序打包为war并部署到应用程序服务器上。
签出https://github.com/camunda/camunda-bpm-spring-boot-starter/tree/master/examples/example-war,我猜你忘了扩展初始化器:
@SpringBootApplication
@EnableProcessApplication
public class SlognSpringBootProcessApplication extends SpringBootServletInitializer {...}因此,引擎是在war部署时创建的。
发布于 2019-11-22 14:18:36
我知道你的问题所在。
您正在尝试创建war文件并将其部署在共享Camunda引擎上。所以让我告诉你,这不是一个正确的方法。因为Camunda starter jar被嵌入到Tomcat中;并且您生成的war文件将使用已经使用starter jar提供的Camunda引擎。
为了解决这个问题,你需要使用spring boot和spring框架的混合版本。在你的项目中使用spring boot,但是对于Camunda引擎使用spring框架。您需要使用共享引擎运行时,即上下文。在这里你可以看到pom的例子和你必须提到的类。http://javaint4bytes.blogspot.com/2019/11/camunda-spring-boot-with-shared-engine.html
https://stackoverflow.com/questions/45820618
复制相似问题