本文整理匯總了Java中io.undertow.Version類的典型用法代碼示例。如果您正苦於以下問題:Java Version類的具體用法?Java Version怎麽用?Java Version使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Version類屬於io.undertow包,在下文中一共展示了Version類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: headersHandler
import io.undertow.Version; //導入依賴的package包/類
private static SetHeadersHandler headersHandler(HttpHandler servletInitialHandler, Config cfg) {
Map<HttpString, String> headers = new HashMap<>();
headers.put(HttpString.tryFromString(HEADER_SERVER), cfg.getString(KEY_HEADER_SERVER));
if (!Environment.isProd()) {
headers.put(HttpString.tryFromString(HEADER_X_POWERED_BY), Version.getFullVersionString());
}
return Boolean.getBoolean(SYS_PROP_ENABLE_REQ_BUFF) ?
new SetHeadersHandler(reqBufferingHandler(servletInitialHandler, cfg), headers) :
new SetHeadersHandler(servletInitialHandler, headers);
}
示例2: injectEnvironmentInfoIntoBanner
import io.undertow.Version; //導入依賴的package包/類
@Override
protected void injectEnvironmentInfoIntoBanner(final Formatter formatter, final Environment environment, final Class<?> sourceClass) {
formatter.format("Undertow Version: %s%n", Version.getFullVersionString());
formatter.format("%s%n", LINE_SEPARATOR);
}
示例3: getServerInfo
import io.undertow.Version; //導入依賴的package包/類
@Override
public String getServerInfo() {
return deploymentInfo.getServerName() + " - " + Version.getVersionString();
}