Camunda Spring boot REST with Tomcat example

Hi, I am new to Camunda. I would like to create a Spring boot application to expose Camunda REST API in Tomcat or Jetty, but I could not find an example in the https://github.com/camunda/camunda-bpm-examples/ for this. I’ve seen Spring boot examples, but none of them is for REST API, nor created as war file to be loaded by Tomcat or Jetty. I especially interested in seeing how to turn on basic authentication.

Can someone give me a pointer and I would greatly appreciate it.

Thanks, Joey

@carbon_60 spring boot application itself by default will have embedded tomcat server, then why do you want to deploy again in tomcat server?

I am just used to deploy applications like that, so I am looking for example of how to do that. Is that a supported deployment for Camunda REST API application?

Thanks, Joey

Refer this post:

Rest API: Rest Api Reference | docs.camunda.org

Thanks, I did read that section. I was looking for a more traditional way of deploying war file to Tomcat, but I will try that route first. Joey

Hi, I followed the example from document https://docs.camunda.org/get-started/spring-boot/ to build a spring boot application. It works as expected.

However, I tried to set DB connection to MSSQL in application.yaml file, the setting seems to be ignored. Here is the setting I added to application.yaml:

spring:
datasource:
url: jdbc:sqlserver://;DatabaseName={camunda}
username:
password:
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver

This setting seems to be ignored by the application. Is there anything else I need to do?

Any pointer would be greately appreciated!

Thanks, Joey

I did add the following dependency to pom.xml:

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

But that does not seem to make any difference

I am able to get the application to work by using application.properties file instead.

Hi
I add this paramertes in my pom.xml to Mysql

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>

and in …/src/main/resources/application.yaml

spring.datasource:
  type: com.mysql.cj.jdbc.MysqlDataSource
  username: root
  password: ??????
  url: jdbc:mysql://localhost:3306/process?useTimezone=true&serverTimezone=America/Sao_Paulo