當前位置: 首頁>>代碼示例>>Java>>正文


Java RemoteDevToolsProperties類代碼示例

本文整理匯總了Java中org.springframework.boot.devtools.autoconfigure.RemoteDevToolsProperties的典型用法代碼示例。如果您正苦於以下問題:Java RemoteDevToolsProperties類的具體用法?Java RemoteDevToolsProperties怎麽用?Java RemoteDevToolsProperties使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RemoteDevToolsProperties類屬於org.springframework.boot.devtools.autoconfigure包,在下文中一共展示了RemoteDevToolsProperties類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getSecurityInterceptor

import org.springframework.boot.devtools.autoconfigure.RemoteDevToolsProperties; //導入依賴的package包/類
private ClientHttpRequestInterceptor getSecurityInterceptor() {
	RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
	String secretHeaderName = remoteProperties.getSecretHeaderName();
	String secret = remoteProperties.getSecret();
	Assert.state(secret != null,
			"The environment value 'spring.devtools.remote.secret' "
					+ "is required to secure your connection.");
	return new HttpHeaderInterceptor(secretHeaderName, secret);
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:10,代碼來源:RemoteClientConfiguration.java

示例2: logWarnings

import org.springframework.boot.devtools.autoconfigure.RemoteDevToolsProperties; //導入依賴的package包/類
@PostConstruct
private void logWarnings() {
	RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
	if (!remoteProperties.getDebug().isEnabled()
			&& !remoteProperties.getRestart().isEnabled()) {
		logger.warn("Remote restart and debug are both disabled.");
	}
	if (!this.remoteUrl.startsWith("https://")) {
		logger.warn("The connection to " + this.remoteUrl
				+ " is insecure. You should use a URL starting with 'https://'.");
	}
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:13,代碼來源:RemoteClientConfiguration.java

示例3: remoteDebugTunnelClient

import org.springframework.boot.devtools.autoconfigure.RemoteDevToolsProperties; //導入依賴的package包/類
@Bean
public TunnelClient remoteDebugTunnelClient(
		ClientHttpRequestFactory requestFactory) {
	RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
	String url = this.remoteUrl + remoteProperties.getContextPath() + "/debug";
	TunnelConnection connection = new HttpTunnelConnection(url, requestFactory);
	int localPort = remoteProperties.getDebug().getLocalPort();
	TunnelClient client = new TunnelClient(localPort, connection);
	client.addListener(new LoggingTunnelClientListener());
	return client;
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:RemoteClientConfiguration.java

示例4: getMatchOutcome

import org.springframework.boot.devtools.autoconfigure.RemoteDevToolsProperties; //導入依賴的package包/類
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context,
		AnnotatedTypeMetadata metadata) {
	RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
			context.getEnvironment(), "spring.devtools.remote.debug.");
	Integer port = resolver.getProperty("local-port", Integer.class);
	if (port == null) {
		port = RemoteDevToolsProperties.Debug.DEFAULT_LOCAL_PORT;
	}
	if (isPortAvailable(port)) {
		return ConditionOutcome.match("Local debug port available");
	}
	return ConditionOutcome.noMatch("Local debug port unavailable");
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:15,代碼來源:LocalDebugPortAvailableCondition.java


注:本文中的org.springframework.boot.devtools.autoconfigure.RemoteDevToolsProperties類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。