@Get("Unit")
public String Unit() throws IOException {
InputStream in = new BufferedInputStream(new FileInputStream("D:/newworkSpace/myeclipse/fanyazhongxiaoxue/config/config.properties"));
ResourceBundle rb = new PropertyResourceBundle(in);
String a = rb.getString("sqlUrl");
System.out.println(a);
return "createUnit";
}
1.想请问如何吧 文件路径给成相对路径?这样就可以把获取配置文件中的信息写活,否则部署到服务器上,肯定会报‘系统找不到指定文件’.望看到的可以提示下.