Commit Graph

36 Commits

Author SHA1 Message Date
Emily Casey
2b45fffefd Adds support for spring-ldap
Resolves #12

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-06-02 19:06:12 -04:00
Emily Casey
e6fbccfc31 Alphabetize factories
Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-06-02 14:23:16 -04:00
Emily Casey
bbda2549f1 Adds support for SCS config server
Adds support for Spring Cloud Services Config Server. Bindings must have kind config.

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-06-02 14:20:12 -04:00
Emily Casey
704a9d38a6 Handles k8s style bindings
When a binding is provided as a mounted ConfigMap/Secret pair (containing
metadata and secret values respectively) the files within the metadata and
secret directories will be symlinks to files in a colocated hidden directory
that contains the content. In order to handle bindings presented in this
format a Binding object will ignore hidden files and directories when it is
contructed using a path. This prevents errors that previously occured
when the Binding assumed all metadata and secret entries were regular files, and
attempted to read the content of those directories directly.

Resolves #40

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-05-29 11:47:36 -04:00
Emily Casey
8595e847a3 Support r2dbc
Adds r2dbc properties for mysql, postgres, sqlserver, oracle, and db2
bindings. This allow bindings to be used with reactive drivers.

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-05-28 18:25:29 -04:00
Emily Casey
44cb4a1f19 Eureka Support
[resolves #27]

Adds initial eureka client support.

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-05-18 09:49:55 -04:00
Ben Hale
6163be2aa7 ApplicationEventListeners
Previously, the implementations of the EnvironmentPostProcessors added
ApplicationEventListener to their interface as well.  These implementations
tested fine, but of course since there was no full integration test to ensure
that they were registered I forgot to add them to spring.factories.

This change adds their declarations as ApplicationEventListeners to the
spring.factories file and ensures that the logs are replayed when the
application is finished preparing.

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-15 17:27:58 -07:00
E Casey
ade8797e09 Merge pull request #38 from spring-cloud/37-wavefront
Wavefront Support
2020-05-15 16:53:20 -04:00
Emily Casey
f68c71cab1 fix kafka kind
Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-05-15 16:50:39 -04:00
Emily Casey
3193bd9acf Wavefront Support
[resolves #37]

Also fixes failure when there is no provider in the binding metadata.

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-05-15 16:32:39 -04:00
Ben Hale
815d7de222 Deferred Logging
Previously the logging put out by the library happened synchronously with the
code executing.  Because this library typically runs so early in the Spring
Boot lifecycle that logging isn't yet configured, it needs to defer that
logging until later.

This change converts the library to use Boot's DeferredLogger and listen for
an ApplicationPrepared event before logging out its messages.

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-15 12:47:35 -07:00
Ben Hale
0c6035082d Unused Class
This change removes an extraneous unused class

[resolves #36]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-12 08:08:01 -07:00
Ben Hale
6885bcbd24 Kafka Support
[resolves #22]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-12 08:06:28 -07:00
Ben Hale
4e47c3f59b RabbitMQ Support
[resolves #21]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-12 06:25:37 -07:00
Ben Hale
e15d0a1b61 Neo4J
This change contributes Neo4J support.

[resolves #20]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 16:57:02 -07:00
Ben Hale
9f99fbc8fb Elasticsearch
This change adds support for Elasticsearch bindings.

[resolves #18]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 16:42:14 -07:00
Ben Hale
05f5e5a34f Couchbase Support
This change adds support for auto-configuring Couchbase.

[resolves #17]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 16:20:29 -07:00
Ben Hale
2b4b1da636 Redis Binding
This change expands the Redis bindings to handle more properties.

[resolves #7]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 16:06:18 -07:00
Ben Hale
0416df43f7 MongoDB Binding
This change expands the MongoDB bindings to handle more properties.

[resolves #6]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 15:46:18 -07:00
Ben Hale
c864bbaaed Improve Property Mapping API
Previously the PutIfPresent API was a clunky way of only setting a property in
the PropertySource if the corresponding entry from the binding existed.  It
was pointed out in #31 that there are better APIs for doing this same thing.
Unfortunately the suggestion in that issue wasn't suitable (it was built for
beans not maps), but it did inspire a better API that was suited to maps.
This change implements that new API.

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 15:33:47 -07:00
Ben Hale
a33dcf034b Guards Should Use Environment
Previously all of the guard behavior was triggered by the contents of
environment variables.  In a Spring Boot application, looking at the
environment isn't the only way to get configuration.  This change updates the
guards to use the Environment for configuration retrieval.

[resolves #30]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 14:24:41 -07:00
Ben Hale
ebdec5dcc3 Add BindingFlattenedEnvironmentPostProcessor to Spring Factories
This was missed during the implementation.  The broader integration test that
should have caught this will come in #33.

[resolves #32]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 13:43:58 -07:00
Ben Hale
c9091503ef Expand Cassandra Bindings
This change expands the Cassandra bindings to handle more properties.

[resolves #5]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 11:55:54 -07:00
Ben Hale
c4721e9510 Flattened Bindings
Another common way to use bindings, even without auto-configuration is to
refer to them in a flattened form within other properties. An example would be
`spring.datasource.password=cnb.bindings.my-db.secret.password`.  This change
adds an EnvironmentPostProcessor that contributes these flattened bindings in
a PropertySource.

[resolves #24]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 11:26:16 -07:00
Ben Hale
aa6f50e5c3 Global Guard
Previously, whenever the library was included on a classpath it would attempt
to auto-configure Spring Boot.  Since part of the API can be used as a
straight library, and in that usage, auto-configuration would not be
desirable, the auto-configuration needed a global off switch.  This change
adds a global guard, disabled by default, in the
org.springframework.cloud.bindings.boot.enable System Property.

[resolves #25]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 10:42:47 -07:00
Ben Hale
de2422fdf5 Per-kind Disabling
Previously, auto-configuration of all kinds of bindings were either enabled or
disabled en-mass.  This level of granularity wasn't really appropriate in
practice as it many use-cases could be served with some bindings but not
others.  This change updates each auto-configuration to watch for a particular
key to be disabled.

[resolves #29]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 09:36:54 -07:00
Ben Hale
6c51ac5712 SQLServer JDBC Format
[resolves #11]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 08:55:29 -07:00
Ben Hale
81f30595c1 PostgreSQL JDBC Format
[resolves #10]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 08:52:28 -07:00
Ben Hale
efcb054ec0 Oracle JDBC Format
[resolves #9]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 08:49:55 -07:00
Ben Hale
268be9f7c7 MySQL JDBC Format
[resolves #8]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 08:47:35 -07:00
Ben Hale
87a8ac1226 DB2 URL Format
[resolves #4]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 08:45:13 -07:00
Ben Hale
f3929371f9 README
This change adds a README file containing information about using the project
and the properties that are set automatically.

[resolves #2]

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 08:40:04 -07:00
Ben Hale
30b1a88644 Isolate Boot-specific Processors
Previously, the Boot-specific processors were in the same package as the core
types.  This minimzed the visibility of some constructors used for testing,
but as the list of processors has grown (and will continue to grow), the core
types were being overwhelmed.

This change moves the Boot-specific processors out to an additional package
where they can be easily identified.

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-11 07:35:45 -07:00
Ben Hale
ff878c8c95 Single Project
And now we arrive at the end, a single concise project.

Signed-off-by: Ben Hale <bhale@vmware.com>
2020-05-09 09:03:58 -07:00
Emily Casey
98187447bf remove eclipse config
Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-04-28 16:15:53 -04:00
Emily Casey
de13fcd0f0 Initial commit
* sets up framework
* provides mysql binding

Signed-off-by: Emily Casey <ecasey@pivotal.io>
2020-04-28 16:14:37 -04:00