@Override
    public void onDeleted(final Collection<NamespacePluginVO> namespacePlugin) {
        String namespaceId = ((Collection<?>) namespacePlugin)
                .stream()
                .map(NamespacePluginVO.class::cast)
                .findFirst()
                .map(NamespacePluginVO::getNamespaceId)
                .orElse(SYS_DEFAULT_NAMESPACE_ID);
        List<PluginDO> pluginDOList = ((Collection<?>) namespacePlugin)
                .stream()
                .map(NamespacePluginVO.class::cast)
                .map(PluginDO::buildPluginDO)
                .collect(Collectors.toList());
        publish(new BatchNamespacePluginDeletedEvent(pluginDOList, SessionUtil.visitorName(), namespaceId));
        publisher.publishEvent(new DataChangedEvent(ConfigGroupEnum.PLUGIN, DataEventTypeEnum.DELETE,
                namespacePlugin.stream().map(PluginTransfer.INSTANCE::mapToData).collect(Collectors.toList())));

    }
on plugin created.

@param namespacePluginVO namespacePluginVO
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/publish/NamespacePluginEventPublisher.java