本文整理了Java中org.apache.cxf.jaxrs.utils.ResourceUtils.getClasspathResourceStream
方法的一些代码示例,展示了ResourceUtils.getClasspathResourceStream
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceUtils.getClasspathResourceStream
方法的具体详情如下:
包路径:org.apache.cxf.jaxrs.utils.ResourceUtils
类名称:ResourceUtils
方法名:getClasspathResourceStream
暂无
代码示例来源:origin: apache/cxf
protected Properties getSwaggerProperties(Bus bus) {
InputStream is = ResourceUtils.getClasspathResourceStream(propertiesLocation,
AbstractSwaggerFeature.class,
bus);
Properties props = null;
if (is != null) {
props = new Properties();
try {
props.load(is);
} catch (IOException ex) {
props = null;
} finally {
try {
is.close();
} catch (IOException ignore) {
// ignore
}
}
}
return props;
}
protected void initBeanConfig(BeanConfig beanConfig, Properties props) {
代码示例来源:origin: apache/cxf
/**
* Read the Swagger-specific properties from the property file (to seamlessly
* support the migration from older Swagger features).
* @param location property file location
* @param bus bus instance
* @return the properties if available
*/
default Properties getSwaggerProperties(String location, Bus bus) {
InputStream is = ResourceUtils.getClasspathResourceStream(location, SwaggerProperties.class, bus);
Properties props = null;
if (is != null) {
props = new Properties();
try {
props.load(is);
} catch (IOException ex) {
props = null;
} finally {
try {
is.close();
} catch (IOException ignore) {
// ignore
}
}
}
return props;
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-service-description-openapi-v3
/**
* Read the Swagger-specific properties from the property file (to seamlessly
* support the migration from older Swagger features).
* @param location property file location
* @param bus bus instance
* @return the properties if available
*/
default Properties getSwaggerProperties(String location, Bus bus) {
InputStream is = ResourceUtils.getClasspathResourceStream(location, SwaggerProperties.class, bus);
Properties props = null;
if (is != null) {
props = new Properties();
try {
props.load(is);
} catch (IOException ex) {
props = null;
} finally {
try {
is.close();
} catch (IOException ignore) {
// ignore
}
}
}
return props;
}
}
代码示例来源:origin: apache/cxf
if (d.docuri().startsWith(CLASSPATH_PREFIX)) {
String path = d.docuri().substring(CLASSPATH_PREFIX.length());
is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class,
bus == null ? BusFactory.getDefaultBus() : bus);
if (is != null) {
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-service-description
if (d.docuri().startsWith(CLASSPATH_PREFIX)) {
String path = d.docuri().substring(CLASSPATH_PREFIX.length());
is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class,
bus == null ? BusFactory.getDefaultBus() : bus);
if (is != null) {
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
if (d.docuri().startsWith(CLASSPATH_PREFIX)) {
String path = d.docuri().substring(CLASSPATH_PREFIX.length());
is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class,
bus == null ? BusFactory.getDefaultBus() : bus);
if (is != null) {
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
if (d.docuri().startsWith(CLASSPATH_PREFIX)) {
final String path = d.docuri().substring(CLASSPATH_PREFIX.length());
is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class,
BusFactory.getDefaultBus());
if (is != null) {
内容来源于网络,如有侵权,请联系作者删除!