Public static string getconfigkey (string key) {string fname = "AA. properties "; string keyval =" "; properties props = NULL; string url = stringutils. class. getclassloader (). getresource ("/"). getpath () + fname;/* read the configuration file string filename = "" from the root directory; If (file. separatorchar = '\') filename = "C: \" + fname; else filename = "/" + fname; * // log.info ("configuration file address ----------" + URL); file = new file (URL); If (! File. isfile () {return NULL;} If (file. exists () {fileinputstream FCM = NULL; try {FD = new fileinputstream (File);} catch (filenotfoundexception E2) {log.info (File + "An error occurred while reading the configuration file! "); E2.printstacktrace ();} props = new properties (); try {props. load. close (); keyval = props. getproperty (key); If (keyval = NULL) {log. error ("the configuration file does not contain the key value" + key +! ");} If (keyval! = NULL & keyval. endswith ("\" ") {keyval = keyval. replaceall ("\" "," ") ;}} catch (ioexception e) {e. printstacktrace (); log.info (File + "An error occurred while reading the attribute value in the configuration file! ") ;}} Else {log.info (File +" the configuration file is not found! ");} Return keyval ;}