//package com.alibaba.csp.sentinel.dashboard.rule.gateway;
//
//import com.alibaba.nacos.api.config.ConfigService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
///**
// * @author lfdc
// * @version 1.0
// * @className GatewayApiNacosPublisher
// * @description
// * @company sckw
// * @date 2023-06-07 10:06:14
// */
//@Component("gatewayApiNacosPublisher")
//public class GatewayApiNacosPublisher implements DynamicRulePublisher<List<ApiDefinitionEntity>> {
//
//    @Autowired
//    private ConfigService configService;
//    @Autowired
//    private Converter<List<ApiDefinitionEntity>, String> converter;
//
//    @Override
//    public void publish(String app, List<ApiDefinitionEntity> rules) throws Exception {
//        AssertUtil.notEmpty(app, "app name cannot be empty");
//        if (rules == null) {
//            return;
//        }
//        configService.publishConfig(app+ NacosConfigUtil.GATEWAY_API_DATA_ID_POSTFIX,
//                NacosConfigUtil.GROUP_ID,converter.convert(rules));
//    }
//}
//
