속성 파일 이름은 prop.properties
입니다. 내 주요 코드에서 나는 System.getProperty()
과 properties.getProperty()
을 가지고 있습니다.Java의 System.getProperty와 properties.getProperty의 차이점
내 질문은 : 둘 다 prop.properties
에서 속성을 얻거나 서로 다른 장소에서 속성을 얻을 것입니다, properties.getProperty()
는 prop.properties
에서 속성을 얻고 System.getProperty()
다른 곳에서 속성을 가져.
'속성'의 출처에 따라 다릅니다. 'Properties properties = System.getProperties();', 그렇다면 동일합니다. 'Properties propertes = new Properties();'이면, 그렇지 않습니다. – CodeBlind
감사합니다 벤, 이제 알았습니다 –