new configuration work

This commit is contained in:
eugenp 2014-06-14 20:52:50 +03:00
parent 9ea4563680
commit 1f02eeaa2a
2 changed files with 19 additions and 2 deletions

View File

@ -1,5 +1,22 @@
package org.baeldung.httpclient;
import org.apache.http.HttpHost;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.conn.ConnectionRequest;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
import org.junit.Test;
public class HttpClientConnectionManagementTest {
//
// tests
@Test
public final void whenLowLevelConnectionIsEstablished_thenNoExceptions() {
final HttpClientContext context = HttpClientContext.create();
final BasicHttpClientConnectionManager connManager = new BasicHttpClientConnectionManager();
final HttpRoute route = new HttpRoute(new HttpHost("localhost", 80));
final ConnectionRequest connRequest = connManager.requestConnection(route, null);
}
}

View File

@ -23,7 +23,7 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
@PropertySource({ "classpath:persistence-mysql.properties" })
@PropertySource({ "classpath:persistence-${envTarget:mysql}.properties" })
@ComponentScan({ "org.baeldung.persistence" })
// @ImportResource("classpath*:springDataPersistenceConfig.xml")
@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao")