Open walkertest opened 2 years ago
当有些地方不设置datapath,比如一些sdk(兼容非tars服务)的时候,tarsnodes.dat的存储路径会比较怪.
例子:
URL url = Loader.getResource("", true); String path=url.getFile(); File f = new File(path, Constants.SERVER_NODE_CACHE_FILENAME); String parentPath = f.getParentFile().getPath(); String filePath = f.getAbsolutePath(); log.info("URL_DATA_PATH:{} parentPath:{} filePath:{}", path, parentPath, filePath);
输出结果:
URL_DATA_PATH:file:/data/app/taf/tafnode/data/TAFJAVADEMO.HelloServer/bin/HelloServer.jar!/BOOT-INF/classes!/ parentPath:file:/data/app/taf/tafnode/data/TAFJAVADEMO. HelloServer/bin/HelloServer.jar!/BOOT-INF/classes! filePath:/data/app/taf/app_log/file:/data/app/taf/tafnode/data/TAFJAVADEMO.HelloServer/bin/HelloServer.jar!/BOOT-INF/cla sses!/tafnodes.dat
疑问:
当有些地方不设置datapath,比如一些sdk(兼容非tars服务)的时候,tarsnodes.dat的存储路径会比较怪.
例子:
输出结果:
疑问: