Spring Boot won't autowire a MBean I exported from another web application with:
@Component
@Service
@ManagedResource(objectName = IHiveService.MBEAN_NAME)
public class HiveService implements IHiveService {
@Autowired(required = true)
CategoryRepository categoryRepository;
@Override
@ManagedOperation
public String echo(String input) {
return "you said " + input;
}
}
I can see and use the Bean in Oracle Java Mission Control but the other Spring Boot app is not able to autowire the bean. I this I missed an annotation. To autowire the bean I use:
@Controller
@Configuration
@EnableMBeanExport
public class GathererControls {
@Autowired
IHiveService hiveService; // <-- this should be auto wired
Any ideas?