* replace the way which get version * remove version sign application.properties in nacos-api
This commit is contained in:
parent
4ce897e409
commit
f01cd59bf7
@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright 1999-2018 Alibaba Group Holding Ltd.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
version=${project.version}
|
|
@ -20,9 +20,9 @@ import com.alibaba.nacos.api.PropertyKeyConst;
|
|||||||
import com.alibaba.nacos.api.SystemPropertyKeyConst;
|
import com.alibaba.nacos.api.SystemPropertyKeyConst;
|
||||||
import com.alibaba.nacos.api.common.Constants;
|
import com.alibaba.nacos.api.common.Constants;
|
||||||
import com.alibaba.nacos.common.utils.StringUtils;
|
import com.alibaba.nacos.common.utils.StringUtils;
|
||||||
|
import com.alibaba.nacos.common.utils.VersionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@ -80,19 +80,7 @@ public class ParamUtil {
|
|||||||
}
|
}
|
||||||
LOGGER.info("[settings] [http-client] connect timeout:{}", connectTimeout);
|
LOGGER.info("[settings] [http-client] connect timeout:{}", connectTimeout);
|
||||||
|
|
||||||
try {
|
clientVersion = VersionUtils.version;
|
||||||
InputStream in = ValidatorUtils.class.getClassLoader().getResourceAsStream("application.properties");
|
|
||||||
Properties props = new Properties();
|
|
||||||
props.load(in);
|
|
||||||
String val = null;
|
|
||||||
val = props.getProperty("version");
|
|
||||||
if (val != null) {
|
|
||||||
clientVersion = val;
|
|
||||||
}
|
|
||||||
LOGGER.info("NACOS_CLIENT_VERSION: {}", clientVersion);
|
|
||||||
} catch (Exception e) {
|
|
||||||
LOGGER.error("[500] read application.properties", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
perTaskConfigSize = Double.valueOf(System.getProperty("PER_TASK_CONFIG_SIZE", "3000"));
|
perTaskConfigSize = Double.valueOf(System.getProperty("PER_TASK_CONFIG_SIZE", "3000"));
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright 1999-2018 Alibaba Group Holding Ltd.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
version=${project.version}
|
|
Loading…
Reference in New Issue
Block a user