diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java index e58bda102b..6e3fde9309 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java @@ -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)) { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java index 1d89b40f99..6f206749db 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jPropertiesTests.java @@ -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,