02-06-2018 03:27 PM
Hello, I am new to activiti, and is in the process of trying to develop a Activiti custom REST application, but I get the famous "No qualifying bean of type 'com.activiti.extension.service.TranslationService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}" . when I am issuing the rest call through Postman after I deployed the jar under the web-inf/lib folder for activiti-app in tomcat and restart the activiti-app. It is very simple Spring app as follows:
1: Introduce a @RestController class, inside it has
@RestController
public class TranslationStatusController {
private static Logger logger = (Logger) LoggerFactory.getLogger(TranslationStatusController.class);
@Autowired
TranslationService translationService;
.....
2: The TranslationService is in package com.activiti.extension.service.TranslationService, and is annotated with @Service, it is just a regular spring service class
3: There is a spring boot app
@SpringBootApplication
@EnableAutoConfiguration
public class App {
....
Very simple spring boot application, the problem is why
com.activiti.extension.service.TranslationService is not automatically picked up?
Thank you in advance.
02-09-2018 06:53 AM
Make sure the Java class you have written is inside the package: "com.activiti.extension.bean"
The injections are automatically picked by Activiti if the class is within this package.
Regards.
Explore our Alfresco products with the links below. Use labels to filter content by product module.