properties.jsp 630 B

1234567891011121314
  1. <%@ page language="java" contentType="application/json; charset=UTF-8" import="java.io.FileInputStream, java.util.Properties"%>
  2. <%
  3. String propertiesPath = this.getClass().getClassLoader().getResource("slot_prop.properties").getPath();
  4. FileInputStream fis = new FileInputStream(propertiesPath);
  5. Properties prop = new Properties();
  6. prop.load(fis);
  7. %>
  8. {
  9. "slotHost": "<%=prop.getProperty("platform_slot_host") %>",
  10. "listAddress": "<%=prop.getProperty("platform_slot_list_address") %>",
  11. "getAddress": "<%=prop.getProperty("platform_slot_get_address") %>",
  12. "getId": "<%=prop.getProperty("platform_uuid") %>"
  13. }
  14. <% fis.close(); %>