作者:那0年_277 | 来源:互联网 | 2024-10-19 10:41
本文整理了Java中org.codehaus.enunciate.config.EnunciateConfiguration.getDefaultRestSubcontext()
本文整理了Java中org.codehaus.enunciate.config.EnunciateConfiguration.getDefaultRestSubcontext()
方法的一些代码示例,展示了EnunciateConfiguration.getDefaultRestSubcontext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EnunciateConfiguration.getDefaultRestSubcontext()
方法的具体详情如下:
包路径:org.codehaus.enunciate.config.EnunciateConfiguration
类名称:EnunciateConfiguration
方法名:getDefaultRestSubcontext
EnunciateConfiguration.getDefaultRestSubcontext介绍
[英]The default rest context.
[中]默认的rest上下文。
代码示例
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
protected String getSubcontext(EnunciateConfiguration config) {
return config.getDefaultRestSubcontext();
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-rest
protected String getRestSubcontext() {
String restSubcOntext= getEnunciate().getConfig().getDefaultRestSubcontext();
//todo: override default rest subcontext?
return restSubcontext;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-docs
@Override
public void initModel(EnunciateFreemarkerModel model) {
super.initModel(model);
if (!getModelInternal().getNamespacesToWSDLs().isEmpty()) {
String docsDir = getDocsDir() == null ? "" : getDocsDir();
if (!docsDir.startsWith("/")) {
docsDir = "/" + docsDir;
}
while (docsDir.endsWith("/")) {
docsDir = docsDir.substring(0, docsDir.length() - 1);
}
for (WsdlInfo wsdlInfo : getModelInternal().getNamespacesToWSDLs().values()) {
Object filename = wsdlInfo.getProperty("filename");
if (filename != null) {
wsdlInfo.setProperty("redirectLocation", docsDir + "/" + filename);
}
}
}
EnunciateConfiguration cOnfig= model.getEnunciateConfig();
for (RootResource resource : model.getRootResources()) {
for (ResourceMethod resourceMethod : resource.getResourceMethods(true)) {
if (!resourceMethod.getMetaData().containsKey("defaultSubcontext")) {
//if we don't have the defaultSubcontext set by some other jax-rs implementation provider module
//then we need to set it ourselves.
resourceMethod.putMetaData("defaultSubcontext", cOnfig== null ? "/rest" : config.getDefaultRestSubcontext());
}
}
}
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
model.put("springDispatcherServletClass", getDispatcherServletClass());
model.put("soapAddressPath", new SoapAddressPathMethod());
model.put("restSubcontext", model.getEnunciateConfig().getDefaultRestSubcontext());
model.put("displayName", model.getEnunciateConfig().getLabel());
if (!globalServiceInterceptors.isEmpty()) {