I am trying to migrate an existing Spring Boot application to the camunda spring boot starter with the typically annotation-oriented way: @Service, @Autowire, @Bean, … . When I add the dependency and start the application, it fails when Spring is trying to initialize the first @Controller and injects the first dependency.
Currently, I am not able to reproduce the problem in a sandbox application.
I have tried to add @EnableProcessApplication, @ProcessApplication and manually define @ComponentScan (Our beans are all in subpackage, so it is normally not necessary) to our @SpringBootApplication class, but nothing works.
I have added the stacktrace below. But it just says that it cannot find a required bean. There is no error before. It seems that all @Service annotated classes are either not initialized by Spring or in a different application context after adding camunda-spring-boot-starter.
Does the csb-starter change the “component scan” configuration? Just strange that it finds the Controller but not the service which is in a sibling package.
APPLICATION FAILED TO START
Field historyService in de.vignold.bs.wjt.domain.controller.HistoryController required a bean of type ‘de.vignold.bs.wjt.domain.service.history.HistoryService’ that could not be found.
Consider defining a bean of type ‘de.vignold.bs.wjt.domain.service.history.HistoryService’ in your configuration.