sofastack / sofa-dashboard-client

Apache License 2.0
16 stars 25 forks source link

when do not specify the server.port , it will be cause NPE #14

Closed glmapper closed 5 years ago

glmapper commented 5 years ago

Problem as follows :

public SofaDashboardClientRegister(SofaDashboardProperties sofaClientProperties,
                                       ZkCommandClient zkCommandClient, Environment environment) {
        this.sofaDashboardProperties = sofaClientProperties;
        this.zkCommandClient = zkCommandClient;
        this.appName = environment.getProperty(Constants.APP_NAME_KEY);
        // here
        this.port = Integer.parseInt(environment.getProperty(Constants.SERVER_PORT_KEY));
    }