Set ClientCache log-level to 'error'.
Disable SslAutoConfiguration on the client.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package example.java.net;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
/**
|
||||
* The {@link UrlRevealed} class...
|
||||
*
|
||||
* @author John Blum
|
||||
* @see java.net.URL
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class UrlRevealed {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
URL url = new URL("jar:file:///www.foo.com/bar/jar.jar!/baz/entry.txt");
|
||||
|
||||
System.out.printf("URL [%s] {%n \tfile [%s],%n \tpath [%s],%n \tport [%s],%n \tprotocol [%s],%n \tquery [%s]%n}%n%n",
|
||||
url, url.getFile(), url.getPath(), url.getPort(), url.getProtocol(), url.getQuery());
|
||||
|
||||
System.out.printf("URI [%s]%n", new ClassPathResource("trusted.keystore").getURL().toURI());
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.data.geode.autoconfigure.SslAutoConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -46,6 +47,7 @@ import org.springframework.data.gemfire.PartitionedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.CacheServerApplication;
|
||||
import org.springframework.data.gemfire.config.annotation.ClientCacheConfigurer;
|
||||
import org.springframework.data.gemfire.config.annotation.EnableLogging;
|
||||
import org.springframework.data.gemfire.config.annotation.EnablePdx;
|
||||
import org.springframework.data.gemfire.support.ConnectionEndpoint;
|
||||
import org.springframework.data.gemfire.tests.integration.ClientServerIntegrationTestsSupport;
|
||||
@@ -117,14 +119,15 @@ public class AutoConfiguredContinuousQueryIntegrationTests extends ClientServerI
|
||||
assertThat(this.temperatureReadingsHandler.getFreezingTemperatures()).contains(16, -51);
|
||||
}
|
||||
|
||||
@SpringBootApplication
|
||||
@SpringBootApplication(exclude = SslAutoConfiguration.class)
|
||||
@EnableLogging(logLevel = GEMFIRE_LOG_LEVEL)
|
||||
public static class GemFireClientConfiguration {
|
||||
|
||||
@Bean
|
||||
ClientCacheConfigurer clientCachePoolPortConfigurer(
|
||||
@Value("${" + GEMFIRE_CACHE_SERVER_PORT_PROPERTY + ":40404}") int port) {
|
||||
|
||||
return (bean, clientCacheFactoryBean) -> clientCacheFactoryBean.setServers(
|
||||
return (beanName, clientCacheFactoryBean) -> clientCacheFactoryBean.setServers(
|
||||
Collections.singletonList(new ConnectionEndpoint("localhost", port)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user