Detect Neo4j https driver url

Closes gh-9549
pull/9585/head
Stephane Nicoll 8 years ago
parent d77056639d
commit 90c4e7518b

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 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.
@ -150,7 +150,7 @@ public class Neo4jProperties implements ApplicationContextAware {
if (scheme == null || scheme.equals("file")) {
return EMBEDDED_DRIVER;
}
if ("http".equals(scheme)) {
if ("http".equals(scheme) || "https".equals(scheme)) {
return HTTP_DRIVER;
}
if ("bolt".equals(scheme)) {

@ -71,6 +71,14 @@ public class Neo4jPropertiesTests {
assertDriver(configuration, Neo4jProperties.HTTP_DRIVER, "http://localhost:7474");
}
@Test
public void httpsUriUseHttpDriver() {
Neo4jProperties properties = load(true,
"spring.data.neo4j.uri=https://localhost:7474");
Configuration configuration = properties.createConfiguration();
assertDriver(configuration, Neo4jProperties.HTTP_DRIVER, "https://localhost:7474");
}
@Test
public void boltUriUseBoltDriver() {
Neo4jProperties properties = load(true,

Loading…
Cancel
Save