gpt4 book ai didi

spring - Camunda springboot 项目未部署在 Camunda-ee tomcat 服务器上

转载 作者:行者123 更新时间:2023-11-28 22:36:39 25 4
gpt4 key购买 nike

我正在关注本指南 - https://camunda.github.io/camunda-bpm-spring-boot-starter/docs/2.2.0/index.html并创建我自己的新 springboot-camunda 项目。

[![项目结构:][1]][1][1]: /image/owkjG.png

我想将我之前创建的 war 文件部署到 Camunda-ee 本地服务器。我希望在 Camunda 驾驶舱内看到这一点。但它不在那里。对于如何将 Camunda springboot webapp 项目部署到 Camunda 服务器的任何有用信息,我将不胜感激。这是我的代码:

@SpringBootApplication
@EnableProcessApplication
public class SlognSpringBootProcessApplication {

public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(SlognSpringBootProcessApplication.class);

springApplication.run(args);
}
}

进程.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>

应用程序属性:

camunda.bpm.auto-deployment-enabled=true

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>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>

最佳答案

第一个注意事项:当使用 @EnableProcessApplication 时,自动部署被禁用,因此您可以省略此设置:camunda.bpm.auto-deployment-enabled=true .

对于主要问题:您要做的是将 Spring boot 应用程序打包为 war 并部署在应用程序服务器上。

结帐 https://github.com/camunda/camunda-bpm-spring-boot-starter/tree/master/examples/example-war ,我猜你忘了扩展初始值设定项:

    @SpringBootApplication
@EnableProcessApplication
public class SlognSpringBootProcessApplication extends SpringBootServletInitializer {...}

所以引擎是在 war 部署时创建的。

关于spring - Camunda springboot 项目未部署在 Camunda-ee tomcat 服务器上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45820618/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com