From 0ee5048412ee94789fe06f16f0b654b343a2658c Mon Sep 17 00:00:00 2001 From: Huang YunKun Date: Sun, 4 Jun 2017 18:37:18 +0800 Subject: [PATCH 1/2] Document InfluxDB support See gh-9404 --- .../main/asciidoc/spring-boot-features.adoc | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 3fb049fb37..ddbda674f6 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -4015,6 +4015,37 @@ validation altogether using the `spring.ldap.embedded.validation.enabled` proper you have custom attributes, you can use `spring.ldap.embedded.validation.schema` to define your custom attribute types or object classes. +[[boot-features-influxdb]] +=== InfluxDB +https://www.influxdata.com/[InfluxDB] is an open-source time series database developed by InfluxData. +It is written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such +as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics. +It also has support for processing data from Graphite. + +[[boot-features-connecting-to-influxdb]] +==== Connecting to InfluxDB +You can inject an auto-configured `org.influxdb.InfluxDB` to access InfluxDB databases. You must specify your InfluxDB server url, +there is no default url. + +[source,java,indent=0] +---- + @Component + public class MyBean { + + private InfluxDB influxDB; + + @Autowired + public MyBean(InfluxDB influxDB) { + this.influxDB = influxDB; + } + + // ... + + } +---- + +You can set `spring.influx.client.url` property to change the URL. If the connection to InfluxDB require user and password, +you can set `spring.influx.client.user` property and `spring.influx.client.password` property to change them. [[boot-features-caching]] == Caching From 068f904f2443ae9a0cb0c11ad0ac1025bd5e43e1 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 5 Jun 2017 11:06:49 +0200 Subject: [PATCH 2/2] Polish "Document InfluxDB support" Closes gh-9404 --- .../main/asciidoc/spring-boot-features.adoc | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index ddbda674f6..45808c158f 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -4015,37 +4015,31 @@ validation altogether using the `spring.ldap.embedded.validation.enabled` proper you have custom attributes, you can use `spring.ldap.embedded.validation.schema` to define your custom attribute types or object classes. + + [[boot-features-influxdb]] === InfluxDB -https://www.influxdata.com/[InfluxDB] is an open-source time series database developed by InfluxData. -It is written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such -as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics. -It also has support for processing data from Graphite. +https://www.influxdata.com/[InfluxDB] is an open-source time series database optimized for +fast, high-availability storage and retrieval of time series data in fields such as +operations monitoring, application metrics, Internet of Things sensor data, and real-time +analytics. + + [[boot-features-connecting-to-influxdb]] ==== Connecting to InfluxDB -You can inject an auto-configured `org.influxdb.InfluxDB` to access InfluxDB databases. You must specify your InfluxDB server url, -there is no default url. +Spring Boot auto-configures an `InfluxDB` instance as long as the `influxdb-java` client +is on the classpath and the url of the database is set: -[source,java,indent=0] +[source,properties,indent=0] ---- - @Component - public class MyBean { - - private InfluxDB influxDB; - - @Autowired - public MyBean(InfluxDB influxDB) { - this.influxDB = influxDB; - } - - // ... - - } + spring.influx.url=http://172.0.0.1:8086 ---- -You can set `spring.influx.client.url` property to change the URL. If the connection to InfluxDB require user and password, -you can set `spring.influx.client.user` property and `spring.influx.client.password` property to change them. +If the connection to InfluxDB requires a user and password, you can set the +`spring.influx.user` and `spring.influx.password` properties accordingly. + + [[boot-features-caching]] == Caching