@Override
    public void onApplicationEvent(final WebServerInitializedEvent event) {
        if (!registered.compareAndSet(false, true)) {
            return;
        }
        String configPort = props.getProperty("port");
        int port = StringUtils.isBlank(configPort) ? event.getWebServer().getPort() : Integer.parseInt(configPort);
        InstanceEntity instanceEntity = buildInstanceRegisterDTO(port);
        repository.persistInstance(instanceEntity);
    }
Instantiates a new Instance register listener.

@param config the config
shenyu-spring-boot-starter/shenyu-spring-boot-starter-registry/src/main/java/org/apache/shenyu/springboot/starter/registry/RegistryListener.java