Embedded camunda enigne in existing springboot app/ admin is not working

Dears,
Please help me, i have embedded camunda engine into existing springboot application which is not using “@SpringBootApplication” and i have create my own custom configuration as below:
@Configuration
@Import( SpringProcessEngineServicesConfiguration.class )
public class MyCamundaProcessEngineConfiguration {

@Value("${camunda.bpm.history-level:none}")
private String historyLevel;

// add more configuration here
// ---------------------------

@Autowired
private ResourcePatternResolver resourceLoader;

@Bean
@Primary
@ConfigurationProperties(“camunda.datasource”)
public DataSourceProperties secondDataSourceProperties() {
return new DataSourceProperties();
}

@Bean
@Primary
public BasicDataSource camundaBpmDataSource() {
return secondDataSourceProperties().initializeDataSourceBuilder().type(BasicDataSource.class).build();
}

@Bean
public SpringProcessEngineConfiguration processEngineConfiguration() throws IOException {
SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();

config.setDataSource(camundaBpmDataSource());
config.setDatabaseSchemaUpdate("true");

config.setTransactionManager(transactionManager());

config.setHistory(historyLevel);

config.setJobExecutorActivate(true);
config.setMetricsEnabled(false);

// deploy all processes from folder 'processes'
Resource[] resources = resourceLoader.getResources("classpath:/processes/*.bpmn");
config.setDeploymentResources(resources);

return config;

}

@Bean
public PlatformTransactionManager transactionManager() {
return new DataSourceTransactionManager(camundaBpmDataSource());
}

@Bean
public ProcessEngineFactoryBean processEngine() throws IOException {
ProcessEngineFactoryBean factoryBean = new ProcessEngineFactoryBean();
factoryBean.setProcessEngineConfiguration(processEngineConfiguration());
return factoryBean;
}

}

The engine is working fine but i can’t access /app/admin page as i am getting exception that this page is not found, so please advise me what should i do ?

Are you adding the webapps as a dependency in your pom file?

Dear @Niall,
Yes i have added it as show below:

org.camunda.bpm.springboot
camunda-bpm-spring-boot-starter-webapp
3.4.0

Just please note that i have deployed one sample process and i can start it using the runtime service.

Do any of the webapps work? when you go to port 8080 does it bring you anywhere?
Have you added any camunda properties to the application.yaml file?

Dear @Niall
Yes my existing webapp is working fine and i have added the required camunda properties in application.properties
camunda.bpm.webapp.index-redirect-enabled=true
camunda.bpm.admin-user.id=demo
camunda.bpm.admin-user.password=demo
camunda.bpm.admin-user.first-name=demo
camunda.bpm.filter.create=All tasks

Note that, my existing webapp has it’s own security configuration.

I think it’s probably that you’re existing webapp is preventing the camunda webapps from starting.

Dear @Niall,
Thanks for your support.
Please note that i am using apache tomcat as a web server for my spring boot app, and i have figured the problem out, as springboot is preventing the camunda webapps to be started as you mentioned above, so is there any tomcat or spring config to force springboot app to bypass the mapping for camunda app admin page

Also please note that the auto configuration is disabled so how to activate this class CamundaBpmAutoConfiguration ?