private InputStream getConfigInputStream(ServletContext servletContext) { InputStream is = getJSONFromServletContext(servletContext); if (is == null) { String path = servletContext.getInitParameter("keycloak.config.file"); if (path == null) { is = servletContext.getResourceAsStream("/WEB-INF/keycloak.json"); } else { try { is = new FileInputStream(path); } catch (FileNotFoundException e) { throw new RuntimeException(e); } } } return is; }
private InputStream getConfigInputStream(ServletContext servletContext) { InputStream is = getJSONFromServletContext(servletContext); if (is == null) { String path = servletContext.getInitParameter("keycloak.config.file"); if (path == null) { is = servletContext.getResourceAsStream("/WEB-INF/keycloak.json"); } else { try { is = new FileInputStream(path); } catch (FileNotFoundException e) { throw new RuntimeException(e); } } } return is; }