public Webhooks[] getWebhooks() {
		List<Webhooks> allWebhooks = new ArrayList<>();

		// First: scan Spring-managed beans
		Map<String, Object> beans = context.getBeansWithAnnotation(Webhooks.class);

		for (Object bean : beans.values()) {
			Class<?> beanClass = bean.getClass();

			// Collect @Webhooks or @Webhook on class level
			collectWebhooksFromElement(beanClass, allWebhooks);

			// Collect from methods
			for (Method method : beanClass.getDeclaredMethods()) {
				collectWebhooksFromElement(method, allWebhooks);
			}
		}

		// Fallback: classpath scanning if nothing found
		if (allWebhooks.isEmpty()) {
			ClassPathScanningCandidateComponentProvider scanner =
					new ClassPathScanningCandidateComponentProvider(false);
			scanner.addIncludeFilter(new AnnotationTypeFilter(Webhooks.class));
			scanner.addIncludeFilter(new AnnotationTypeFilter(Webhook.class));

			if (AutoConfigurationPackages.has(context)) {
				for (String basePackage : AutoConfigurationPackages.get(context)) {
					Set<BeanDefinition> candidates = scanner.findCandidateComponents(basePackage);

					for (BeanDefinition bd : candidates) {
						try {
							Class<?> clazz = Class.forName(bd.getBeanClassName());

							// Class-level annotations
							collectWebhooksFromElement(clazz, allWebhooks);

							// Method-level annotations
							for (Method method : clazz.getDeclaredMethods()) {
								collectWebhooksFromElement(method, allWebhooks);
							}

						}
						catch (ClassNotFoundException e) {
							LOGGER.error("Class not found in classpath: {}", e.getMessage());
						}
					}
				}
			}
		}

		return allWebhooks.toArray(new Webhooks[0]);
	}
Get webhooks webhooks [ ].

@return the webhooks [ ]
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/OpenAPIService.java