static {
try {
URL url = PropertiesUtils.class.getProtectionDomain().getCodeSource().getLocation();
System.out.println("url-->:" + url);
String filePath = URLDecoder.decode(url.getPath(), "utf-8");
System.out.println("filePath-->:"+ filePath);
String path =null;
if (filePath.contains("lib")){
path = filePath.substring(filePath.indexOf(":")+1,filePath.indexOf("/lib"));
}else if (filePath.contains("target")){
path = filePath.substring(1,filePath.indexOf("/target"));
}
System.out.println("path-->:" +path);
properties.load(new FileReader(path+"/src/main/resources/utils.properties"));
}catch (Exception e){
e.getLocalizedMessage();
}