|
|
|
@ -20,6 +20,8 @@ import java.io.File; |
|
|
|
import java.net.URI; |
|
|
|
import java.net.URI; |
|
|
|
import java.time.Duration; |
|
|
|
import java.time.Duration; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.jspecify.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -35,7 +37,7 @@ public class Neo4jProperties { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* URI used by the driver. |
|
|
|
* URI used by the driver. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private URI uri; |
|
|
|
private @Nullable URI uri; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Timeout for borrowing connections from the pool. |
|
|
|
* Timeout for borrowing connections from the pool. |
|
|
|
@ -53,11 +55,11 @@ public class Neo4jProperties { |
|
|
|
|
|
|
|
|
|
|
|
private final Security security = new Security(); |
|
|
|
private final Security security = new Security(); |
|
|
|
|
|
|
|
|
|
|
|
public URI getUri() { |
|
|
|
public @Nullable URI getUri() { |
|
|
|
return this.uri; |
|
|
|
return this.uri; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setUri(URI uri) { |
|
|
|
public void setUri(@Nullable URI uri) { |
|
|
|
this.uri = uri; |
|
|
|
this.uri = uri; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -94,53 +96,53 @@ public class Neo4jProperties { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Login user of the server. |
|
|
|
* Login user of the server. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String username; |
|
|
|
private @Nullable String username; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Login password of the server. |
|
|
|
* Login password of the server. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String password; |
|
|
|
private @Nullable String password; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Realm to connect to. |
|
|
|
* Realm to connect to. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String realm; |
|
|
|
private @Nullable String realm; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Kerberos ticket for connecting to the database. Mutual exclusive with a given |
|
|
|
* Kerberos ticket for connecting to the database. Mutual exclusive with a given |
|
|
|
* username. |
|
|
|
* username. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String kerberosTicket; |
|
|
|
private @Nullable String kerberosTicket; |
|
|
|
|
|
|
|
|
|
|
|
public String getUsername() { |
|
|
|
public @Nullable String getUsername() { |
|
|
|
return this.username; |
|
|
|
return this.username; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setUsername(String username) { |
|
|
|
public void setUsername(@Nullable String username) { |
|
|
|
this.username = username; |
|
|
|
this.username = username; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getPassword() { |
|
|
|
public @Nullable String getPassword() { |
|
|
|
return this.password; |
|
|
|
return this.password; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setPassword(String password) { |
|
|
|
public void setPassword(@Nullable String password) { |
|
|
|
this.password = password; |
|
|
|
this.password = password; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getRealm() { |
|
|
|
public @Nullable String getRealm() { |
|
|
|
return this.realm; |
|
|
|
return this.realm; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setRealm(String realm) { |
|
|
|
public void setRealm(@Nullable String realm) { |
|
|
|
this.realm = realm; |
|
|
|
this.realm = realm; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getKerberosTicket() { |
|
|
|
public @Nullable String getKerberosTicket() { |
|
|
|
return this.kerberosTicket; |
|
|
|
return this.kerberosTicket; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setKerberosTicket(String kerberosTicket) { |
|
|
|
public void setKerberosTicket(@Nullable String kerberosTicket) { |
|
|
|
this.kerberosTicket = kerberosTicket; |
|
|
|
this.kerberosTicket = kerberosTicket; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -167,7 +169,7 @@ public class Neo4jProperties { |
|
|
|
* Pooled connections that have been idle in the pool for longer than this |
|
|
|
* Pooled connections that have been idle in the pool for longer than this |
|
|
|
* threshold will be tested before they are used again. |
|
|
|
* threshold will be tested before they are used again. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private Duration idleTimeBeforeConnectionTest; |
|
|
|
private @Nullable Duration idleTimeBeforeConnectionTest; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Pooled connections older than this threshold will be closed and removed from |
|
|
|
* Pooled connections older than this threshold will be closed and removed from |
|
|
|
@ -197,11 +199,11 @@ public class Neo4jProperties { |
|
|
|
this.maxConnectionPoolSize = maxConnectionPoolSize; |
|
|
|
this.maxConnectionPoolSize = maxConnectionPoolSize; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Duration getIdleTimeBeforeConnectionTest() { |
|
|
|
public @Nullable Duration getIdleTimeBeforeConnectionTest() { |
|
|
|
return this.idleTimeBeforeConnectionTest; |
|
|
|
return this.idleTimeBeforeConnectionTest; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setIdleTimeBeforeConnectionTest(Duration idleTimeBeforeConnectionTest) { |
|
|
|
public void setIdleTimeBeforeConnectionTest(@Nullable Duration idleTimeBeforeConnectionTest) { |
|
|
|
this.idleTimeBeforeConnectionTest = idleTimeBeforeConnectionTest; |
|
|
|
this.idleTimeBeforeConnectionTest = idleTimeBeforeConnectionTest; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -246,7 +248,7 @@ public class Neo4jProperties { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Path to the file that holds the trusted certificates. |
|
|
|
* Path to the file that holds the trusted certificates. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private File certFile; |
|
|
|
private @Nullable File certFile; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Whether hostname verification is required. |
|
|
|
* Whether hostname verification is required. |
|
|
|
@ -269,11 +271,11 @@ public class Neo4jProperties { |
|
|
|
this.trustStrategy = trustStrategy; |
|
|
|
this.trustStrategy = trustStrategy; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public File getCertFile() { |
|
|
|
public @Nullable File getCertFile() { |
|
|
|
return this.certFile; |
|
|
|
return this.certFile; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setCertFile(File certFile) { |
|
|
|
public void setCertFile(@Nullable File certFile) { |
|
|
|
this.certFile = certFile; |
|
|
|
this.certFile = certFile; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|