C:\danny\code_base\20171031_mpos_bill\MPayBill\src\main\java\citic\hz\mpos\kit\Config.java
引用
String realPath = this.getClass().getClassLoader().getResource("").getPath();
String realPath = "";
try {
realPath = new ClassPathResource("mpos/mposBat.conf").getFile().getAbsolutePath();
System.out.println(new ClassPathResource("mpos/mposBat.conf").getFile().getAbsolutePath());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String realPath = "";
try {
realPath = new ClassPathResource("mpos/mposBat.conf").getFile().getAbsolutePath();
System.out.println(new ClassPathResource("mpos/mposBat.conf").getFile().getAbsolutePath());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}