Hello,
I have a problem with integrating Camunda with Spring Boot. When I create a REST controller in Spring Boot, Camunda Cockpit and other parts of out-of-the-box app stop working. When I delete file with REST controller, Cockpit and others start working again. I think that REST controllers work on the same port and somehow overwrite api.
Does anybody know how to solve that problem ?
Robin
May 14, 2019, 9:08am
2
Do you have a sample application to review, because this works for me without any issues. (Cockpit is available under http://localhost:8080/app/
).
This were the dependencies I tested it with:
<properties>
<java.version>1.8</java.version>
<camunda.version>7.10.0</camunda.version>
<camundaSpringBoot.version>3.2.1</camundaSpringBoot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from camunda -->
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>${camundaSpringBoot.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
I forgot @RequestMapping in REST controller file, my bad, anyway thanks for replay and unsurance that it should work.