아래 그림과 같이 :
public static string getConfig (String key) {properties pros = new Properties (); 문자열 값 = ""; {pros.load (new inputStreamReader (Object.class.getResourceasStream ( "/properties.properties"), "UTF-8")); value = pros.get (key) .toString (); } catch (ioexception e) {log.error (e.getMessage ()); } 반환 값; }위의 것은 속성 구성 파일을 읽을 때 Java Garbled Chinese 코드에 대한 솔루션의 전체 내용입니다. 모두가 wulin.com을 더 지원하기를 바랍니다