private SyntheticBean<?> routesDefinitionBean(RoutesDefinition definition, URL url) { return new SyntheticBean<>(manager, // TODO: should be @Named if the id is set new SyntheticAnnotated(RoutesDefinition.class, manager.createAnnotatedType(RoutesDefinition.class).getTypeClosure(), ANY, DEFAULT), RoutesDefinition.class, new SyntheticInjectionTarget<>(() -> definition), bean -> "imported routes definition " + (hasId(definition) ? "[" + definition.getId() + "] " : "") + "from resource [" + url + "]"); }