Compare commits

...
Author SHA1 Message Date
spring-builds 46c9efde7f Update SNAPSHOT to 4.3.2 2026-04-01 21:23:11 +00:00
Ryan Baxter 127f659c4c Merge pull request #4549 from ryanjbaxter/webclient-application-deregister
Use own connectionprovider and loopresources for WebClient
2026-04-01 10:27:04 -04:00
Ryan Baxter 79b7b91a03 Use own connectionprovider and loopresources for WebClient
When eureka.client.webclient.enabled=true is used with a reactive web server (Netty), the WebClient in WebClientEurekaHttpClient shares the same Reactor Netty event loop
  resources (LoopResources / ConnectionProvider) with the reactive web server, via Spring Boot's ReactorResourceFactory.
  During graceful shutdown, the sequence is:
  1. EurekaServiceRegistry.deregister() sets the instance status to DOWN (but doesn't send the actual DELETE)
  2. The reactive Netty web server shuts down, terminating its event loop
  3. Later, during bean destruction, DiscoveryClient.shutdown() calls WebClientEurekaHttpClient.cancel() to send the DELETE deregistration request
  4. cancel() calls Mono.block() on the WebClient, which tries to use the now-terminated Netty event loop → RejectedExecutionException: event executor terminated

Fixes #4488
2026-04-01 10:10:50 -04:00
spring-builds c225462df7 Bumping versions 2026-03-29 14:44:51 +00:00
Ryan Baxter 702705b430 Merge pull request #4548 from spring-cloud/dependabot/maven/4.3.x/eureka.version-2.0.6
Bump eureka.version from 2.0.5 to 2.0.6
2026-03-27 17:24:14 -04:00
spencergibb 1974458749 Exclude commons-configuration from eureka-client
Also removes libs-*-local bits from repositories

Fixes gh-4457
2026-03-27 12:55:33 -04:00
dependabot[bot] f43fbc9f7b Bump eureka.version from 2.0.5 to 2.0.6
Bumps `eureka.version` from 2.0.5 to 2.0.6.

Updates `com.netflix.eureka:eureka-client` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.5...v2.0.6)

Updates `com.netflix.eureka:eureka-core` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.5...v2.0.6)

Updates `com.netflix.eureka:eureka-core-jersey3` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.5...v2.0.6)

Updates `com.netflix.eureka:eureka-client-jersey3` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.5...v2.0.6)

---
updated-dependencies:
- dependency-name: com.netflix.eureka:eureka-client
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core-jersey3
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-client-jersey3
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-27 16:44:38 +00:00
Ryan Baxter ad03f7f924 Merge pull request #4546 from spring-cloud/dependabot/github_actions/4.3.x/codecov/codecov-action-6 2026-03-26 13:42:40 -04:00
dependabot[bot] 28402d65f7 Bump codecov/codecov-action from 5 to 6
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-26 16:44:24 +00:00
Ryan Baxter 0a8435a2b0 Update workflow to remove push trigger
Removed push trigger for specific branches.

Signed-off-by: Ryan Baxter <rbaxter85@gmail.com>
2026-03-25 16:21:55 -04:00
Ryan Baxter 7d8864c45b Add CI workflow for Spring Cloud Netflix
Signed-off-by: Ryan Baxter <rbaxter85@gmail.com>
2026-03-25 16:03:15 -04:00
Ryan Baxter 5620205eaa Merge pull request #4542 from spring-cloud/dependabot/npm_and_yarn/docs/4.3.x/springio/antora-extensions-1.14.9
Bump @springio/antora-extensions from 1.14.7 to 1.14.9 in /docs
2026-03-19 14:37:23 -04:00
dependabot[bot] 7b6f8cb37c Bump @springio/antora-extensions from 1.14.7 to 1.14.9 in /docs
Bumps [@springio/antora-extensions](https://github.com/spring-io/antora-extensions) from 1.14.7 to 1.14.9.
- [Changelog](https://github.com/spring-io/antora-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/antora-extensions/compare/v1.14.7...v1.14.9)

---
updated-dependencies:
- dependency-name: "@springio/antora-extensions"
  dependency-version: 1.14.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 18:32:17 +00:00
Ryan Baxter e11f7d7621 Merge pull request #4543 from spring-cloud/dependabot/npm_and_yarn/docs/4.3.x/springio/asciidoctor-extensions-1.0.0-alpha.18
Bump @springio/asciidoctor-extensions from 1.0.0-alpha.17 to 1.0.0-alpha.18 in /docs
2026-03-19 14:30:55 -04:00
dependabot[bot] b1c4d9a2a5 Bump @springio/asciidoctor-extensions in /docs
Bumps [@springio/asciidoctor-extensions](https://github.com/spring-io/asciidoctor-extensions) from 1.0.0-alpha.17 to 1.0.0-alpha.18.
- [Changelog](https://github.com/spring-io/asciidoctor-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/asciidoctor-extensions/compare/v1.0.0-alpha.17...v1.0.0-alpha.18)

---
updated-dependencies:
- dependency-name: "@springio/asciidoctor-extensions"
  dependency-version: 1.0.0-alpha.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 16:46:00 +00:00
Ryan Baxter dd1cb74e94 Revert "Bump org.webjars.npm:glob from 7.2.0 to 7.2.3 (#4451)"
This reverts commit 5234a4c095.
2026-03-09 17:43:34 -04:00
dependabot[bot] ca7b068436 Bump org.webjars.npm:jquery from 3.6.0 to 3.6.4 (#4450)
Bumps [org.webjars.npm:jquery](https://github.com/jquery/jquery) from 3.6.0 to 3.6.4.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Changelog](https://github.com/jquery/jquery/blob/main/changelog.md)
- [Commits](https://github.com/jquery/jquery/compare/3.6.0...3.6.4)

---
updated-dependencies:
- dependency-name: org.webjars.npm:jquery
  dependency-version: 3.6.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 16:29:15 -04:00
dependabot[bot] 5234a4c095 Bump org.webjars.npm:glob from 7.2.0 to 7.2.3 (#4451)
Bumps [org.webjars.npm:glob](https://github.com/isaacs/node-glob) from 7.2.0 to 7.2.3.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v7.2.0...v7.2.3)

---
updated-dependencies:
- dependency-name: org.webjars.npm:glob
  dependency-version: 7.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 16:29:12 -04:00
dependabot[bot] ab3de3d617 Bump @antora/collector-extension from 1.0.2 to 1.0.3 in /docs (#4535)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-version: 1.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 16:28:54 -04:00
spring-builds b2bcfa2298 Bumping dependency versions after release 2025-12-16 21:11:15 +00:00
spring-builds a0e94fcd74 Bumping versions to 4.3.2-SNAPSHOT after release 2025-12-16 21:10:02 +00:00
spring-builds 1b67bb917d Going back to snapshots 2025-12-16 21:10:00 +00:00
spring-builds a660a7bf48 Update SNAPSHOT to 4.3.1 2025-12-16 21:09:07 +00:00
dependabot[bot] 3669e48fd3 Bump testcontainers.version from 1.21.3 to 1.21.4 (#4523)
Bumps `testcontainers.version` from 1.21.3 to 1.21.4.

Updates `org.testcontainers:mockserver` from 1.21.3 to 1.21.4
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.3...1.21.4)

Updates `org.testcontainers:junit-jupiter` from 1.21.3 to 1.21.4
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.3...1.21.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-version: 1.21.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-version: 1.21.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 14:27:22 -05:00
spencergibb 0e2f9ed0c2 Merge branch '4.2.x' into 4.3.x 2025-12-03 11:28:06 -05:00
spencergibb ab66c66488 Exclude guava from eureka-client
Fixes gh-4467
2025-12-03 11:25:55 -05:00
spencergibb 41c38ef71c Merge remote-tracking branch 'origin/4.3.x' into 4.3.x
# Conflicts:
#	pom.xml
#	spring-cloud-netflix-dependencies/pom.xml
2025-12-03 10:59:27 -05:00
spencergibb a1569a6458 Merge branch '4.2.x' into 4.3.x 2025-12-03 10:49:30 -05:00
David Vana 8885663ff9 Switch remaining JUnit 4 tests to JUnit Jupiter #4011 (#4421)
* Migrate to JUnit 5 (#4011)

Signed-off-by: David Vana <developer@david-vana.cz>

* Removed unused JUnit 4 dependencies (#4011)

Signed-off-by: David Vana <developer@david-vana.cz>

---------

Signed-off-by: David Vana <developer@david-vana.cz>
2025-12-03 10:44:42 -05:00
dependabot[bot] fe385b62b3 Bump antora from 3.2.0-alpha.10 to 3.2.0-alpha.11 in /docs (#4518)
Bumps [antora](https://gitlab.com/antora/antora) from 3.2.0-alpha.10 to 3.2.0-alpha.11.
- [Changelog](https://gitlab.com/antora/antora/blob/main/CHANGELOG.adoc)
- [Commits](https://gitlab.com/antora/antora/compare/v3.2.0-alpha.10...v3.2.0-alpha.11)

---
updated-dependencies:
- dependency-name: antora
  dependency-version: 3.2.0-alpha.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 16:15:25 -05:00
dependabot[bot] bef6d5ccd3 Bump antora from 3.2.0-alpha.10 to 3.2.0-alpha.11 in /docs (#4519) 2025-12-01 14:24:07 -05:00
dependabot[bot] d455f9ef2a Bump actions/checkout from 5 to 6 (#4512)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 15:01:09 -05:00
dependabot[bot] 21ed3d99a3 Bump actions/checkout from 5 to 6 (#4513)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 15:00:25 -05:00
spring-builds c3c43d14d8 Bumping versions 2025-10-29 00:19:46 +00:00
spring-builds 2796d5b64a Bumping versions 2025-10-24 03:22:53 +00:00
Olga Maciaszek-Sharma 58f0adf43b Merge remote-tracking branch 'origin/4.2.x' into 4.3.x 2025-10-07 14:57:20 +02:00
dependabot[bot] 1f4b1444c4 Bump antora from 3.2.0-alpha.9 to 3.2.0-alpha.10 in /docs (#4502)
Bumps [antora](https://gitlab.com/antora/antora) from 3.2.0-alpha.9 to 3.2.0-alpha.10.
- [Changelog](https://gitlab.com/antora/antora/blob/main/CHANGELOG.adoc)
- [Commits](https://gitlab.com/antora/antora/compare/v3.2.0-alpha.9...v3.2.0-alpha.10)

---
updated-dependencies:
- dependency-name: antora
  dependency-version: 3.2.0-alpha.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 14:56:11 +02:00
Olga Maciaszek-Sharma 45d1eeba97 Update maven workflow settings.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-09-11 16:12:52 +02:00
Olga Maciaszek-Sharma 738f5f8a05 Merge remote-tracking branch 'origin/4.2.x' into 4.3.x 2025-09-11 14:51:06 +02:00
dependabot[bot] 4471f73c0d Bump actions/checkout from 4 to 5 (#4470)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-11 14:49:45 +02:00
dependabot[bot] 74c552b86b Bump @antora/atlas-extension in /docs (#4493)
---
updated-dependencies:
- dependency-name: "@antora/atlas-extension"
  dependency-version: 1.0.0-alpha.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-11 14:48:32 +02:00
dependabot[bot] 272a2e4c6d Bump @springio/antora-extensions from 1.14.6 to 1.14.7 in /docs (#4464)
Bumps [@springio/antora-extensions](https://github.com/spring-io/antora-extensions) from 1.14.6 to 1.14.7.
- [Changelog](https://github.com/spring-io/antora-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/antora-extensions/compare/v1.14.6...v1.14.7)

---
updated-dependencies:
- dependency-name: "@springio/antora-extensions"
  dependency-version: 1.14.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-11 14:46:12 +02:00
dependabot[bot] 5c7de9750b Bump @antora/collector-extension from 1.0.1 to 1.0.2 in /docs (#4480)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-version: 1.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-11 14:44:08 +02:00
dependabot[bot] 09cebbf93e Bump antora from 3.2.0-alpha.8 to 3.2.0-alpha.9 in /docs (#4481)
Bumps [antora](https://gitlab.com/antora/antora) from 3.2.0-alpha.8 to 3.2.0-alpha.9.
- [Changelog](https://gitlab.com/antora/antora/blob/main/CHANGELOG.adoc)
- [Commits](https://gitlab.com/antora/antora/compare/v3.2.0-alpha.8...v3.2.0-alpha.9)

---
updated-dependencies:
- dependency-name: antora
  dependency-version: 3.2.0-alpha.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-11 14:43:46 +02:00
dependabot[bot] 09733b6aa4 Bump actions/setup-java from 4 to 5 (#4484)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-11 14:42:06 +02:00
Olga Maciaszek-Sharma fd36c06113 Merge remote-tracking branch 'origin/4.2.x' into 4.3.x 2025-08-20 13:10:36 +02:00
Olga Maciaszek-Sharma 1128443b03 Update license to present.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-08-20 13:09:58 +02:00
spring-builds 57e8b2f576 Bumping versions 2025-08-05 00:18:50 +00:00
spring-builds 448635e7ef Bumping versions 2025-08-02 00:29:34 +00:00
spring-builds 0a0fa921c0 Bumping versions 2025-08-01 00:19:17 +00:00
dependabot[bot] 70797e0b43 Bump testcontainers.version from 1.21.1 to 1.21.3 (#4456)
Bumps `testcontainers.version` from 1.21.1 to 1.21.3.

Updates `org.testcontainers:mockserver` from 1.21.1 to 1.21.3
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.1...1.21.3)

Updates `org.testcontainers:junit-jupiter` from 1.21.1 to 1.21.3
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.1...1.21.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-version: 1.21.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-version: 1.21.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-25 12:54:16 +02:00
dependabot[bot] c8f2400cd4 Bump @springio/antora-extensions from 1.14.6 to 1.14.7 in /docs (#4462)
Bumps [@springio/antora-extensions](https://github.com/spring-io/antora-extensions) from 1.14.4 to 1.14.6.
- [Changelog](https://github.com/spring-io/antora-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/antora-extensions/compare/v1.14.4...v1.14.6)

---
updated-dependencies:
- dependency-name: "@springio/antora-extensions"
  dependency-version: 1.14.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-25 12:53:11 +02:00
Olga Maciaszek-Sharma 6b52e37357 Merge remote-tracking branch 'origin/4.2.x' into 4.3.x
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	docs/pom.xml
#	pom.xml
#	spring-cloud-netflix-dependencies/pom.xml
#	spring-cloud-netflix-eureka-client-tls-tests/pom.xml
#	spring-cloud-netflix-eureka-client/pom.xml
#	spring-cloud-netflix-eureka-server/pom.xml
#	spring-cloud-starter-netflix-eureka-client/pom.xml
#	spring-cloud-starter-netflix-eureka-server/pom.xml
2025-07-25 12:48:41 +02:00
dependabot[bot] fb6f461839 Bump @springio/antora-extensions from 1.14.4 to 1.14.6 in /docs (#4459)
Bumps [@springio/antora-extensions](https://github.com/spring-io/antora-extensions) from 1.14.4 to 1.14.6.
- [Changelog](https://github.com/spring-io/antora-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/antora-extensions/compare/v1.14.4...v1.14.6)

---
updated-dependencies:
- dependency-name: "@springio/antora-extensions"
  dependency-version: 1.14.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-25 12:45:55 +02:00
spring-builds 9928fa0887 Bumping versions 2025-07-11 03:15:10 +00:00
spring-builds 359b686329 Bumping versions 2025-07-10 03:12:53 +00:00
spring-builds ab8ecc7382 Bumping dependency versions after release 2025-07-10 00:09:22 +00:00
spring-builds 88ffcce20f Bumping versions to 4.2.3-SNAPSHOT after release 2025-07-10 00:08:16 +00:00
spring-builds 225310d919 Going back to snapshots 2025-07-10 00:08:13 +00:00
spring-builds a0fcb23e1f Update SNAPSHOT to 4.2.2 2025-07-10 00:07:13 +00:00
spencergibb 83f000f301 Skips deploy of test artifact 2025-07-09 15:14:58 -04:00
spencergibb 7afa5e8fd5 Adds metadata to pom.xml 2025-07-09 13:08:52 -04:00
Olga Maciaszek-Sharma 28959910a6 Merge remote-tracking branch 'origin/4.2.x' into 4.3.x 2025-06-30 13:53:07 +02:00
Olga Maciaszek-Sharma 79130b2342 Merge changes from 4.1.x
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-06-30 13:51:59 +02:00
Olga Maciaszek-Sharma 3d12951965 Merge remote-tracking branch 'origin/4.2.x' into 4.2.x 2025-06-30 13:48:57 +02:00
spring-builds 8210f8c8f5 Bumping versions 2025-06-25 11:58:07 +00:00
spring-builds 3dea444dd6 Bumping versions 2025-06-24 11:58:19 +00:00
spring-builds 4ecf384881 Bumping dependency versions after release 2025-06-24 10:11:27 +00:00
spring-builds e69b82c772 Bumping versions to 4.1.7-SNAPSHOT after release 2025-06-24 10:10:21 +00:00
spring-builds 526a8c9e65 Going back to snapshots 2025-06-24 10:10:19 +00:00
spring-builds 284a157c67 Update SNAPSHOT to 4.1.6 2025-06-24 10:09:21 +00:00
spring-builds 34793d6c75 Bumping versions 2025-06-21 11:58:07 +00:00
spring-builds 7bd97eea49 Bumping versions 2025-06-20 11:58:22 +00:00
spring-builds 4c5147600c Bumping versions 2025-06-18 03:13:54 +00:00
spring-builds 8479b081c1 Bumping versions 2025-06-17 00:20:35 +00:00
spring-builds 11f557ac2e Bumping versions 2025-06-16 11:58:04 +00:00
spring-builds 9713186651 Bumping versions 2025-06-11 11:58:19 +00:00
spring-builds aa26d34e2f Bumping versions 2025-06-11 03:12:55 +00:00
spring-builds 34b845ea8d Bumping versions 2025-06-11 00:17:42 +00:00
dependabot[bot] 5c59950d95 Bump testcontainers.version from 1.21.0 to 1.21.1 (#4448)
Bumps `testcontainers.version` from 1.21.0 to 1.21.1.

Updates `org.testcontainers:mockserver` from 1.21.0 to 1.21.1
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.0...1.21.1)

Updates `org.testcontainers:junit-jupiter` from 1.21.0 to 1.21.1
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.0...1.21.1)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-version: 1.21.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-version: 1.21.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 15:19:37 +02:00
Olga Maciaszek-Sharma 5d79e6016e Merge remote-tracking branch 'origin/4.2.x' into 4.3.x 2025-06-06 12:53:59 +02:00
Olga Maciaszek-Sharma 0015d41c18 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x 2025-06-06 12:49:31 +02:00
Olga Maciaszek-Sharma e1778825d3 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x 2025-06-05 15:34:51 +02:00
dependabot[bot] 8e70173fa5 Bump eureka.version from 2.0.4 to 2.0.5 (#4441)
Bumps `eureka.version` from 2.0.4 to 2.0.5.

Updates `com.netflix.eureka:eureka-client` from 2.0.4 to 2.0.5
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.4...v2.0.5)

Updates `com.netflix.eureka:eureka-core` from 2.0.4 to 2.0.5
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.4...v2.0.5)

Updates `com.netflix.eureka:eureka-core-jersey3` from 2.0.4 to 2.0.5
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.4...v2.0.5)

Updates `com.netflix.eureka:eureka-client-jersey3` from 2.0.4 to 2.0.5
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.4...v2.0.5)

---
updated-dependencies:
- dependency-name: com.netflix.eureka:eureka-client
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core-jersey3
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-client-jersey3
  dependency-version: 2.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 15:33:53 +02:00
spring-builds 44fab96fb1 Bumping versions 2025-05-31 11:56:11 +00:00
spring-builds 6a8cfdfed8 Bumping versions 2025-05-31 03:11:39 +00:00
spring-builds 00b4d3085d Bumping versions 2025-05-31 00:18:30 +00:00
spring-builds b48454b5dc Going back to snapshots 2025-05-29 15:04:38 +00:00
spring-builds ecd8993aa8 Update SNAPSHOT to 4.3.0 2025-05-29 15:03:46 +00:00
spring-builds 79fd2a0c24 Bumping dependency versions after release 2025-05-29 01:07:49 +00:00
spring-builds fd051d57c7 Bumping versions to 4.3.1-SNAPSHOT after release 2025-05-29 01:07:03 +00:00
spring-builds 68589c65fb Going back to snapshots 2025-05-29 01:07:02 +00:00
spring-builds 4b51773b16 Update SNAPSHOT to 4.3.0 2025-05-29 01:06:11 +00:00
dependabot[bot] 52beb5c4ba Bump testcontainers.version from 1.20.6 to 1.21.0 (#4435)
Bumps `testcontainers.version` from 1.20.6 to 1.21.0.

Updates `org.testcontainers:mockserver` from 1.20.6 to 1.21.0
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.6...1.21.0)

Updates `org.testcontainers:junit-jupiter` from 1.20.6 to 1.21.0
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.6...1.21.0)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-version: 1.21.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.testcontainers:junit-jupiter
  dependency-version: 1.21.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 17:29:01 +02:00
spring-builds fb04865d0b Going back to snapshots 2025-05-01 12:36:25 +00:00
spring-builds d4c64cdc47 Update SNAPSHOT to 4.3.0-RC1 2025-05-01 12:35:41 +00:00
Olga Maciaszek-Sharma 0a1f057d41 Merge remote-tracking branch 'origin/4.2.x'
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	pom.xml
2025-04-11 17:02:31 +02:00
Olga Maciaszek-Sharma 8bff0cf743 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	pom.xml
2025-04-11 16:56:34 +02:00
Olga Maciaszek-Sharma c1451b0374 Fix checkstyle.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-04-11 16:35:25 +02:00
spring-builds eecadd367e Going back to snapshots 2025-04-07 11:14:45 +00:00
spring-builds 55c7b5c2a2 Update SNAPSHOT to 4.3.0-M3 2025-04-07 11:14:01 +00:00
spring-builds 75b40713e7 Bumping versions 2025-04-05 11:55:46 +00:00
spring-builds b150bde1ec Bumping versions 2025-04-05 03:12:03 +00:00
Olga Maciaszek-Sharma 65b679630f Merge remote-tracking branch 'origin/4.2.x' 2025-03-26 18:00:36 +01:00
Olga Maciaszek-Sharma 7d8abf6dc1 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x 2025-03-26 17:59:40 +01:00
dependabot[bot] 1a2fd8a7cc Bump @springio/asciidoctor-extensions in /docs (#4427)
Bumps [@springio/asciidoctor-extensions](https://github.com/spring-io/asciidoctor-extensions) from 1.0.0-alpha.16 to 1.0.0-alpha.17.
- [Changelog](https://github.com/spring-io/asciidoctor-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/asciidoctor-extensions/compare/v1.0.0-alpha.16...v1.0.0-alpha.17)

---
updated-dependencies:
- dependency-name: "@springio/asciidoctor-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 17:57:42 +01:00
Olga Maciaszek-Sharma 6b37a8bf04 Merge remote-tracking branch 'origin/4.2.x'
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	docs/pom.xml
#	pom.xml
#	spring-cloud-netflix-dependencies/pom.xml
#	spring-cloud-netflix-eureka-client-tls-tests/pom.xml
#	spring-cloud-netflix-eureka-client/pom.xml
#	spring-cloud-netflix-eureka-server/pom.xml
#	spring-cloud-starter-netflix-eureka-client/pom.xml
#	spring-cloud-starter-netflix-eureka-server/pom.xml
2025-03-24 19:35:47 +01:00
Olga Maciaszek-Sharma 865f9a241d Merge remote-tracking branch 'origin/4.1.x' into 4.2.x 2025-03-24 19:31:36 +01:00
Olga Maciaszek-Sharma 663ca402ab Use applicationTaskExecutor. Fixes gh-4424.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-03-24 19:28:09 +01:00
spring-builds 607d64dc9f Bumping versions 2025-03-20 03:10:42 +00:00
spring-builds d7206cf4df Bumping versions 2025-03-19 03:11:29 +00:00
spring-builds 61eae7a80b Bumping dependency versions after release 2025-03-18 23:12:39 +00:00
spring-builds 84028545be Bumping versions to 4.2.2-SNAPSHOT after release 2025-03-18 23:11:53 +00:00
spring-builds 0c2ca975c3 Going back to snapshots 2025-03-18 23:11:52 +00:00
spring-builds ed0014775f Update SNAPSHOT to 4.2.1 2025-03-18 23:11:01 +00:00
Olga Maciaszek-Sharma 9ee70c8cbb Merge remote-tracking branch 'origin/4.2.x' 2025-03-18 15:00:06 +01:00
Olga Maciaszek-Sharma 424e1bc856 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x 2025-03-18 14:55:11 +01:00
Olga Maciaszek-Sharma bfbd6d15c7 Move Jersey Client Configuration for Eureka Server to a separate AutoConfiguration class. Fixes gh-4407.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-03-18 14:54:47 +01:00
dependabot[bot] ff8e31177b Bump testcontainers.version from 1.20.5 to 1.20.6 (#4419)
Bumps `testcontainers.version` from 1.20.5 to 1.20.6.

Updates `org.testcontainers:mockserver` from 1.20.5 to 1.20.6
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.5...1.20.6)

Updates `org.testcontainers:junit-jupiter` from 1.20.5 to 1.20.6
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.5...1.20.6)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-18 14:53:25 +01:00
spencergibb c3e8e08f67 Merge branch '4.2.x' 2025-03-14 15:11:25 -04:00
spencergibb 229d7f3ba6 Sets the request factory directly.
This avoids the reflective factory which we don't need or want since we know it ahead of time.

Fixes gh-4423
2025-03-14 15:10:52 -04:00
Olga Maciaszek-Sharma acf7485073 Merge remote-tracking branch 'origin/4.2.x' 2025-03-13 12:52:56 +01:00
Olga Maciaszek-Sharma f454487a27 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x 2025-03-13 12:43:59 +01:00
Olga Maciaszek-Sharma 04d15556ec Restore dependency duplicate verification.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-03-13 12:42:33 +01:00
Olga Maciaszek-Sharma 075d520088 Merge remote-tracking branch 'origin/4.2.x'
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	pom.xml
2025-03-13 11:39:02 +01:00
Olga Maciaszek-Sharma aa8ae9936a Merge remote-tracking branch 'origin/4.1.x' into 4.2.x
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	pom.xml
2025-03-13 11:36:54 +01:00
dependabot[bot] f36a3de904 Bump testcontainers.version from 1.20.5 to 1.20.6 (#4420)
Bumps `testcontainers.version` from 1.20.5 to 1.20.6.

Updates `org.testcontainers:mockserver` from 1.20.5 to 1.20.6
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.5...1.20.6)

Updates `org.testcontainers:junit-jupiter` from 1.20.5 to 1.20.6
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.5...1.20.6)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 11:35:18 +01:00
Olga Maciaszek-Sharma f70fef1d10 Merge remote-tracking branch 'origin/4.2.x'
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	pom.xml
2025-03-04 17:43:25 +01:00
Olga Maciaszek-Sharma 2195956aca Merge remote-tracking branch 'origin/4.1.x' into 4.2.x
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	pom.xml
2025-03-04 17:41:24 +01:00
dependabot[bot] 7e8bb2817f Bump testcontainers.version from 1.20.4 to 1.20.5 (#4410)
Bumps `testcontainers.version` from 1.20.4 to 1.20.5.

Updates `org.testcontainers:mockserver` from 1.20.4 to 1.20.5
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.4...1.20.5)

Updates `org.testcontainers:junit-jupiter` from 1.20.4 to 1.20.5
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.4...1.20.5)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 17:38:45 +01:00
Olga Maciaszek-Sharma aa3b1ef5d7 Temporarily disable flaky tests.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-03-04 17:29:21 +01:00
Olga Maciaszek-Sharma c6fcfab533 Temporarily disable flaky tests.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-03-04 17:29:07 +01:00
dependabot[bot] a786a1416d Bump @springio/antora-extensions from 1.14.2 to 1.14.4 in /docs (#4416)
Bumps [@springio/antora-extensions](https://github.com/spring-io/antora-extensions) from 1.14.2 to 1.14.4.
- [Changelog](https://github.com/spring-io/antora-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/antora-extensions/compare/v1.14.2...v1.14.4)

---
updated-dependencies:
- dependency-name: "@springio/antora-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 17:05:18 +01:00
spring-builds 52e515aa1a Going back to snapshots 2025-02-27 19:38:36 +00:00
spring-builds 99a790b8f5 Update SNAPSHOT to 4.3.0-M2 2025-02-27 19:38:01 +00:00
Olga Maciaszek-Sharma 0d4ddc660f Merge remote-tracking branch 'origin/4.2.x' 2025-02-10 15:55:13 +01:00
Olga Maciaszek-Sharma f224863613 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x 2025-02-10 15:54:21 +01:00
Olga Maciaszek-Sharma 25c3f2034d Merge remote-tracking branch 'origin/4.2.x' 2025-02-10 15:53:42 +01:00
dependabot[bot] 4a58b44047 Bump @springio/asciidoctor-extensions in /docs (#4402)
Bumps [@springio/asciidoctor-extensions](https://github.com/spring-io/asciidoctor-extensions) from 1.0.0-alpha.14 to 1.0.0-alpha.16.
- [Changelog](https://github.com/spring-io/asciidoctor-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/asciidoctor-extensions/compare/v1.0.0-alpha.14...v1.0.0-alpha.16)

---
updated-dependencies:
- dependency-name: "@springio/asciidoctor-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 15:25:29 +01:00
Olga Maciaszek-Sharma 732ca5391d Update dependabot settings.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-02-10 15:07:51 +01:00
Olga Maciaszek-Sharma 7f122b921d Temporarily disable flaky tests.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-02-07 15:41:24 +01:00
Olga Maciaszek-Sharma 5dcb1b2e39 Temporarily disable flaky tests.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-02-07 15:40:52 +01:00
Olga Maciaszek-Sharma e4fe94e110 Temporarily disable flaky tests.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-02-07 15:38:40 +01:00
spring-builds 17edab9772 Going back to snapshots 2025-01-30 11:15:51 +00:00
spring-builds 34a9514c69 Update SNAPSHOT to 4.3.0-M1 2025-01-30 11:15:15 +00:00
Olga Maciaszek-Sharma 83e607a606 Temporarily disable flaky tests.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-01-30 12:01:50 +01:00
spring-builds 8a222b2fce Bumping versions 2025-01-26 03:15:00 +00:00
spring-builds d3716a8468 Bumping versions 2025-01-26 00:22:46 +00:00
spring-builds 84db565274 Bumping versions 2025-01-19 00:21:15 +00:00
Olga Maciaszek-Sharma 571157c264 Try fixing flaky test.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-01-16 16:55:54 +01:00
Olga Maciaszek-Sharma c28559883d Merge remote-tracking branch 'origin/4.2.x' 2025-01-16 16:50:56 +01:00
Olga Maciaszek-Sharma b1c47e4153 Merge remote-tracking branch 'origin/4.1.x' into 4.2.x
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>

# Conflicts:
#	docs/pom.xml
#	pom.xml
#	spring-cloud-netflix-dependencies/pom.xml
#	spring-cloud-netflix-eureka-client-tls-tests/pom.xml
#	spring-cloud-netflix-eureka-client/pom.xml
#	spring-cloud-netflix-eureka-server/pom.xml
#	spring-cloud-starter-netflix-eureka-client/pom.xml
#	spring-cloud-starter-netflix-eureka-server/pom.xml
2025-01-16 16:49:48 +01:00
Olga Maciaszek-Sharma b5863abc3d Add DCO.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-01-16 16:46:53 +01:00
Olga Maciaszek-Sharma ce03197608 Change versions to 4.3.0-SNAPSHOT.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-01-16 16:43:45 +01:00
Olga Maciaszek-Sharma d1eb0292ea Allow customising HC5 RequestConfig in EurekaClientHttpRequestFactorySupplier (#4394) 2025-01-16 15:37:46 +01:00
Olga Maciaszek-Sharma bd38ceb02e Try fixing flaky test.
Signed-off-by: Olga Maciaszek-Sharma <olga.maciaszek-sharma@broadcom.com>
2025-01-16 14:54:20 +01:00
spring-builds e2a6509bf6 Bumping versions 2025-01-14 12:00:31 +00:00
spring-builds 0399522052 Bumping dependency versions after release 2025-01-10 00:20:17 +00:00
spring-builds d7b86db464 Bumping versions to 4.1.6-SNAPSHOT after release 2025-01-10 00:19:23 +00:00
spring-builds 5c6a64a043 Going back to snapshots 2025-01-10 00:19:22 +00:00
spring-builds 0ddb014bc9 Update SNAPSHOT to 4.1.5 2025-01-10 00:18:39 +00:00
Ryan Baxter 21cac3fa40 Merge branch '4.1.x' 2024-12-17 10:38:28 -05:00
Ryan Baxter c9cff6faf0 Add the ability to disable configuration properties in docs pom 2024-12-17 10:33:08 -05:00
spring-builds 96be7ab777 Bumping versions 2024-12-12 11:56:03 +00:00
spring-builds 623500f6d5 Bumping versions 2024-12-12 05:33:54 +00:00
Olga Maciaszek-Sharma 609b85e6ab Merge remote-tracking branch 'origin/4.1.x'
# Conflicts:
#	docs/pom.xml
#	pom.xml
#	spring-cloud-netflix-dependencies/pom.xml
#	spring-cloud-netflix-eureka-client-tls-tests/pom.xml
#	spring-cloud-netflix-eureka-client/pom.xml
#	spring-cloud-netflix-eureka-server/pom.xml
#	spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaInstanceMonitorTests.java
#	spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaInstanceMonitorWithCustomTagsProviderTests.java
#	spring-cloud-starter-netflix-eureka-client/pom.xml
#	spring-cloud-starter-netflix-eureka-server/pom.xml
2024-12-11 14:22:56 +01:00
Olga Maciaszek-Sharma 883ec871ab Adjust awaitility config. 2024-12-11 14:19:27 +01:00
Olga Maciaszek-Sharma 3861aeda64 Merge remote-tracking branch 'origin/main' 2024-12-11 14:15:56 +01:00
Olga Maciaszek-Sharma ba8b74c7f6 Adjust awaitility config. 2024-12-11 14:15:44 +01:00
dependabot[bot] 76e6104b4b Bump @antora/collector-extension from 1.0.0-beta.5 to 1.0.1 in /docs (#4385)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 14:04:31 +01:00
dependabot[bot] 806dc0b809 Bump @antora/collector-extension from 1.0.0-rc.1 to 1.0.1 in /docs (#4383)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 13:23:43 +01:00
dependabot[bot] 00fa8e0f52 Bump antora from 3.2.0-alpha.6 to 3.2.0-alpha.8 in /docs (#4388)
Bumps [antora](https://gitlab.com/antora/antora) from 3.2.0-alpha.6 to 3.2.0-alpha.8.
- [Changelog](https://gitlab.com/antora/antora/blob/main/CHANGELOG.adoc)
- [Commits](https://gitlab.com/antora/antora/compare/v3.2.0-alpha.6...v3.2.0-alpha.8)

---
updated-dependencies:
- dependency-name: antora
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 13:23:20 +01:00
dependabot[bot] f8e7c12328 Bump antora from 3.2.0-alpha.6 to 3.2.0-alpha.8 in /docs (#4390)
Bumps [antora](https://gitlab.com/antora/antora) from 3.2.0-alpha.6 to 3.2.0-alpha.8.
- [Changelog](https://gitlab.com/antora/antora/blob/main/CHANGELOG.adoc)
- [Commits](https://gitlab.com/antora/antora/compare/v3.2.0-alpha.6...v3.2.0-alpha.8)

---
updated-dependencies:
- dependency-name: antora
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 11:57:59 +01:00
spring-builds b06b50d055 Bumping versions 2024-12-06 16:13:28 +00:00
Olga Maciaszek-Sharma 18b0f85013 Change timeouts. 2024-12-06 16:59:47 +01:00
Olga Maciaszek-Sharma 0298ab0d86 Increase test timeout. 2024-12-06 12:47:41 +01:00
spring-builds 9113ddb5df Bumping dependency versions after release 2024-12-03 01:15:14 +00:00
spring-builds a3888075da Bumping versions to 4.2.1-SNAPSHOT after release 2024-12-03 01:14:27 +00:00
spring-builds da56d7d5e6 Going back to snapshots 2024-12-03 01:14:26 +00:00
spring-builds 235850c105 Update SNAPSHOT to 4.2.0 2024-12-03 01:13:44 +00:00
Ryan Baxter 2e8c116f7c Disable docs dependencies for 2024.0.0 release 2024-12-02 15:14:57 -05:00
Olga Maciaszek-Sharma 8e04fc5f11 Revert making RestClient the default Eureka client. Fixes gh-4380. 2024-12-02 16:49:58 +01:00
dependabot[bot] 9c5b39eeee Bump @antora/collector-extension in /docs (#4378)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-29 16:33:44 +01:00
Olga Maciaszek-Sharma e4ab5faafd Revert "Update pom.xml"
This reverts commit 1dd38faa4a.
2024-11-27 18:01:22 +01:00
Olga Maciaszek-Sharma 5af3121835 Merge remote-tracking branch 'origin/4.1.x' into 4.1.x 2024-11-27 18:01:01 +01:00
spring-builds 950553d9a1 Going back to snapshots 2024-11-27 01:44:48 +00:00
spring-builds 6267dfc577 Update SNAPSHOT to 4.1.4 2024-11-27 01:44:00 +00:00
spring-builds fe44b40dc4 Bumping dependency versions after release 2024-11-26 16:43:23 +00:00
spring-builds d005cab913 Bumping versions to 4.1.5-SNAPSHOT after release 2024-11-26 16:42:34 +00:00
spring-builds 9cf585c119 Going back to snapshots 2024-11-26 16:42:33 +00:00
spring-builds 6f38cfe510 Update SNAPSHOT to 4.1.4 2024-11-26 16:41:50 +00:00
Oleg Zhurakousky 1dd38faa4a Update pom.xml 2024-11-26 17:07:48 +01:00
spring-builds 4236eb2af3 Bumping versions 2024-11-25 16:10:35 +00:00
Olga Maciaszek-Sharma 96c7ec7072 Increase timeout. 2024-11-25 16:59:21 +01:00
Olga Maciaszek-Sharma b9740eb452 Fix test. 2024-11-25 16:19:32 +01:00
Olga Maciaszek-Sharma a96375bd12 Remove comment. 2024-11-25 14:46:25 +01:00
Olga Maciaszek-Sharma 6f35b0e9f5 Aggregate instance info with Executor. Fixes gh-4374. 2024-11-25 14:41:10 +01:00
Olga Maciaszek-Sharma c25dc8fd77 Temporarily disable test. 2024-11-25 13:38:21 +01:00
Olga Maciaszek-Sharma 3c093dcc04 Change timeouts in flaky tests. 2024-11-25 12:47:34 +01:00
Olga Maciaszek-Sharma bc0041cfc1 Format. 2024-11-22 15:00:18 +01:00
Olga Maciaszek-Sharma 69fd3cee20 Merge remote-tracking branch 'origin/4.1.x'
# Conflicts:
#	pom.xml
2024-11-22 14:59:32 +01:00
Olga Maciaszek-Sharma 011d181586 Use task executor for Euereka Server metrics. (#4376) 2024-11-22 14:58:05 +01:00
dependabot[bot] 5d213f7928 Bump testcontainers.version from 1.20.3 to 1.20.4 (#4373)
Bumps `testcontainers.version` from 1.20.3 to 1.20.4.

Updates `org.testcontainers:mockserver` from 1.20.3 to 1.20.4
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.3...1.20.4)

Updates `org.testcontainers:junit-jupiter` from 1.20.3 to 1.20.4
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.3...1.20.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-21 15:52:18 +01:00
Olga Maciaszek-Sharma b53540ef47 Remove eureka-core dependency from spring-cloud-starter-netflix-eureka-client. Fixes gh-4349. 2024-11-21 11:41:52 +01:00
Olga Maciaszek-Sharma bfa9ed73f0 Merge remote-tracking branch 'origin/main' 2024-11-20 13:53:44 +01:00
spring-builds eac21f837e Bumping versions 2024-11-20 05:35:38 +00:00
Olga Maciaszek-Sharma bea9f54310 Merge remote-tracking branch 'origin/main' 2024-11-19 15:32:58 +01:00
Emmanuel Ferdman 31cb7c19bc Update code of conduct reference (#4372)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-11-19 15:29:47 +01:00
dependabot[bot] 8e541f408a Bump codecov/codecov-action from 4 to 5 (#4366)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 14:32:45 +01:00
dependabot[bot] 4596c56e6e Bump codecov/codecov-action from 4 to 5 (#4367)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 14:32:29 +01:00
dependabot[bot] 30635842c3 Bump @antora/collector-extension in /docs (#4369)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 14:31:11 +01:00
dependabot[bot] 9e3007abbf Bump @antora/collector-extension in /docs (#4370)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 14:30:31 +01:00
spring-builds 9fe5230af5 Bumping versions 2024-11-08 05:40:14 +00:00
spring-builds 3eb9d1b17d Going back to snapshots 2024-11-08 02:29:12 +00:00
spring-builds 6c146ffb50 Update SNAPSHOT to 4.2.0-RC1 2024-11-08 02:28:36 +00:00
Olga Maciaszek-Sharma 87ec1d75cb Set up RestClient-based TransportClientFactories (#4363) 2024-11-07 16:20:45 +01:00
Olga Maciaszek-Sharma d749d4ad08 Merge remote-tracking branch 'origin/4.1.x' 2024-11-06 21:31:28 +01:00
dependabot[bot] 887d767509 Bump @antora/collector-extension in /docs (#4360)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 21:29:11 +01:00
dependabot[bot] 006fb6972c Bump @antora/collector-extension in /docs (#4362)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 21:28:44 +01:00
dependabot[bot] 07fa29965a Bump eureka.version from 2.0.3 to 2.0.4 (#4359)
Bumps `eureka.version` from 2.0.3 to 2.0.4.

Updates `com.netflix.eureka:eureka-client` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

Updates `com.netflix.eureka:eureka-core` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

Updates `com.netflix.eureka:eureka-core-jersey3` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

Updates `com.netflix.eureka:eureka-client-jersey3` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: com.netflix.eureka:eureka-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core-jersey3
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-client-jersey3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 21:28:22 +01:00
spring-builds d47f3ddd87 Bumping versions 2024-11-05 05:34:08 +00:00
Olga Maciaszek-Sharma f27b48b123 Merge remote-tracking branch 'origin/4.1.x'
# Conflicts:
#	pom.xml
2024-11-04 14:48:44 +01:00
dependabot[bot] e02d8d3b31 Bump eureka.version from 2.0.3 to 2.0.4 (#4358)
Bumps `eureka.version` from 2.0.3 to 2.0.4.

Updates `com.netflix.eureka:eureka-client` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

Updates `com.netflix.eureka:eureka-core` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

Updates `com.netflix.eureka:eureka-core-jersey3` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

Updates `com.netflix.eureka:eureka-client-jersey3` from 2.0.3 to 2.0.4
- [Release notes](https://github.com/Netflix/eureka/releases)
- [Commits](https://github.com/Netflix/eureka/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: com.netflix.eureka:eureka-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-core-jersey3
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.netflix.eureka:eureka-client-jersey3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 14:47:09 +01:00
Olga Maciaszek-Sharma d35cdfdaa7 Fix condition naming. 2024-11-04 13:07:08 +01:00
WonChul Heo c2c53522fa Support Spring RestClient as default TransportClientFactory (#4281) 2024-11-04 13:05:21 +01:00
dependabot[bot] 6b68d64013 Bump testcontainers.version from 1.20.2 to 1.20.3 (#4354)
Bumps `testcontainers.version` from 1.20.2 to 1.20.3.

Updates `org.testcontainers:mockserver` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.2...1.20.3)

Updates `org.testcontainers:junit-jupiter` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.2...1.20.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 13:28:07 +01:00
dependabot[bot] 3c13133920 Bump testcontainers.version from 1.20.2 to 1.20.3 (#4355)
Bumps `testcontainers.version` from 1.20.2 to 1.20.3.

Updates `org.testcontainers:mockserver` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.2...1.20.3)

Updates `org.testcontainers:junit-jupiter` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.2...1.20.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 13:27:37 +01:00
Olga Maciaszek-Sharma bd26dd6e04 Merge remote-tracking branch 'origin/4.1.x' 2024-10-17 15:48:30 +02:00
Olga Maciaszek-Sharma b1a0375ce4 Adjust to blocking lower/uper-casing without locale. 2024-10-17 15:47:26 +02:00
dependabot[bot] da9cb76fcc Bump @antora/collector-extension in /docs (#4351)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 13:41:34 +02:00
dependabot[bot] 2e34849c27 Bump @antora/collector-extension in /docs (#4353)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 13:40:58 +02:00
Olga Maciaszek-Sharma 0d3a80565a Update deprecations. 2024-10-11 15:24:31 +02:00
buildmaster f4b445bdaf Bumping versions 2024-10-10 12:00:08 +00:00
buildmaster 3094422465 Bumping versions 2024-10-10 05:39:57 +00:00
dependabot[bot] a158c6a2f0 Bump testcontainers.version from 1.20.1 to 1.20.2 (#4346)
Bumps `testcontainers.version` from 1.20.1 to 1.20.2.

Updates `org.testcontainers:mockserver` from 1.20.1 to 1.20.2
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.1...1.20.2)

Updates `org.testcontainers:junit-jupiter` from 1.20.1 to 1.20.2
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.1...1.20.2)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-09 18:21:58 +02:00
Olga Maciaszek-Sharma 44e22ad180 Merge remote-tracking branch 'origin/4.1.x' 2024-10-09 18:12:04 +02:00
Olga Maciaszek-Sharma 803abe6e6f Merge remote-tracking branch 'origin/4.1.x' into 4.1.x 2024-10-09 18:11:43 +02:00
Olga Maciaszek-Sharma 7a7bb2f5c2 Fix tls tests (#4348) 2024-10-09 18:11:24 +02:00
buildmaster f87cab1d49 Going back to snapshots 2024-10-08 01:56:15 +00:00
buildmaster fede5baf3d Update SNAPSHOT to 4.2.0-M2 2024-10-08 01:55:37 +00:00
Olga Maciaszek-Sharma fb7abbdead Fix test setup. 2024-10-04 17:27:30 +02:00
Olga Maciaszek-Sharma 572b10a5bd Fix typo. 2024-10-04 17:16:12 +02:00
Olga Maciaszek-Sharma c0ae5ecf62 Reformat. 2024-10-02 18:47:57 +02:00
Olga Maciaszek-Sharma 23e37078f1 Merge remote-tracking branch 'origin/4.1.x' 2024-10-02 18:44:14 +02:00
Olga Maciaszek-Sharma 32eec04ef9 Document lack of support for random port with AOT and native. Fixes gh-4235. 2024-10-02 18:43:15 +02:00
Olga Maciaszek-Sharma 0554bd4296 Merge remote-tracking branch 'origin/4.1.x' 2024-10-02 18:24:47 +02:00
Olga Maciaszek-Sharma dd5793bed1 Document eureka.client.jersey.enabled property. Fixes gh-4342. 2024-10-02 18:23:29 +02:00
Olga Maciaszek-Sharma df0dc78724 Merge remote-tracking branch 'origin/4.1.x'
# Conflicts:
#	pom.xml
2024-10-02 18:08:39 +02:00
dependabot[bot] 4516506416 Bump testcontainers.version from 1.20.1 to 1.20.2 (#4345)
Bumps `testcontainers.version` from 1.20.1 to 1.20.2.

Updates `org.testcontainers:mockserver` from 1.20.1 to 1.20.2
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.1...1.20.2)

Updates `org.testcontainers:junit-jupiter` from 1.20.1 to 1.20.2
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.1...1.20.2)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 18:07:08 +02:00
Olga Maciaszek-Sharma 78f00d963d Add hints for DiscoveryClient. Fixes gh-4339. 2024-10-02 18:05:27 +02:00
Olga Maciaszek-Sharma 5164695512 Refactor EurekaClientHints. 2024-10-02 18:03:54 +02:00
Olga Maciaszek-Sharma 23e88bf6d0 Merge remote-tracking branch 'origin/4.1.x'. Regenerate docs.
# Conflicts:
#	docs/modules/ROOT/partials/_configprops.adoc
#	pom.xml
2024-10-02 17:11:06 +02:00
Olga Maciaszek-Sharma 361b16ce4f Regenerate docs. 2024-10-02 17:03:39 +02:00
Plastic Hat 1de1e2a76e Fix incorrect default values in docs (#4294) (#4344) 2024-10-02 13:55:11 +02:00
dependabot[bot] e9de82cec5 Bump testcontainers.version from 1.20.0 to 1.20.1 (#4340)
Bumps `testcontainers.version` from 1.20.0 to 1.20.1.

Updates `org.testcontainers:mockserver` from 1.20.0 to 1.20.1
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.0...1.20.1)

Updates `org.testcontainers:junit-jupiter` from 1.20.0 to 1.20.1
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.0...1.20.1)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-27 12:47:05 +02:00
dependabot[bot] 57dd4f0674 Bump @springio/asciidoctor-extensions in /docs (#4338)
Bumps [@springio/asciidoctor-extensions](https://github.com/spring-io/asciidoctor-extensions) from 1.0.0-alpha.13 to 1.0.0-alpha.14.
- [Changelog](https://github.com/spring-io/asciidoctor-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/asciidoctor-extensions/compare/v1.0.0-alpha.13...v1.0.0-alpha.14)

---
updated-dependencies:
- dependency-name: "@springio/asciidoctor-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 19:20:56 +02:00
dependabot[bot] 9a17332f88 Bump @springio/asciidoctor-extensions in /docs (#4337)
Bumps [@springio/asciidoctor-extensions](https://github.com/spring-io/asciidoctor-extensions) from 1.0.0-alpha.13 to 1.0.0-alpha.14.
- [Changelog](https://github.com/spring-io/asciidoctor-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/asciidoctor-extensions/compare/v1.0.0-alpha.13...v1.0.0-alpha.14)

---
updated-dependencies:
- dependency-name: "@springio/asciidoctor-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 19:20:37 +02:00
dependabot[bot] 7fc754b952 Bump testcontainers.version from 1.19.8 to 1.20.0 (#4332)
Bumps `testcontainers.version` from 1.19.8 to 1.20.0.

Updates `org.testcontainers:mockserver` from 1.19.8 to 1.20.0
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.8...1.20.0)

Updates `org.testcontainers:junit-jupiter` from 1.19.8 to 1.20.0
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.8...1.20.0)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 19:19:48 +02:00
spencergibb 6fdbdf0ed7 Changes spring-security-rsa to spring-cloud-starter 2024-09-24 18:40:20 -04:00
Olga Maciaszek-Sharma 102b173302 Merge remote-tracking branch 'origin/4.1.x' 2024-09-06 16:20:29 +02:00
Olga Maciaszek-Sharma a0329a8b70 Update docs. Fixes gh-4302. 2024-09-06 16:20:14 +02:00
Olga Maciaszek-Sharma 7010dfbce3 Merge 4.1.x and resolve conflicts. 2024-09-06 15:49:08 +02:00
dependabot[bot] 690cb329fd Bump @antora/collector-extension in /docs (#4311)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 15:09:11 +02:00
dependabot[bot] b7f4e8ec4d Bump @springio/asciidoctor-extensions in /docs (#4309)
Bumps [@springio/asciidoctor-extensions](https://github.com/spring-io/asciidoctor-extensions) from 1.0.0-alpha.10 to 1.0.0-alpha.13.
- [Changelog](https://github.com/spring-io/asciidoctor-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/asciidoctor-extensions/compare/v1.0.0-alpha.10...v1.0.0-alpha.13)

---
updated-dependencies:
- dependency-name: "@springio/asciidoctor-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 15:07:50 +02:00
dependabot[bot] c8aa498382 Bump antora from 3.2.0-alpha.4 to 3.2.0-alpha.6 in /docs (#4314)
Bumps [antora](https://gitlab.com/antora/antora) from 3.2.0-alpha.4 to 3.2.0-alpha.6.
- [Changelog](https://gitlab.com/antora/antora/blob/main/CHANGELOG.adoc)
- [Commits](https://gitlab.com/antora/antora/compare/v3.2.0-alpha.4...v3.2.0-alpha.6)

---
updated-dependencies:
- dependency-name: antora
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 15:07:12 +02:00
dependabot[bot] b333f05733 Bump @springio/antora-extensions from 1.11.1 to 1.14.2 in /docs (#4316)
Bumps [@springio/antora-extensions](https://github.com/spring-io/antora-extensions) from 1.11.1 to 1.14.2.
- [Changelog](https://github.com/spring-io/antora-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/antora-extensions/compare/v1.11.1...v1.14.2)

---
updated-dependencies:
- dependency-name: "@springio/antora-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 15:05:50 +02:00
dependabot[bot] 06342adca3 Bump antora from 3.2.0-alpha.4 to 3.2.0-alpha.6 in /docs (#4317)
Bumps [antora](https://gitlab.com/antora/antora) from 3.2.0-alpha.4 to 3.2.0-alpha.6.
- [Changelog](https://gitlab.com/antora/antora/blob/main/CHANGELOG.adoc)
- [Commits](https://gitlab.com/antora/antora/compare/v3.2.0-alpha.4...v3.2.0-alpha.6)

---
updated-dependencies:
- dependency-name: antora
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 13:37:29 +02:00
dependabot[bot] 71daf977a0 Bump @springio/asciidoctor-extensions in /docs (#4319)
Bumps [@springio/asciidoctor-extensions](https://github.com/spring-io/asciidoctor-extensions) from 1.0.0-alpha.10 to 1.0.0-alpha.13.
- [Changelog](https://github.com/spring-io/asciidoctor-extensions/blob/main/CHANGELOG.adoc)
- [Commits](https://github.com/spring-io/asciidoctor-extensions/compare/v1.0.0-alpha.10...v1.0.0-alpha.13)

---
updated-dependencies:
- dependency-name: "@springio/asciidoctor-extensions"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 13:36:07 +02:00
dependabot[bot] 2dc3199a0b Bump @antora/collector-extension in /docs (#4320)
---
updated-dependencies:
- dependency-name: "@antora/collector-extension"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 13:35:36 +02:00
Olga Maciaszek-Sharma a6adfb6b28 Add npm checks to dependabot. 2024-09-04 17:53:34 +02:00
dependabot[bot] 523b48a3b0 Bump testcontainers.version from 1.19.8 to 1.20.1 (#4297)
Bumps `testcontainers.version` from 1.19.8 to 1.20.1.

Updates `org.testcontainers:mockserver` from 1.19.8 to 1.20.1
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.8...1.20.1)

Updates `org.testcontainers:junit-jupiter` from 1.19.8 to 1.20.1
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.8...1.20.1)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 15:23:24 +02:00
Olga Maciaszek-Sharma 1c4294eab6 Update dependabot. 2024-09-04 12:03:16 +02:00
Olga Maciaszek-Sharma 5d2d6b1002 Update GH actions. 2024-09-04 12:02:02 +02:00
buildmaster 7e4a21cc5f Bumping versions 2024-08-24 05:30:16 +00:00
buildmaster 4da4de6fb6 Going back to snapshots 2024-08-19 19:05:29 +00:00
buildmaster 0b73c2bebb Update SNAPSHOT to 4.2.0-M1 2024-08-19 19:04:48 +00:00
buildmaster 52cad75402 Bumping versions 2024-08-07 15:05:12 +00:00
buildmaster d82fd9f83d Bumping versions 2024-07-23 11:19:48 +00:00
_NewAge 49569431bc Encode url path segments & query parameters (#4291) 2024-07-16 11:34:13 +02:00
buildmaster 9f757481b1 Bumping versions to 4.1.4-SNAPSHOT after release 2024-07-10 16:55:56 +00:00
buildmaster a3840dbd43 Going back to snapshots 2024-07-10 16:55:56 +00:00
buildmaster 91ef8110c9 Update SNAPSHOT to 4.1.3 2024-07-10 16:55:08 +00:00
Olga Maciaszek-Sharma b23c587319 Allow disabling the under the hood use of JerseyClient with Eureka Client. Fixes gh-4185. 2024-07-08 16:34:19 +02:00
dependabot[bot] aa0670b1ee Bump org.glassfish.hk2:spring-bridge from 3.1.0 to 3.1.1 (#4289)
Bumps [org.glassfish.hk2:spring-bridge](https://github.com/eclipse-ee4j/glassfish-hk2) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/eclipse-ee4j/glassfish-hk2/releases)
- [Changelog](https://github.com/eclipse-ee4j/glassfish-hk2/blob/master/CHANGELOG)
- [Commits](https://github.com/eclipse-ee4j/glassfish-hk2/commits)

---
updated-dependencies:
- dependency-name: org.glassfish.hk2:spring-bridge
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-04 12:53:27 +02:00
Olga Maciaszek-Sharma 702c10d4f1 Upgrade Eureka to 2.0.3. 2024-07-02 17:21:39 +02:00
Olga Maciaszek-Sharma b43fa21fd8 Handle TLS settings for Eureka Server's JerseyClient. (#4285) 2024-07-02 14:55:22 +02:00
Kaiyao Ke f47e93c4f3 Fixed non-idempotent test ConfigRefreshTests.verifyGetApplications (#4279) 2024-06-27 13:05:23 +02:00
dependabot[bot] bf6dafed7d Bump testcontainers.version from 1.19.7 to 1.19.8 (#4282)
Bumps `testcontainers.version` from 1.19.7 to 1.19.8.

Updates `org.testcontainers:mockserver` from 1.19.7 to 1.19.8
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.7...1.19.8)

Updates `org.testcontainers:junit-jupiter` from 1.19.7 to 1.19.8
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.7...1.19.8)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 16:57:28 +02:00
Ryan Baxter 1e2f6eedef Upgrading antora 2024-06-24 10:06:04 -04:00
buildmaster 24716c69c9 Bumping versions to 4.1.3-SNAPSHOT after release 2024-05-30 11:24:21 +00:00
buildmaster 5597c57577 Going back to snapshots 2024-05-30 11:24:20 +00:00
buildmaster aa45392a9a Update SNAPSHOT to 4.1.2 2024-05-30 11:22:59 +00:00
Olga Maciaszek-Sharma 307b93bf5a Upgrade antora-ui-spring to 0.4.13. 2024-05-16 12:01:12 +02:00
buildmaster f21d0046cd Bumping versions 2024-04-25 11:05:03 +00:00
WonChul Heo de6d506e9a Collect metrics for application instances (#4270) 2024-04-25 11:57:45 +02:00
buildmaster 2a8b7ed054 Bumping versions 2024-04-16 11:04:41 +00:00
Olga MaciaszekSharma 79a2eb8c4f Revert "Enable Connection Evictor in HttpClient (#4103)"
This reverts commit c071e6b01c.
2024-04-15 14:00:54 +02:00
WonChul Heo dbb36fb0ed Change the order in which events are issued (#4274) 2024-04-09 17:59:10 +02:00
Ryan Baxter f8ed5c4163 Update antora-playbook.yml 2024-04-04 14:30:51 -04:00
Puppy4C 47d3f7133c Improve EurekaConfigServerInstanceProvider (#4267) 2024-04-03 13:12:14 +02:00
ZIRAKrezovic a74d8f966e Fix basic auth with encoded characters (#3815) (#4260) 2024-04-03 12:38:07 +02:00
ZIRAKrezovic 5113f0abf3 Add support for configuring RestTemplate via RestTemplateBuilder (#4255) (#4272) 2024-04-02 15:28:23 +02:00
buildmaster 99b8d2c6d4 Bumping versions to 4.1.2-SNAPSHOT after release 2024-03-27 13:56:59 +00:00
buildmaster 3ef81ba9cd Going back to snapshots 2024-03-27 13:56:58 +00:00
buildmaster c7885631ed Update SNAPSHOT to 4.1.1 2024-03-27 13:55:43 +00:00
buildmaster bb15b7f40e Bumping versions 2024-03-27 11:05:01 +00:00
Olga MaciaszekSharma c97bd250af Revert "Add support for configuring RestTemplate via RestTemplateBuilder (#4255) (#4262)"
This reverts commit 6b6173de3a.
2024-03-26 19:21:46 +01:00
Olga MaciaszekSharma 4b101efe19 Revert "Update javadocs and license comments for recent changes."
This reverts commit 61d5f5f9fb.
2024-03-26 19:20:44 +01:00
Olga MaciaszekSharma 61d5f5f9fb Update javadocs and license comments for recent changes. 2024-03-26 18:45:31 +01:00
ZIRAKrezovic 6b6173de3a Add support for configuring RestTemplate via RestTemplateBuilder (#4255) (#4262) 2024-03-26 18:42:50 +01:00
ZIRAKrezovic 4536954aca Clean up eureka-client deprecations (#4261) 2024-03-26 17:06:55 +01:00
dependabot[bot] 817ea2c88a Bump testcontainers.version from 1.19.6 to 1.19.7 (#4271) 2024-03-26 15:30:22 +01:00
ZIRAKrezovic 1754585fc0 Enable Connection Evictor in HttpClient (#4103) (#4258) 2024-03-26 15:29:18 +01:00
dependabot[bot] 0bebfd1e3d Bump testcontainers.version from 1.19.4 to 1.19.6 (#4264) 2024-03-25 16:41:34 +01:00
dependabot[bot] a0c95db99e Bump org.glassfish.hk2:spring-bridge from 3.0.6 to 3.1.0 (#4265) 2024-03-25 16:40:43 +01:00
Olga MaciaszekSharma ad002b4da2 Upgrade antora-ui-spring to 0.4.11. 2024-03-07 17:47:04 +01:00
buildmaster fb088832db Bumping versions 2024-03-05 11:04:58 +00:00
buildmaster 3d30846108 Bumping versions 2024-02-23 11:05:23 +00:00
RobertBleyl 3c84f2ec04 Introduce asyncClientInitialization property. (#4239) 2024-02-22 12:48:52 +01:00
Olga MaciaszekSharma 479f10e379 Merge remote-tracking branch 'origin/main' 2024-02-15 18:40:55 +01:00
Olga MaciaszekSharma 1bc989c5ce Remove unnecessary dependency. 2024-02-15 18:40:45 +01:00
dependabot[bot] cf81e327ad Bump testcontainers.version from 1.19.3 to 1.19.4 (#4243)
Bumps `testcontainers.version` from 1.19.3 to 1.19.4.

Updates `org.testcontainers:mockserver` from 1.19.3 to 1.19.4
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.3...1.19.4)

Updates `org.testcontainers:junit-jupiter` from 1.19.3 to 1.19.4
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.3...1.19.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:mockserver
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-14 18:22:43 +01:00
dependabot[bot] 35ef348fe9 Bump org.glassfish.hk2:spring-bridge from 3.0.5 to 3.0.6 (#4245)
Bumps [org.glassfish.hk2:spring-bridge](https://github.com/eclipse-ee4j/glassfish-hk2) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/eclipse-ee4j/glassfish-hk2/releases)
- [Changelog](https://github.com/eclipse-ee4j/glassfish-hk2/blob/master/CHANGELOG)
- [Commits](https://github.com/eclipse-ee4j/glassfish-hk2/commits)

---
updated-dependencies:
- dependency-name: org.glassfish.hk2:spring-bridge
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-14 18:21:05 +01:00
dependabot[bot] 45ddfdfb7c Bump codecov/codecov-action from 3 to 4 (#4249)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-14 18:20:30 +01:00
Olga MaciaszekSharma 8ae4950200 Upgrade Eureka Server to 2.0.2. Upgrade glassfish spring-bridge to 3.0.6. Fixes gh-4238. 2024-02-14 12:32:53 +01:00
buildmaster d7275b888b Bumping versions 2024-01-31 11:04:43 +00:00
Olga Maciaszek-Sharma ed9ca444c8 Improve documentation on HTTP clients used by EurekaClient. (#4242) 2024-01-25 16:26:18 +01:00
Ryan Baxter 1c9cd5fb8c Merge branch '4.0.x' 2024-01-23 20:40:20 -05:00
Ryan BaxterandRyan Baxter ab8a02b9bf Remove function and use PropertyResolver (#4240)
This relates to https://github.com/spring-cloud/spring-cloud-config/pull/2375

And reverts part of #4175

Co-authored-by: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com>
2024-01-23 20:40:04 -05:00
Ryan BaxterandRyan Baxter 05eec78623 Remove function and use PropertyResolver (#4240)
This relates to https://github.com/spring-cloud/spring-cloud-config/pull/2375

And reverts part of #4175

Co-authored-by: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com>
2024-01-23 20:39:14 -05:00
Olga MaciaszekSharma 2b1e045a55 Publish InstancePreRegisteredEvent. Fixes gh-4237. 2024-01-23 18:38:28 +01:00
Olga MaciaszekSharma 1f97085dff Fix configprops inclusion pattern. Fixes gh-4218. 2024-01-22 18:52:32 +01:00
buildmaster f36102d985 Bumping versions to 4.1.1-SNAPSHOT after release 2023-12-06 15:56:58 +00:00
buildmaster a271879f1d Going back to snapshots 2023-12-06 15:56:58 +00:00
buildmaster 674d19cc79 Update SNAPSHOT to 4.1.0 2023-12-06 15:55:32 +00:00
Olga MaciaszekSharma 36d3e2bd88 Merge remote-tracking branch 'origin/4.0.x' 2023-12-04 18:02:06 +01:00
Olga MaciaszekSharma 12eed88057 Merge remote-tracking branch 'origin/3.1.x' into 4.0.x 2023-12-04 18:01:19 +01:00
dependabot[bot] 12554cbd60 Bump actions/setup-java from 3 to 4 (#4231) 2023-12-04 17:58:13 +01:00
dependabot[bot] ba5b05f9c5 Bump testcontainers.version from 1.19.1 to 1.19.3 (#4225) 2023-11-30 17:42:03 +01:00
buildmaster 1351202d94 Bumping versions 2023-11-14 11:04:10 +00:00
Olga MaciaszekSharma f2edf4b0aa Merge remote-tracking branch 'origin/4.0.x' 2023-11-13 14:18:59 +01:00
Olga MaciaszekSharma f7723e9818 Merge remote-tracking branch 'origin/3.1.x' into 4.0.x 2023-11-13 14:17:50 +01:00
Olga MaciaszekSharma 4112daa5f1 Adjust checkstyle settings. 2023-11-13 14:14:00 +01:00
dependabot[bot] 5c40f13f70 Bump org.mockito:mockito-core from 3.6.0 to 3.6.28 (#4206) 2023-11-13 14:08:05 +01:00
Olga MaciaszekSharma b99ca9d099 Exclude javax servlet-api from deps. 2023-11-13 13:27:23 +01:00
spencergibb 115e210212 Merge branch '4.0.x' 2023-11-10 11:53:24 -05:00
spencergibb c0c2d82368 Excludes jakarta.servlet-api
Fixes gh-4222
2023-11-10 11:53:04 -05:00
Olga MaciaszekSharma 04c35060aa Merge remote-tracking branch 'origin/4.0.x' 2023-11-10 15:43:58 +01:00
Olga Maciaszek-Sharma b7eafdaaeb Make AbstractDiscoveryClientOptionalArgs really optional. (#4221) 2023-11-10 15:43:29 +01:00
Olga MaciaszekSharma 3894f006b6 Merge remote-tracking branch 'origin/4.0.x' 2023-11-09 19:10:38 +01:00
Olga MaciaszekSharma e4696d1167 Switch GH actions Java version to Temurin. Remove unused field. 2023-11-03 14:40:25 +01:00
dependabot[bot] 9c5fd4b6f6 Bump org.glassfish.hk2:spring-bridge from 3.0.4 to 3.0.5 (#4216) 2023-11-03 14:21:55 +01:00
dependabot[bot] 515c38e18b Bump testcontainers.version from 1.19.0 to 1.19.1 (#4211) 2023-11-03 14:20:40 +01:00
buildmaster 32759b6070 Going back to snapshots 2023-10-31 14:10:58 +00:00
buildmaster f9de1f1a80 Update SNAPSHOT to 4.1.0-RC1 2023-10-31 14:09:43 +00:00
Olga MaciaszekSharma 522905b10c Fix typo. 2023-10-19 13:49:03 +02:00
buildmaster 6a0b7f02b2 Bumping versions 2023-10-13 11:04:26 +00:00
Olga MaciaszekSharma d50ec1c5d0 Fix typo. 2023-10-13 12:36:05 +02:00
Olga MaciaszekSharma ba1f38bd4f Add title to Intro site. 2023-09-28 14:01:15 +02:00
buildmaster f1ecf87454 Going back to snapshots 2023-09-27 11:28:14 +00:00
buildmaster 630151f4ac Update SNAPSHOT to 4.1.0-M2 2023-09-27 11:26:58 +00:00
Olga MaciaszekSharma 1422137333 Merge remote-tracking branch 'origin/4.0.x' 2023-09-26 16:36:49 +02:00
dependabot[bot] 04b36a51fd Bump org.bouncycastle:bcpkix-jdk15on from 1.68 to 1.70 (#4203) 2023-09-26 16:04:48 +02:00
dependabot[bot] 46199c3cbe Bump org.glassfish.hk2:spring-bridge from 3.0.3 to 3.0.4 (#4205) 2023-09-26 15:49:21 +02:00
dependabot[bot] 534323c1dc Bump testcontainers.version from 1.17.6 to 1.19.0 (#4200) 2023-09-26 15:46:26 +02:00
dependabot[bot] cc0e272563 Bump codecov/codecov-action from 1 to 3 (#4194) 2023-09-26 15:44:17 +02:00
dependabot[bot] 2ecfc7c099 Bump actions/setup-java from 2 to 3 (#4191) 2023-09-26 15:42:52 +02:00
dependabot[bot] ad0d5eb4dc Bump actions/checkout from 2 to 4 (#4190) 2023-09-26 15:42:19 +02:00
spencergibb 715ee973ca Adds antora extension and updates ui version 2023-09-22 15:53:08 -04:00
Olga MaciaszekSharma fecdb42b1e Fix page structure. 2023-09-22 16:59:13 +02:00
Olga MaciaszekSharma 89528befb1 Fix page structure. 2023-09-21 17:45:04 +02:00
Olga MaciaszekSharma c427097aaf Fix page structure. 2023-09-21 17:42:57 +02:00
Olga MaciaszekSharma 22ab50f2b8 Add dependabot.yml. 2023-09-21 17:21:47 +02:00
Olga MaciaszekSharma b8e796ec49 Merge remote-tracking branch 'origin/4.0.x'
# Conflicts:
#	.github/workflows/maven.yml
#	README.adoc
#	docs/pom.xml
#	docs/src/main/asciidoc/README.adoc
#	pom.xml
#	spring-cloud-netflix-dependencies/pom.xml
#	spring-cloud-netflix-eureka-client-tls-tests/pom.xml
#	spring-cloud-netflix-eureka-client/pom.xml
#	spring-cloud-netflix-eureka-server/pom.xml
#	spring-cloud-starter-netflix-eureka-client/pom.xml
#	spring-cloud-starter-netflix-eureka-server/pom.xml
2023-09-18 15:37:16 +02:00
Olga MaciaszekSharma c761c1039d Fix readme. 2023-09-18 14:56:27 +02:00
Olga MaciaszekSharma af0fa1c2ab Fix readme. 2023-09-18 14:30:02 +02:00
Olga MaciaszekSharma 78c37a4471 Fix readme. 2023-09-18 14:05:15 +02:00
Olga MaciaszekSharma fd458cf9da Fix readme. 2023-09-18 13:55:53 +02:00
Olga MaciaszekSharma 855e52247b Revert gitignore change. 2023-09-18 13:54:14 +02:00
Olga MaciaszekSharma 528eb9b7d9 Commit partial contents. 2023-09-18 13:53:41 +02:00
Olga MaciaszekSharma 23245b45f3 Build with GitHub Actions. 2023-09-18 13:49:59 +02:00
Olga Maciaszek-Sharma e3ae3925c5 Antora (#4189)
* Migrate Structure

* Insert explicit ids for headers

* Remove unnecessary asciidoc attributes

* Copy default antora files

* Fix indentation for all pages

* Generate a default navigation

* Remove includes

* Fix cross references

* Enable Section Summary TOC for small pages

* Switch docs to Antora.
2023-09-18 13:39:18 +02:00
Olga MaciaszekSharma 99295878f3 Upgrade maven wrapper to 3.9.4. Fix maven.config. 2023-09-15 14:22:01 +02:00
buildmaster 941980b5ce Going back to snapshots 2023-08-10 02:10:05 +00:00
buildmaster 1b830d7025 Update SNAPSHOT to 4.1.0-M1 2023-08-10 02:08:21 +00:00
buildmaster 3db89dab01 Bumping versions 2023-06-23 11:04:39 +00:00
spencergibb 6e37692be9 Merge branch '4.0.x' 2023-06-22 10:34:26 -04:00
spencergibb 5b9664e283 Merge branch '4.0.x' 2023-06-22 10:32:10 -04:00
spencergibb 27be2ff18a Revert "Upgrade to Eureka 2.0.1-SNAPSHOT for tests."
This reverts commit c1886f3707.
2023-06-21 12:39:05 -04:00
Olga MaciaszekSharma c1886f3707 Upgrade to Eureka 2.0.1-SNAPSHOT for tests. 2023-06-21 14:18:00 +02:00
Olga MaciaszekSharma 0a07ca18a2 Merge remote-tracking branch 'origin/4.0.x' 2023-06-16 16:28:57 +02:00
spencergibb e8bd633d8f Updates to 4.1.0-SNAPSHOT
Updates to build, commons & config 4.1.0-SNAPSHOT
2023-06-14 14:53:46 -04:00
189 changed files with 5748 additions and 2013 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ given the ability to merge pull requests.
## Code of Conduct
This project adheres to the Contributor Covenant [code of
conduct](https://github.com/spring-cloud/spring-cloud-build/blob/main/docs/src/main/asciidoc/code-of-conduct.adoc). By participating, you are expected to uphold this code. Please report
conduct](https://github.com/spring-cloud/spring-cloud-build/blob/main/docs/modules/ROOT/partials/code-of-conduct.adoc). By participating, you are expected to uphold this code. Please report
unacceptable behavior to spring-code-of-conduct@pivotal.io.
## Code Conventions and Housekeeping
+2
View File
@@ -0,0 +1,2 @@
require:
members: false
+69
View File
@@ -0,0 +1,69 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "4.1.x" # oldest OSS supported branch
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "4.2.x"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "main"
schedule:
interval: "weekly"
- package-ecosystem: maven
directory: /
schedule:
interval: daily
target-branch: 4.1.x
ignore:
# only upgrade patch versions for maintenance branch
- dependency-name: "*"
update-types:
- version-update:semver-major
- version-update:semver-minor
- package-ecosystem: maven
directory: /
schedule:
interval: daily
target-branch: 4.2.x
ignore:
# only upgrade patch versions for maintenance branch
- dependency-name: "*"
update-types:
- version-update:semver-major
- version-update:semver-minor
- package-ecosystem: maven
directory: /
schedule:
interval: daily
target-branch: main
ignore:
# only upgrade by minor or patch
- dependency-name: "*"
update-types:
- version-update:semver-major
- package-ecosystem: npm
target-branch: docs-build
directory: /
schedule:
interval: weekly
- package-ecosystem: npm
target-branch: main
directory: /docs
schedule:
interval: weekly
- package-ecosystem: npm
target-branch: 4.1.x
directory: /docs
schedule:
interval: weekly
- package-ecosystem: npm
target-branch: 4.2.x
directory: /docs
schedule:
interval: weekly
+32
View File
@@ -0,0 +1,32 @@
name: Spring Cloud Netflix CI Job
on:
push:
branches:
- 4.3.x
# Scheduled builds run daily at midnight UTC
schedule:
- cron: '0 0 * * *'
# Manual trigger with optional branch override
workflow_dispatch:
inputs:
branches:
description: "Which branch should be built (can be a comma-separated list of branches)"
required: true
default: '4.3.x'
type: string
jobs:
deploy:
uses: spring-cloud/spring-cloud-github-actions/.github/workflows/deploy.yml@main
with:
branches: ${{ inputs.branches }}
secrets:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
COMMERCIAL_ARTIFACTORY_USERNAME: ${{ secrets.COMMERCIAL_ARTIFACTORY_USERNAME }}
COMMERCIAL_ARTIFACTORY_PASSWORD: ${{ secrets.COMMERCIAL_ARTIFACTORY_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
+32
View File
@@ -0,0 +1,32 @@
name: Deploy Docs
on:
push:
branches-ignore: [ gh-pages ]
tags: '**'
repository_dispatch:
types: request-build-reference # legacy
#schedule:
#- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch:
permissions:
actions: write
jobs:
build:
runs-on: ubuntu-latest
# if: github.repository_owner == 'spring-cloud'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: docs-build
fetch-depth: 1
- name: Dispatch (partial build)
if: github.ref_type == 'branch'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
- name: Dispatch (full build)
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)
+5 -7
View File
@@ -4,10 +4,8 @@
name: Build
on:
push:
branches: [ 4.0.x ]
pull_request:
branches: [ 4.0.x ]
branches: [ main, 4.3.x, 4.2.x ]
jobs:
build:
@@ -19,15 +17,15 @@ jobs:
java: ["17"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven
run: ./mvnw clean install -B -U -P sonar
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v6
with:
fail_ci_if_error: false
+15
View File
@@ -1,3 +1,6 @@
/application.yml
/application.properties
asciidoctor.css
*~
#*
*#
@@ -5,6 +8,7 @@
.classpath
.project
.settings/
.settings
.springBeans
target/
bin/
@@ -18,5 +22,16 @@ _site/
.shelf
*.swp
*.swo
/spring-cloud-release-tools*.jar
antrun
.vscode/
.flattened-pom.xml
node
node_modules
build
_configprops.adoc
_spans.adoc
_metrics.adoc
_conventions.adoc
/package.json
package-lock.json
+2 -1
View File
@@ -1 +1,2 @@
-DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local -P spring
-DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local
-P spring
-107
View File
@@ -1,107 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
import java.util.Properties;
public class MavenWrapperDownloader {
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL =
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: : " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
Vendored Executable → Regular
BIN
View File
Binary file not shown.
+18 -1
View File
@@ -1 +1,18 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
+8 -41
View File
@@ -5,55 +5,20 @@ Edit the files in the src/main/asciidoc/ directory instead.
////
:doctype: book
:idprefix:
:idseparator: -
:toc: left
:toclevels: 4
:tabsize: 4
:numbered:
:sectanchors:
:sectnums:
:icons: font
:hide-uri-scheme:
:docinfo: shared,private
:sc-ext: java
:project-full-name: Spring Cloud Netflix
image::https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml/badge.svg?branch=main&style=svg["Build",link="https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml"]
image::https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml/badge.svg?branch=4.0.x&style=svg["Build",link="https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml"]
image:https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/4.0.x/graph/badge.svg["Codecov", link="https://app.codecov.io/gh/spring-cloud/spring-cloud-netflix/tree/4.0.x"]
:doctype: book
:idprefix:
:idseparator: -
:toc: left
:toclevels: 4
:tabsize: 4
:numbered:
:sectanchors:
:sectnums:
:icons: font
:hide-uri-scheme:
:docinfo: shared,private
:sc-ext: java
:project-full-name: Spring Cloud Netflix
This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration
and binding to the Spring Environment and other Spring programming model idioms. With a few
simple annotations you can quickly enable and configure the common patterns inside your
application and build large distributed systems with battle-tested Netflix components. The
patterns provided include Service Discovery (Eureka).
image:https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/main/graph/badge.svg["Codecov", link="https://app.codecov.io/gh/spring-cloud/spring-cloud-netflix/tree/main"]
[[features]]
== Features
* Service Discovery: Eureka instances can be registered and clients can discover the instances using Spring-managed beans
* Service Discovery: an embedded Eureka server can be created with declarative Java configuration
[[building]]
== Building
:jdkversion: 17
@@ -84,7 +49,7 @@ build succeed, please raise a ticket to get the settings added to
source control.
The projects that require middleware (i.e. Redis) for testing generally
require that a local instance of [Docker](https://www.docker.com/get-started) is installed and running.
require that a local instance of https://www.docker.com/get-started[Docker] is installed and running.
[[documentation]]
== Documentation
@@ -103,7 +68,7 @@ a modified file in the correct place. Just commit it and push the change.
[[working-with-the-code]]
== Working with the code
If you don't have an IDE preference we would recommend that you use
https://www.springsource.com/developer/sts[Spring Tools Suite] or
https://spring.io/tools[Spring Tools Suite] or
https://eclipse.org[Eclipse] when working with the code. We use the
https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
should also work without issue as long as they use Maven 3.3.3 or better.
@@ -146,10 +111,12 @@ from the `file` menu.
NOTE: To build the module `spring-cloud-netflix-hystrix-contract` along with the entire Netflix project run the
`build.sh` script in the `scripts` directory.
[[contributing]]
== Contributing
NOTE: Spring Cloud is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at {github-project}[github].
[[license]]
== License
The project license file is available https://raw.githubusercontent.com/spring-cloud/spring-cloud-netflix/main/LICENSE.txt[here].
+33
View File
@@ -0,0 +1,33 @@
antora:
extensions:
- require: '@springio/antora-extensions'
root_component_name: 'cloud-netflix'
site:
title: Spring Cloud Netflix
url: https://docs.spring.io/spring-cloud-netflix/reference/
content:
sources:
- url: ./..
branches: HEAD
start_path: docs
worktrees: true
asciidoc:
attributes:
page-stackoverflow-url: https://stackoverflow.com/tags/spring-cloud
page-pagination: ''
hide-uri-scheme: '@'
tabs-sync-option: '@'
chomp: 'all'
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
sourcemap: true
urls:
latest_version_segment: ''
runtime:
log:
failure_level: warn
format: pretty
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.15/ui-bundle.zip
+12
View File
@@ -0,0 +1,12 @@
name: cloud-netflix
version: true
title: Spring Cloud Netflix
nav:
- modules/ROOT/nav.adoc
ext:
collector:
run:
command: ./mvnw --no-transfer-progress -B process-resources -Pdocs -pl docs -Dantora-maven-plugin.phase=none -Dgenerate-docs.phase=none -Dgenerate-readme.phase=none -Dgenerate-cloud-resources.phase=none -Dmaven-dependency-plugin-for-docs.phase=none -Dmaven-dependency-plugin-for-docs-classes.phase=none -DskipTests -DdisableConfigurationProperties
local: true
scan:
dir: ./target/classes/antora-resources/
Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

+5
View File
@@ -0,0 +1,5 @@
* xref:index.adoc[Introduction]
* xref:spring-cloud-netflix.adoc[]
* xref:appendix.adoc[]
** xref:configprops.adoc[]
@@ -1,8 +1,6 @@
:doctype: book
:idprefix:
:idseparator: -
:toc: left
:toclevels: 4
:tabsize: 4
:numbered:
:sectanchors:
@@ -12,4 +10,4 @@
:docinfo: shared,private
:sc-ext: java
:project-full-name: Spring Cloud Netflix
:project-full-name: Spring Cloud Netflix
@@ -1,14 +1,13 @@
:numbered!:
[appendix]
[[common-application-properties]]
== Common application properties
= Common application properties
:page-section-summary-toc: 1
include::_attributes.adoc[]
Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them.
This appendix provides a list of common Spring Cloud Netflix properties and references to the underlying classes that consume them.
NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
Also, you can define your own properties.
include::_configprops.adoc[]
+6
View File
@@ -0,0 +1,6 @@
[[configuration-properties]]
= Configuration Properties
Below you can find a list of configuration properties.
include::partial$_configprops.adoc[]
+1
View File
@@ -0,0 +1 @@
include::intro.adoc[]
@@ -1,4 +1,5 @@
include::_attributes.adoc[]
[[introduction]]
= Spring Cloud Netflix
This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration
and binding to the Spring Environment and other Spring programming model idioms. With a few
@@ -1,20 +1,5 @@
include::_attributes.adoc[]
:github-tag: main
:github-repo: spring-cloud/spring-cloud-netflix
:github-raw: https://raw.github.com/{github-repo}/{github-tag}
:github-code: https://github.com/{github-repo}/tree/{github-tag}
:all: {asterisk}{asterisk}
:nofooter:
:branch: main
= Spring Cloud Netflix
*{spring-cloud-version}*
include::intro.adoc[]
[[features]]
= Spring Cloud Netflix Features
== Service Discovery: Eureka Clients
@@ -50,8 +35,9 @@ public class Application {
}
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class).web(true).run(args);
}
SpringApplication.run(CustomerServiceTestApplication.class, args);
}
}
----
@@ -112,19 +98,39 @@ NOTE: Because of a limitation in Eureka, it is not possible to support per-serve
If you want to customize the RestTemplate used by the Eureka HTTP Client you may want to create a bean of `EurekaClientHttpRequestFactorySupplier` and provide your own logic for generating a `ClientHttpRequestFactory` instance.
All default timeout-related properties for RestTemplate used by the Eureka HTTP Client are set to 3 minutes (in keeping with Apache HC5 default `RequestConfig` and `SocketConfig`). Therefore, to specify the timeout values, you must specify the value directly with the properties in `eureka.client.rest-template-timeout`. (All timeout properties are in milliseconds.)
All default timeout-related properties for RestTemplate and RestClient used by the Eureka HTTP Client are set to 3 minutes (in keeping with Apache HC5 default `RequestConfig` and `SocketConfig`). Therefore, to specify the timeout values, you must specify the value directly with the properties in `eureka.client.rest-template-timeout` or `eureka.client.restclient.timeout`. All timeout properties are in milliseconds.
.application.yml
[source,yaml]
----
eureka:
client:
restclient:
timeout:
connect-timeout: 5000
connect-request-timeout: 8000
socket-timeout: 10000
rest-template-timeout:
connect-timeout: 5000
connect-request-timeout: 8000
socket-timeout: 10000
----
You can also customise the `RequestConfig` for the underlying Apache HttpClient 5 by creating a bean of type `EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer`:
[source,java,indent=0]
----
@Configuration
public class RestClientConfiguration {
@Bean
EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer requestConfigCustomizer() {
return builder -> builder.setProtocolUpgradeEnabled(false);
}
}
----
=== Status Page and Health Indicator
The status page and health indicators for a Eureka instance default to `/info` and `/health` respectively, which are the default locations of useful endpoints in a Spring Boot Actuator application.
@@ -282,32 +288,46 @@ Do not use the `EurekaClient` in a `@PostConstruct` method or in a `@Scheduled`
It is initialized in a `SmartLifecycle` (with `phase=0`), so the earliest you can rely on it being available is in another `SmartLifecycle` with a higher phase.
====
==== EurekaClient with Jersey
==== Underlying HTTP clients
`EurekaClient` uses either `RestClient`, `RestTemplate`, `WebClient` or `JerseyClient` under the hood. In order to use the `EurekaClient`, you need to have one of the supported HTTP clients on your classpath.
To use `RestTemplate` or `RestClient`, add `spring-boot-starter-web` to your dependencies. To use `WebClient`, add `spring-boot-starter-webflux` to your dependencies. If both `spring-boot-starter-web`
and `spring-boot-starter-webflux` are included in the dependencies and the `eureka.client.webclient.enabled` flag is set to `true`,
then `WebClient` will be used. If that's not the case and `eureka.client.restclient.enabled` is set to `true`, `RestClient` will be used. Otherwise, `RestTemplate` will be used.
NOTE: For any of those client implementations, if there's a builder bean available, it will be used to create the underlying client.
NOTE: We're planning on changing the default client to `RestClient` with the next major release.
By default, EurekaClient uses Spring's `RestTemplate` for HTTP communication.
If you wish to use Jersey instead, you need to add the Jersey dependencies to your classpath.
The following example shows the dependencies you need to add:
[source,xml]
----
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client4</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client4</artifactId>
</dependency>
</dependencies>
----
If you have `JerseyClient` on the classpath but do not wish to use it in your `EuerekaClient`, make sure to set `eureka.client.jersey.enabled` to `false`.
=== Alternatives to the Native Netflix EurekaClient
You need not use the raw Netflix `EurekaClient`.
Also, it is usually more convenient to use it behind a wrapper of some sort.
Spring Cloud has support for <<spring-cloud-feign, Feign>> (a REST client builder) and https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#spring-cloud-loadbalancer[Spring Cloud LoadBalancer] through the logical Eureka service identifiers (VIPs) instead of physical URLs.
Spring Cloud has support for <<spring-cloud-feign, Feign>> (a REST client builder) and https://docs.spring.io/spring-cloud-commons/reference/4.1/spring-cloud-commons/loadbalancer.html[Spring Cloud LoadBalancer] through the logical Eureka service identifiers (VIPs) instead of physical URLs.
You can also use the `org.springframework.cloud.client.discovery.DiscoveryClient`, which provides a simple API (not specific to Netflix) for discovery clients, as shown in the following example:
@@ -383,7 +403,9 @@ We take `eureka.client.availabilityZones`, which is a map from region name to a
Spring Cloud Netflix Eureka Client integration supports Spring AOT transformations and native images, however, only with refresh mode disabled.
WARNING: If you want to run Eureka Client in AOT or native image modes, make sure to set `spring.cloud.refresh.enabled` to `false`
WARNING: If you want to run Eureka Client in AOT or native image modes, make sure to set `spring.cloud.refresh.enabled` to `false`.
NOTE: Given the AOT and native image closed-world assumption, using random port with Eureka clients is not supported for ahead of time compilation or native images.
[[spring-cloud-eureka-server]]
== Service Discovery: Eureka Server
@@ -418,8 +440,9 @@ The following example shows a minimal Eureka server:
public class Application {
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class).web(true).run(args);
}
SpringApplication.run(CustomerServiceTestApplication.class, args);
}
}
----
@@ -528,7 +551,7 @@ the registrations amongst themselves.
If the peers are physically separated (inside a data center or between multiple data centers), then the system can, in principle, survive "`split-brain`" type failures.
You can add multiple peers to a system, and as long as they are all
directly connected to each other, they will synchronize
the registrations amongst themselves.
the registrations amongst themselves.
.application.yml (Three Peer Aware Eureka Servers)
----
@@ -536,7 +559,7 @@ eureka:
client:
serviceUrl:
defaultZone: https://peer1/eureka/,http://peer2/eureka/,http://peer3/eureka/
---
spring:
profiles: peer1
@@ -569,7 +592,7 @@ Set `eureka.instance.preferIpAddress` to `true` and, when the application regist
====
If the hostname cannot be determined by Java, then the IP address is sent to Eureka.
Only explict way of setting the hostname is by setting `eureka.instance.hostname` property.
You can set your hostname at the run-time by using an environment variable -- for example, `eureka.instance.hostname=${HOST_NAME}`.
You can set your hostname at the run-time by using an environment variable -- for example, `eureka.instance.hostname=$\{HOST_NAME}`.
====
=== Securing The Eureka Server
@@ -578,7 +601,7 @@ You can secure your Eureka server simply by adding Spring Security to your
server's classpath via `spring-boot-starter-security`. By default, when Spring Security is on the classpath it will require that
a valid CSRF token be sent with every request to the app. Eureka clients will not generally possess a valid
cross site request forgery (CSRF) token you will need to disable this requirement for the `/eureka/**` endpoints.
For example:
For example:
[source,java,indent=0]
----
@@ -613,6 +636,17 @@ when running a Eureka server you must include these dependencies in your POM or
Spring Cloud Netflix Eureka Server does not support Spring AOT transformations or native images.
=== Metrics
`EurekaInstanceMonitor` listens to events related to Eureka instance registration and creates/updates `Gauge`s for Eureka instance information in Micrometer's `MeterRegistry`. By default, this behavior is disabled. If you want to enable it, you need to set `eureka.server.metrics.enabled` to `true`.
By default, the `Gauge`s are named `eureka.server.instances` and have the following tags:
- `application`: application name
- `status`: instance status (`UP`, `DOWN`, `STARTING`, `OUT_OF_SERVICE`, `UNKNOWN`, see: `com.netflix.appinfo.InstanceInfo.InstanceStatus`)
You can add additional tags by injecting your own implementation of `EurekaInstanceTagsProvider`.
== Configuration properties
To see the list of all Spring Cloud Netflix related configuration properties please check link:appendix.html[the Appendix page].
@@ -0,0 +1,266 @@
|===
|Name | Default | Description
|eureka.client.allow-redirects | `+++false+++` | Indicates whether server can redirect a client request to a backup server/cluster. If set to false, the server will handle the request directly, If set to true, it may send HTTP redirect to the client, with a new server location.
|eureka.client.availability-zones | | Gets the list of availability zones (used in AWS data centers) for the region in which this instance resides. The changes are effective at runtime at the next registry fetch cycle as specified by registryFetchIntervalSeconds.
|eureka.client.backup-registry-impl | | Gets the name of the implementation which implements BackupRegistry to fetch the registry information as a fallback option for only the first time when the eureka client starts. This may be needed for applications which needs additional resiliency for registry information without which it cannot operate.
|eureka.client.cache-refresh-executor-exponential-back-off-bound | `+++10+++` | Cache refresh executor exponential back off related property. It is a maximum multiplier value for retry delay, in case where a sequence of timeouts occurred.
|eureka.client.cache-refresh-executor-thread-pool-size | `+++2+++` | The thread pool size for the cacheRefreshExecutor to initialise with.
|eureka.client.client-data-accept | | EurekaAccept name for client data accept.
|eureka.client.decoder-name | | This is a transient config and once the latest codecs are stable, can be removed (as there will only be one).
|eureka.client.disable-delta | `+++false+++` | Indicates whether the eureka client should disable fetching of delta and should rather resort to getting the full registry information. Note that the delta fetches can reduce the traffic tremendously, because the rate of change with the eureka server is normally much lower than the rate of fetches. The changes are effective at runtime at the next registry fetch cycle as specified by registryFetchIntervalSeconds
|eureka.client.dollar-replacement | `+++_-+++` | Get a replacement string for Dollar sign <code>$</code> during serializing/deserializing information in eureka server.
|eureka.client.enabled | `+++true+++` | Flag to indicate that the Eureka client is enabled.
|eureka.client.encoder-name | | This is a transient config and once the latest codecs are stable, can be removed (as there will only be one).
|eureka.client.escape-char-replacement | `+++__+++` | Get a replacement string for underscore sign <code>_</code> during serializing/ deserializing information in eureka server.
|eureka.client.eureka-connection-idle-timeout-seconds | `+++30+++` | Indicates how much time (in seconds) that the HTTP connections to eureka server can stay idle before it can be closed. In the AWS environment, it is recommended that the values is 30 seconds or less, since the firewall cleans up the connection information after a few mins leaving the connection hanging in limbo.
|eureka.client.eureka-server-connect-timeout-seconds | `+++5+++` | Indicates how long to wait (in seconds) before a connection to eureka server needs to timeout. Note that the connections in the client are pooled by {@link HttpClient} and this setting affects the actual connection creation and also the wait time to get the connection from the pool.
|eureka.client.eureka-server-d-n-s-name | | Gets the DNS name to be queried to get the list of eureka servers.This information is not required if the contract returns the service urls by implementing serviceUrls. The DNS mechanism is used when useDnsForFetchingServiceUrls is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically. The changes are effective at runtime.
|eureka.client.eureka-server-port | | Gets the port to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS.This information is not required if the contract returns the service urls eurekaServerServiceUrls(String). The DNS mechanism is used when useDnsForFetchingServiceUrls is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically. The changes are effective at runtime.
|eureka.client.eureka-server-read-timeout-seconds | `+++8+++` | Indicates how long to wait (in seconds) before a read from eureka server needs to timeout.
|eureka.client.eureka-server-total-connections | `+++200+++` | Gets the total number of connections that is allowed from eureka client to all eureka servers.
|eureka.client.eureka-server-total-connections-per-host | `+++50+++` | Gets the total number of connections that is allowed from eureka client to a eureka server host.
|eureka.client.eureka-server-u-r-l-context | | Gets the URL context to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS. This information is not required if the contract returns the service urls from eurekaServerServiceUrls. The DNS mechanism is used when useDnsForFetchingServiceUrls is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically. The changes are effective at runtime.
|eureka.client.eureka-service-url-poll-interval-seconds | `+++300+++` | Indicates how often(in seconds) to poll for changes to eureka server information. Eureka servers could be added or removed and this setting controls how soon the eureka clients should know about it.
|eureka.client.fetch-registry | `+++true+++` | Indicates whether this client should fetch eureka registry information from eureka server.
|eureka.client.fetch-remote-regions-registry | | Comma separated list of regions for which the eureka registry information will be fetched. It is mandatory to define the availability zones for each of these regions as returned by availabilityZones. Failing to do so, will result in failure of discovery client startup.
|eureka.client.filter-only-up-instances | `+++true+++` | Indicates whether to get the applications after filtering the applications for instances with only InstanceStatus UP states.
|eureka.client.g-zip-content | `+++true+++` | Indicates whether the content fetched from eureka server has to be compressed whenever it is supported by the server. The registry information from the eureka server is compressed for optimum network traffic.
|eureka.client.healthcheck.enabled | `+++true+++` | Enables the Eureka health check handler.
|eureka.client.heartbeat-executor-exponential-back-off-bound | `+++10+++` | Heartbeat executor exponential back off related property. It is a maximum multiplier value for retry delay, in case where a sequence of timeouts occurred.
|eureka.client.heartbeat-executor-thread-pool-size | `+++2+++` | The thread pool size for the heartbeatExecutor to initialise with.
|eureka.client.initial-instance-info-replication-interval-seconds | `+++40+++` | Indicates how long initially (in seconds) to replicate instance info to the eureka server.
|eureka.client.instance-info-replication-interval-seconds | `+++30+++` | Indicates how often(in seconds) to replicate instance changes to be replicated to the eureka server.
|eureka.client.jersey.enabled | `+++true+++` | Enables the use of JerseyClient for Eureka HTTP Client.
|eureka.client.log-delta-diff | `+++false+++` | Indicates whether to log differences between the eureka server and the eureka client in terms of registry information. Eureka client tries to retrieve only delta changes from eureka server to minimize network traffic. After receiving the deltas, eureka client reconciles the information from the server to verify it has not missed out some information. Reconciliation failures could happen when the client has had network issues communicating to server.If the reconciliation fails, eureka client gets the full registry information. While getting the full registry information, the eureka client can log the differences between the client and the server and this setting controls that. The changes are effective at runtime at the next registry fetch cycle as specified by registryFetchIntervalSecondsr
|eureka.client.on-demand-update-status-change | `+++true+++` | If set to true, local status updates via ApplicationInfoManager will trigger on-demand (but rate limited) register/updates to remote eureka servers.
|eureka.client.order | `+++0+++` | Order of the discovery client used by `CompositeDiscoveryClient` for sorting available clients.
|eureka.client.prefer-same-zone-eureka | `+++true+++` | Indicates whether or not this instance should try to use the eureka server in the same zone for latency and/or other reason. Ideally eureka clients are configured to talk to servers in the same zone The changes are effective at runtime at the next registry fetch cycle as specified by registryFetchIntervalSeconds
|eureka.client.property-resolver | |
|eureka.client.proxy-host | | Gets the proxy host to eureka server if any.
|eureka.client.proxy-password | | Gets the proxy password if any.
|eureka.client.proxy-port | | Gets the proxy port to eureka server if any.
|eureka.client.proxy-user-name | | Gets the proxy user name if any.
|eureka.client.refresh.enable | `+++true+++` | Determines whether the EurekaClient instance can be refreshed or not(If disabled none of the Eureka client properties will be refreshable).
|eureka.client.region | `+++us-east-1+++` | Gets the region (used in AWS datacenters) where this instance resides.
|eureka.client.register-with-eureka | `+++true+++` | Indicates whether or not this instance should register its information with eureka server for discovery by others. In some cases, you do not want your instances to be discovered whereas you just want do discover other instances.
|eureka.client.registry-fetch-interval-seconds | `+++30+++` | Indicates how often(in seconds) to fetch the registry information from the eureka server.
|eureka.client.registry-refresh-single-vip-address | | Indicates whether the client is only interested in the registry information for a single VIP.
|eureka.client.rest-template-timeout.connect-request-timeout | `+++180000+++` |
|eureka.client.rest-template-timeout.connect-timeout | `+++180000+++` | Default values are set to 180000, in keeping with {@link RequestConfig} and {@link SocketConfig} defaults.
|eureka.client.rest-template-timeout.socket-timeout | `+++180000+++` |
|eureka.client.restclient.enabled | `+++false+++` | Enables the use of RestClient for Eureka HTTP Client.
|eureka.client.restclient.timeout.connect-request-timeout | `+++180000+++` |
|eureka.client.restclient.timeout.connect-timeout | `+++180000+++` | Default values are set to 180000, in keeping with {@link RequestConfig} and {@link SocketConfig} defaults.
|eureka.client.restclient.timeout.socket-timeout | `+++180000+++` |
|eureka.client.service-url | | Map of availability zone to list of fully qualified URLs to communicate with eureka server. Each value can be a single URL or a comma separated list of alternative locations. Typically the eureka server URLs carry protocol,host,port,context and version information if any. Example: https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ The changes are effective at runtime at the next service url refresh cycle as specified by eurekaServiceUrlPollIntervalSeconds.
|eureka.client.should-enforce-registration-at-init | `+++false+++` | Indicates whether the client should enforce registration during initialization. Defaults to false.
|eureka.client.should-unregister-on-shutdown | `+++true+++` | Indicates whether the client should explicitly unregister itself from the remote server on client shutdown.
|eureka.client.tls.enabled | |
|eureka.client.tls.key-password | |
|eureka.client.tls.key-store | |
|eureka.client.tls.key-store-password | |
|eureka.client.tls.key-store-type | |
|eureka.client.tls.trust-store | |
|eureka.client.tls.trust-store-password | |
|eureka.client.tls.trust-store-type | |
|eureka.client.use-dns-for-fetching-service-urls | `+++false+++` | Indicates whether the eureka client should use the DNS mechanism to fetch a list of eureka servers to talk to. When the DNS name is updated to have additional servers, that information is used immediately after the eureka client polls for that information as specified in eurekaServiceUrlPollIntervalSeconds. Alternatively, the service urls can be returned serviceUrls, but the users should implement their own mechanism to return the updated list in case of changes. The changes are effective at runtime.
|eureka.client.webclient.enabled | `+++false+++` | Enables the use of WebClient for Eureka HTTP Client.
|eureka.dashboard.enabled | `+++true+++` | Flag to enable the Eureka dashboard. Default true.
|eureka.dashboard.path | `+++/+++` | The path to the Eureka dashboard (relative to the servlet path). Defaults to "/".
|eureka.datacenter | `+++default+++` | Eureka datacenter. Defaults to "default".
|eureka.environment | `+++test+++` | Eureka environment. Defaults to "test".
|eureka.instance.a-s-g-name | | Gets the AWS autoscaling group name associated with this instance. This information is specifically used in an AWS environment to automatically put an instance out of service after the instance is launched and it has been disabled for traffic..
|eureka.instance.app-group-name | | Get the name of the application group to be registered with eureka.
|eureka.instance.appname | `+++unknown+++` | Get the name of the application to be registered with eureka.
|eureka.instance.async-client-initialization | `+++false+++` | If true the EurekaClient will be initialized asynchronously when the InstanceRegistry bean is created.
|eureka.instance.data-center-info | | Returns the data center this instance is deployed. This information is used to get some AWS specific instance information if the instance is deployed in AWS.
|eureka.instance.default-address-resolution-order | `+++[]+++` |
|eureka.instance.environment | |
|eureka.instance.health-check-url | | Gets the absolute health check page URL for this instance. The users can provide the healthCheckUrlPath if the health check page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence. <p> It is normally used for making educated decisions based on the health of the instance - for example, it can be used to determine whether to proceed deployments to an entire farm or stop the deployments without causing further damage. The full URL should follow the format http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime.
|eureka.instance.health-check-url-path | | Gets the relative health check URL path for this instance. The health check page URL is then constructed out of the hostname and the type of communication - secure or unsecure as specified in securePort and nonSecurePort. It is normally used for making educated decisions based on the health of the instance - for example, it can be used to determine whether to proceed deployments to an entire farm or stop the deployments without causing further damage.
|eureka.instance.home-page-url | | Gets the absolute home page URL for this instance. The users can provide the homePageUrlPath if the home page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence. It is normally used for informational purposes for other services to use it as a landing page. The full URL should follow the format http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime.
|eureka.instance.home-page-url-path | `+++/+++` | Gets the relative home page URL Path for this instance. The home page URL is then constructed out of the hostName and the type of communication - secure or unsecure. It is normally used for informational purposes for other services to use it as a landing page.
|eureka.instance.hostname | | The hostname if it can be determined at configuration time (otherwise it will be guessed from OS primitives).
|eureka.instance.initial-status | `+++up+++` | Initial status to register with remote Eureka server.
|eureka.instance.instance-enabled-onit | `+++false+++` | Indicates whether the instance should be enabled for taking traffic as soon as it is registered with eureka. Sometimes the application might need to do some pre-processing before it is ready to take traffic.
|eureka.instance.instance-id | | Get the unique Id (within the scope of the appName) of this instance to be registered with eureka.
|eureka.instance.ip-address | | Get the IPAdress of the instance. This information is for academic purposes only as the communication from other instances primarily happen using the information supplied in {@link #getHostName(boolean)}.
|eureka.instance.lease-expiration-duration-in-seconds | `+++90+++` | Indicates the time in seconds that the eureka server waits since it received the last heartbeat before it can remove this instance from its view and there by disallowing traffic to this instance. Setting this value too long could mean that the traffic could be routed to the instance even though the instance is not alive. Setting this value too small could mean, the instance may be taken out of traffic because of temporary network glitches.This value to be set to atleast higher than the value specified in leaseRenewalIntervalInSeconds.
|eureka.instance.lease-renewal-interval-in-seconds | `+++30+++` | Indicates how often (in seconds) the eureka client needs to send heartbeats to eureka server to indicate that it is still alive. If the heartbeats are not received for the period specified in leaseExpirationDurationInSeconds, eureka server will remove the instance from its view, there by disallowing traffic to this instance. Note that the instance could still not take traffic if it implements HealthCheckCallback and then decides to make itself unavailable.
|eureka.instance.metadata-map | | Gets the metadata name/value pairs associated with this instance. This information is sent to eureka server and can be used by other instances.
|eureka.instance.metadata-map.weight | `+++1+++` | The weight of service instance for weighted load balancing.
|eureka.instance.namespace | `+++eureka+++` | Get the namespace used to find properties. Ignored in Spring Cloud.
|eureka.instance.non-secure-port | `+++80+++` | Get the non-secure port on which the instance should receive traffic.
|eureka.instance.non-secure-port-enabled | `+++true+++` | Indicates whether the non-secure port should be enabled for traffic or not.
|eureka.instance.prefer-ip-address | `+++false+++` | Flag to say that, when guessing a hostname, the IP address of the server should be used in preference to the hostname reported by the OS.
|eureka.instance.registry.default-open-for-traffic-count | `+++1+++` | Value used in determining when leases are cancelled, default to 1 for standalone. Should be set to 0 for peer replicated eurekas
|eureka.instance.registry.expected-number-of-clients-sending-renews | `+++1+++` |
|eureka.instance.secure-health-check-url | | Gets the absolute secure health check page URL for this instance. The users can provide the secureHealthCheckUrl if the health check page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence. <p> It is normally used for making educated decisions based on the health of the instance - for example, it can be used to determine whether to proceed deployments to an entire farm or stop the deployments without causing further damage. The full URL should follow the format http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime.
|eureka.instance.secure-port | `+++443+++` | Get the Secure port on which the instance should receive traffic.
|eureka.instance.secure-port-enabled | `+++false+++` | Indicates whether the secure port should be enabled for traffic or not.
|eureka.instance.secure-virtual-host-name | `+++unknown+++` | Gets the secure virtual host name defined for this instance. This is typically the way other instance would find this instance by using the secure virtual host name.Think of this as similar to the fully qualified domain name, that the users of your services will need to find this instance.
|eureka.instance.status-page-url | | Gets the absolute status page URL path for this instance. The users can provide the statusPageUrlPath if the status page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence. It is normally used for informational purposes for other services to find about the status of this instance. Users can provide a simple HTML indicating what is the current status of the instance.
|eureka.instance.status-page-url-path | | Gets the relative status page URL path for this instance. The status page URL is then constructed out of the hostName and the type of communication - secure or unsecure as specified in securePort and nonSecurePort. It is normally used for informational purposes for other services to find about the status of this instance. Users can provide a simple HTML indicating what is the current status of the instance.
|eureka.instance.virtual-host-name | `+++unknown+++` | Gets the virtual host name defined for this instance. This is typically the way other instance would find this instance by using the virtual host name.Think of this as similar to the fully qualified domain name, that the users of your services will need to find this instance.
|eureka.server.a-s-g-cache-expiry-timeout-ms | `+++600000+++` |
|eureka.server.a-s-g-query-timeout-ms | `+++300+++` |
|eureka.server.a-s-g-update-interval-ms | `+++300000+++` |
|eureka.server.a-w-s-access-id | |
|eureka.server.a-w-s-secret-key | |
|eureka.server.batch-replication | `+++false+++` |
|eureka.server.binding-strategy | `+++eip+++` |
|eureka.server.delta-retention-timer-interval-in-ms | `+++30000+++` |
|eureka.server.disable-delta | `+++false+++` |
|eureka.server.disable-delta-for-remote-regions | `+++false+++` |
|eureka.server.disable-transparent-fallback-to-other-region | `+++false+++` |
|eureka.server.e-i-p-bind-rebind-retries | `+++3+++` |
|eureka.server.e-i-p-binding-retry-interval-ms | `+++300000+++` |
|eureka.server.e-i-p-binding-retry-interval-ms-when-unbound | `+++60000+++` |
|eureka.server.enable-replicated-request-compression | `+++false+++` |
|eureka.server.enable-self-preservation | `+++true+++` |
|eureka.server.eviction-interval-timer-in-ms | |
|eureka.server.expected-client-renewal-interval-seconds | `+++30+++` |
|eureka.server.g-zip-content-from-remote-region | `+++true+++` |
|eureka.server.initial-capacity-of-response-cache | `+++1000+++` |
|eureka.server.json-codec-name | |
|eureka.server.list-auto-scaling-groups-role-name | `+++ListAutoScalingGroups+++` |
|eureka.server.log-identity-headers | `+++true+++` |
|eureka.server.max-elements-in-peer-replication-pool | `+++10000+++` |
|eureka.server.max-elements-in-status-replication-pool | `+++10000+++` |
|eureka.server.max-idle-thread-age-in-minutes-for-peer-replication | `+++15+++` |
|eureka.server.max-idle-thread-in-minutes-age-for-status-replication | `+++10+++` |
|eureka.server.max-threads-for-peer-replication | `+++20+++` |
|eureka.server.max-threads-for-status-replication | `+++1+++` |
|eureka.server.max-time-for-replication | `+++30000+++` |
|eureka.server.metrics.enabled | `+++false+++` | Indicates whether the metrics should be enabled for eureka instances.
|eureka.server.min-available-instances-for-peer-replication | `+++-1+++` |
|eureka.server.min-threads-for-peer-replication | `+++5+++` |
|eureka.server.min-threads-for-status-replication | `+++1+++` |
|eureka.server.my-url | |
|eureka.server.number-of-replication-retries | `+++5+++` |
|eureka.server.peer-eureka-nodes-update-interval-ms | `+++600000+++` |
|eureka.server.peer-eureka-status-refresh-time-interval-ms | |
|eureka.server.peer-node-connect-timeout-ms | `+++200+++` |
|eureka.server.peer-node-connection-idle-timeout-seconds | `+++30+++` |
|eureka.server.peer-node-read-timeout-ms | `+++200+++` |
|eureka.server.peer-node-total-connections | `+++1000+++` |
|eureka.server.peer-node-total-connections-per-host | `+++500+++` |
|eureka.server.prime-aws-replica-connections | `+++true+++` |
|eureka.server.property-resolver | |
|eureka.server.rate-limiter-burst-size | `+++10+++` |
|eureka.server.rate-limiter-enabled | `+++false+++` |
|eureka.server.rate-limiter-full-fetch-average-rate | `+++100+++` |
|eureka.server.rate-limiter-privileged-clients | |
|eureka.server.rate-limiter-registry-fetch-average-rate | `+++500+++` |
|eureka.server.rate-limiter-throttle-standard-clients | `+++false+++` |
|eureka.server.registry-sync-retries | `+++0+++` |
|eureka.server.registry-sync-retry-wait-ms | |
|eureka.server.remote-region-app-whitelist | |
|eureka.server.remote-region-connect-timeout-ms | `+++1000+++` |
|eureka.server.remote-region-connection-idle-timeout-seconds | `+++30+++` |
|eureka.server.remote-region-fetch-thread-pool-size | `+++20+++` |
|eureka.server.remote-region-read-timeout-ms | `+++1000+++` |
|eureka.server.remote-region-registry-fetch-interval | `+++30+++` |
|eureka.server.remote-region-total-connections | `+++1000+++` |
|eureka.server.remote-region-total-connections-per-host | `+++500+++` |
|eureka.server.remote-region-trust-store | |
|eureka.server.remote-region-trust-store-password | `+++changeit+++` |
|eureka.server.remote-region-urls | |
|eureka.server.remote-region-urls-with-name | |
|eureka.server.renewal-percent-threshold | `+++0.85+++` |
|eureka.server.renewal-threshold-update-interval-ms | `+++900000+++` |
|eureka.server.response-cache-auto-expiration-in-seconds | `+++180+++` |
|eureka.server.response-cache-update-interval-ms | `+++30000+++` |
|eureka.server.retention-time-in-m-s-in-delta-queue | `+++180000+++` |
|eureka.server.route53-bind-rebind-retries | `+++3+++` |
|eureka.server.route53-binding-retry-interval-ms | `+++300000+++` |
|eureka.server.route53-domain-t-t-l | `+++30+++` |
|eureka.server.sync-when-timestamp-differs | `+++true+++` |
|eureka.server.use-read-only-response-cache | `+++true+++` |
|eureka.server.wait-time-in-ms-when-sync-empty | `+++300000+++` |
|eureka.server.xml-codec-name | |
|spring.cloud.compatibility-verifier.compatible-boot-versions | `+++3.5.x+++` | Default accepted versions for the Spring Boot dependency. You can set {@code x} for the patch version if you don't want to specify a concrete value. Example: {@code 3.5.x}
|spring.cloud.compatibility-verifier.enabled | `+++false+++` | Enables creation of Spring Cloud compatibility verification.
|spring.cloud.config.allow-override | `+++true+++` | Flag to indicate that {@link #isOverrideSystemProperties() systemPropertiesOverride} can be used. Set to false to prevent users from changing the default accidentally. Default true.
|spring.cloud.config.initialize-on-context-refresh | `+++false+++` | Flag to initialize bootstrap configuration on context refresh event. Default false.
|spring.cloud.config.override-none | `+++false+++` | Flag to indicate that when {@link #setAllowOverride(boolean) allowOverride} is true, external properties should take lowest priority and should not override any existing property sources (including local config files). Default false. This will only have an effect when using config first bootstrap.
|spring.cloud.config.override-system-properties | `+++true+++` | Flag to indicate that the external properties should override system properties. Default true.
|spring.cloud.decrypt-environment-post-processor.enabled | `+++true+++` | Enable the DecryptEnvironmentPostProcessor.
|spring.cloud.discovery.client.composite-indicator.enabled | `+++true+++` | Enables discovery client composite health indicator.
|spring.cloud.discovery.client.health-indicator.enabled | `+++true+++` |
|spring.cloud.discovery.client.health-indicator.include-description | `+++false+++` |
|spring.cloud.discovery.client.health-indicator.use-services-query | `+++true+++` | Whether or not the indicator should use {@link DiscoveryClient#getServices} to check its health. When set to {@code false} the indicator instead uses the lighter {@link DiscoveryClient#probe()}. This can be helpful in large deployments where the number of services returned makes the operation unnecessarily heavy.
|spring.cloud.discovery.client.simple.instances | |
|spring.cloud.discovery.client.simple.local.host | |
|spring.cloud.discovery.client.simple.local.instance-id | |
|spring.cloud.discovery.client.simple.local.metadata | |
|spring.cloud.discovery.client.simple.local.port | `+++0+++` |
|spring.cloud.discovery.client.simple.local.secure | `+++false+++` |
|spring.cloud.discovery.client.simple.local.service-id | |
|spring.cloud.discovery.client.simple.local.uri | |
|spring.cloud.discovery.client.simple.order | |
|spring.cloud.discovery.enabled | `+++true+++` | Enables discovery client health indicators.
|spring.cloud.features.enabled | `+++true+++` | Enables the features endpoint.
|spring.cloud.httpclientfactories.apache.enabled | `+++true+++` | Enables creation of Apache Http Client factory beans.
|spring.cloud.httpclientfactories.ok.enabled | `+++true+++` | Enables creation of OK Http Client factory beans.
|spring.cloud.hypermedia.refresh.fixed-delay | `+++5000+++` |
|spring.cloud.hypermedia.refresh.initial-delay | `+++10000+++` |
|spring.cloud.inetutils.default-hostname | `+++localhost+++` | The default hostname. Used in case of errors.
|spring.cloud.inetutils.default-ip-address | `+++127.0.0.1+++` | The default IP address. Used in case of errors.
|spring.cloud.inetutils.ignored-interfaces | | List of Java regular expressions for network interfaces that will be ignored.
|spring.cloud.inetutils.preferred-networks | | List of Java regular expressions for network addresses that will be preferred.
|spring.cloud.inetutils.timeout-seconds | `+++1+++` | Timeout, in seconds, for calculating hostname.
|spring.cloud.inetutils.use-only-site-local-interfaces | `+++false+++` | Whether to use only interfaces with site local addresses. See {@link InetAddress#isSiteLocalAddress()} for more details.
|spring.cloud.loadbalancer.cache.caffeine.spec | | The spec to use to create caches. See CaffeineSpec for more details on the spec format.
|spring.cloud.loadbalancer.cache.capacity | `+++256+++` | Initial cache capacity expressed as int.
|spring.cloud.loadbalancer.cache.enabled | `+++true+++` | Enables Spring Cloud LoadBalancer caching mechanism.
|spring.cloud.loadbalancer.cache.ttl | `+++35s+++` | Time To Live - time counted from writing of the record, after which cache entries are expired, expressed as a {@link Duration}. The property {@link String} has to be in keeping with the appropriate syntax as specified in Spring Boot <code>StringToDurationConverter</code>. @see <a href= "https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToDurationConverter.java">StringToDurationConverter.java</a>
|spring.cloud.loadbalancer.call-get-with-request-on-delegates | `+++true+++` | If this flag is set to {@code true}, {@code ServiceInstanceListSupplier#get(Request request)} method will be implemented to call {@code delegate.get(request)} in classes assignable from {@code DelegatingServiceInstanceListSupplier} that don't already implement that method, with the exclusion of {@code CachingServiceInstanceListSupplier} and {@code HealthCheckServiceInstanceListSupplier}, which should be placed in the instance supplier hierarchy directly after the supplier performing instance retrieval over the network, before any request-based filtering is done, {@code true} by default.
|spring.cloud.loadbalancer.clients | |
|spring.cloud.loadbalancer.configurations | `+++default+++` | Enables a predefined LoadBalancer configuration.
|spring.cloud.loadbalancer.eager-load.clients | | Names of the clients.
|spring.cloud.loadbalancer.enabled | `+++true+++` | Enables Spring Cloud LoadBalancer.
|spring.cloud.loadbalancer.eureka.approximate-zone-from-hostname | `+++false+++` | Used to determine whether we should try to get the `zone` value from host name.
|spring.cloud.loadbalancer.health-check.initial-delay | `+++0+++` | Initial delay value for the HealthCheck scheduler.
|spring.cloud.loadbalancer.health-check.interval | `+++25s+++` | Interval for rerunning the HealthCheck scheduler.
|spring.cloud.loadbalancer.health-check.path | | Path at which the health-check request should be made. Can be set up per `serviceId`. A `default` value can be set up as well. If none is set up, `/actuator/health` will be used.
|spring.cloud.loadbalancer.health-check.port | | Path at which the health-check request should be made. If none is set, the port under which the requested service is available at the service instance.
|spring.cloud.loadbalancer.health-check.refetch-instances | `+++false+++` | Indicates whether the instances should be refetched by the `HealthCheckServiceInstanceListSupplier`. This can be used if the instances can be updated and the underlying delegate does not provide an ongoing flux.
|spring.cloud.loadbalancer.health-check.refetch-instances-interval | `+++25s+++` | Interval for refetching available service instances.
|spring.cloud.loadbalancer.health-check.repeat-health-check | `+++true+++` | Indicates whether health checks should keep repeating. It might be useful to set it to `false` if periodically refetching the instances, as every refetch will also trigger a healthcheck.
|spring.cloud.loadbalancer.health-check.update-results-list | `+++true+++` | Indicates whether the {@code healthCheckFlux} should emit on each alive {@link ServiceInstance} that has been retrieved. If set to {@code false}, the entire alive instances sequence is first collected into a list and only then emitted.
|spring.cloud.loadbalancer.hint | | Allows setting the value of <code>hint</code> that is passed on to the LoadBalancer request and can subsequently be used in {@link ReactiveLoadBalancer} implementations.
|spring.cloud.loadbalancer.hint-header-name | `+++X-SC-LB-Hint+++` | Allows setting the name of the header used for passing the hint for hint-based service instance filtering.
|spring.cloud.loadbalancer.retry.avoid-previous-instance | `+++true+++` | Enables wrapping ServiceInstanceListSupplier beans with `RetryAwareServiceInstanceListSupplier` if Spring-Retry is in the classpath.
|spring.cloud.loadbalancer.retry.backoff.enabled | `+++false+++` | Indicates whether Reactor Retry backoffs should be applied.
|spring.cloud.loadbalancer.retry.backoff.jitter | `+++0.5+++` | Used to set `RetryBackoffSpec.jitter`.
|spring.cloud.loadbalancer.retry.backoff.max-backoff | `+++Long.MAX ms+++` | Used to set `RetryBackoffSpec.maxBackoff`.
|spring.cloud.loadbalancer.retry.backoff.min-backoff | `+++5 ms+++` | Used to set `RetryBackoffSpec#minBackoff`.
|spring.cloud.loadbalancer.retry.enabled | `+++true+++` | Enables LoadBalancer retries.
|spring.cloud.loadbalancer.retry.max-retries-on-next-service-instance | `+++1+++` | Number of retries to be executed on the next `ServiceInstance`. A `ServiceInstance` is chosen before each retry call.
|spring.cloud.loadbalancer.retry.max-retries-on-same-service-instance | `+++0+++` | Number of retries to be executed on the same `ServiceInstance`.
|spring.cloud.loadbalancer.retry.retry-on-all-exceptions | `+++false+++` | Indicates retries should be attempted for all exceptions, not only those specified in `retryableExceptions`.
|spring.cloud.loadbalancer.retry.retry-on-all-operations | `+++false+++` | Indicates retries should be attempted on operations other than `HttpMethod.GET`.
|spring.cloud.loadbalancer.retry.retryable-exceptions | `+++{}+++` | A `Set` of `Throwable` classes that should trigger a retry.
|spring.cloud.loadbalancer.retry.retryable-status-codes | `+++{}+++` | A `Set` of status codes that should trigger a retry.
|spring.cloud.loadbalancer.service-discovery.timeout | | String representation of Duration of the timeout for calls to service discovery.
|spring.cloud.loadbalancer.stats.include-path | `+++true+++` | Indicates whether the {@code path} should be added to {@code uri} tag in metrics. When {@link RestTemplate} is used to execute load-balanced requests with high cardinality paths, setting it to {@code false} is recommended.
|spring.cloud.loadbalancer.stats.micrometer.enabled | `+++false+++` | Enables Spring Cloud LoadBalancer Micrometer stats.
|spring.cloud.loadbalancer.sticky-session.add-service-instance-cookie | `+++false+++` | Indicates whether a cookie with the newly selected instance should be added by LoadBalancer.
|spring.cloud.loadbalancer.sticky-session.instance-id-cookie-name | `+++sc-lb-instance-id+++` | The name of the cookie holding the preferred instance id.
|spring.cloud.loadbalancer.subset.instance-id | | Instance id of deterministic subsetting. If not set, {@link IdUtils#getDefaultInstanceId(PropertyResolver)} will be used.
|spring.cloud.loadbalancer.subset.size | `+++100+++` | Max subset size of deterministic subsetting.
|spring.cloud.loadbalancer.x-forwarded.enabled | `+++false+++` | To Enable X-Forwarded Headers.
|spring.cloud.loadbalancer.zone | | Spring Cloud LoadBalancer zone.
|spring.cloud.refresh.additional-property-sources-to-retain | | Additional property sources to retain during a refresh. Typically only system property sources are retained. This property allows property sources, such as property sources created by EnvironmentPostProcessors to be retained as well.
|spring.cloud.refresh.enabled | `+++true+++` | Enables autoconfiguration for the refresh scope and associated features.
|spring.cloud.refresh.extra-refreshable | `+++true+++` | Additional bean names or class names for beans to post process into refresh scope.
|spring.cloud.refresh.never-refreshable | `+++true+++` | Comma separated list of bean names or class names for beans to never be refreshed or rebound.
|spring.cloud.refresh.on-restart.enabled | `+++true+++` | Enable refreshing context on start.
|spring.cloud.service-registry.auto-registration.enabled | `+++true+++` | Whether service auto-registration is enabled. Defaults to true.
|spring.cloud.service-registry.auto-registration.fail-fast | `+++false+++` | Whether startup fails if there is no AutoServiceRegistration. Defaults to false.
|spring.cloud.service-registry.auto-registration.register-management | `+++true+++` | Whether to register the management as a service. Defaults to true.
|spring.cloud.util.enabled | `+++true+++` | Enables creation of Spring Cloud utility beans.
|===
+10
View File
@@ -0,0 +1,10 @@
{
"dependencies": {
"antora": "3.2.0-alpha.11",
"@antora/atlas-extension": "1.0.0-alpha.5",
"@antora/collector-extension": "1.0.3",
"@asciidoctor/tabs": "1.0.0-beta.6",
"@springio/antora-extensions": "1.14.9",
"@springio/asciidoctor-extensions": "1.0.0-alpha.18"
}
}
+42 -24
View File
@@ -1,66 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-docs</artifactId>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>4.0.4-SNAPSHOT</version>
<version>4.3.2</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-netflix-docs</artifactId>
<packaging>jar</packaging>
<name>Spring Cloud Netflix Docs</name>
<description>Spring Cloud Docs</description>
<description>Spring Cloud Netflix Docs</description>
<properties>
<docs.main>spring-cloud-netflix</docs.main>
<main.basedir>${basedir}/..</main.basedir>
<configprops.inclusionPattern>
.*.eureka.*
</configprops.inclusionPattern>
<upload-docs-zip.phase>deploy</upload-docs-zip.phase>
<configprops.inclusionPattern>eureka.*|spring.cloud.*</configprops.inclusionPattern>
<!-- Don't upload docs jar to central / repo.spring.io -->
<maven-deploy-plugin-default.phase>none</maven-deploy-plugin-default.phase>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/asciidoc</sourceDirectory>
</build>
<profiles>
<profile>
<id>enable-configuration-properties</id>
<activation>
<property>
<name>!disableConfigurationProperties</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>docs</id>
<build>
<resources>
<resource>
<directory>src/main/antora/resources/antora-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<groupId>io.spring.maven.antora</groupId>
<artifactId>antora-component-version-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
</plugins>
@@ -0,0 +1,20 @@
version: @antora-component.version@
prerelease: @antora-component.prerelease@
asciidoc:
attributes:
attribute-missing: 'warn'
chomp: 'all'
project-root: @maven.multiModuleProjectDirectory@
github-repo: @docs.main@
github-raw: https://raw.githubusercontent.com/spring-cloud/@docs.main@/@github-tag@
github-code: https://github.com/spring-cloud/@docs.main@/tree/@github-tag@
github-issues: https://github.com/spring-cloud/@docs.main@/issues/
github-wiki: https://github.com/spring-cloud/@docs.main@/wiki
spring-cloud-version: @project.version@
github-tag: @github-tag@
version-type: @version-type@
docs-url: https://docs.spring.io/@docs.main@/docs/@project.version@
raw-docs-url: https://raw.githubusercontent.com/spring-cloud/@docs.main@/@github-tag@
project-version: @project.version@
project-name: @docs.main@
+7 -5
View File
@@ -1,17 +1,17 @@
include::_attributes.adoc[]
image::https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml/badge.svg?branch=4.0.x&style=svg["Build",link="https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml"]
image::https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml/badge.svg?branch=main&style=svg["Build",link="https://github.com/spring-cloud/spring-cloud-netflix/actions/workflows/maven.yml"]
image:https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/4.0.x/graph/badge.svg["Codecov", link="https://app.codecov.io/gh/spring-cloud/spring-cloud-netflix/tree/4.0.x"]
image:https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/main/graph/badge.svg["Codecov", link="https://app.codecov.io/gh/spring-cloud/spring-cloud-netflix/tree/main"]
include::intro.adoc[]
[[features]]
== Features
* Service Discovery: Eureka instances can be registered and clients can discover the instances using Spring-managed beans
* Service Discovery: an embedded Eureka server can be created with declarative Java configuration
[[building]]
== Building
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/building.adoc[]
@@ -19,10 +19,12 @@ include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/
NOTE: To build the module `spring-cloud-netflix-hystrix-contract` along with the entire Netflix project run the
`build.sh` script in the `scripts` directory.
[[contributing]]
== Contributing
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/contributing-docs.adoc[]
[[license]]
== License
The project license file is available https://raw.githubusercontent.com/spring-cloud/spring-cloud-netflix/main/LICENSE.txt[here].
The project license file is available https://raw.githubusercontent.com/spring-cloud/spring-cloud-netflix/main/LICENSE.txt[here].
-19
View File
@@ -1,19 +0,0 @@
|===
|Name | Default | Description
|eureka.client.eureka-connection-idle-timeout-seconds | `+++30+++` | Indicates how much time (in seconds) that the HTTP connections to eureka server can stay idle before it can be closed. In the AWS environment, it is recommended that the values is 30 seconds or less, since the firewall cleans up the connection information after a few mins leaving the connection hanging in limbo.
|eureka.client.eureka-server-connect-timeout-seconds | `+++5+++` | Indicates how long to wait (in seconds) before a connection to eureka server needs to timeout. Note that the connections in the client are pooled by {@link HttpClient} and this setting affects the actual connection creation and also the wait time to get the connection from the pool.
|eureka.client.eureka-server-d-n-s-name | | Gets the DNS name to be queried to get the list of eureka servers.This information is not required if the contract returns the service urls by implementing serviceUrls. The DNS mechanism is used when useDnsForFetchingServiceUrls is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically. The changes are effective at runtime.
|eureka.client.eureka-server-port | | Gets the port to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS.This information is not required if the contract returns the service urls eurekaServerServiceUrls(String). The DNS mechanism is used when useDnsForFetchingServiceUrls is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically. The changes are effective at runtime.
|eureka.client.eureka-server-read-timeout-seconds | `+++8+++` | Indicates how long to wait (in seconds) before a read from eureka server needs to timeout.
|eureka.client.eureka-server-total-connections | `+++200+++` | Gets the total number of connections that is allowed from eureka client to all eureka servers.
|eureka.client.eureka-server-total-connections-per-host | `+++50+++` | Gets the total number of connections that is allowed from eureka client to a eureka server host.
|eureka.client.eureka-server-u-r-l-context | | Gets the URL context to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS. This information is not required if the contract returns the service urls from eurekaServerServiceUrls. The DNS mechanism is used when useDnsForFetchingServiceUrls is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically. The changes are effective at runtime.
|eureka.client.eureka-service-url-poll-interval-seconds | `+++0+++` | Indicates how often(in seconds) to poll for changes to eureka server information. Eureka servers could be added or removed and this setting controls how soon the eureka clients should know about it.
|eureka.client.prefer-same-zone-eureka | `+++true+++` | Indicates whether or not this instance should try to use the eureka server in the same zone for latency and/or other reason. Ideally eureka clients are configured to talk to servers in the same zone The changes are effective at runtime at the next registry fetch cycle as specified by registryFetchIntervalSeconds
|eureka.client.register-with-eureka | `+++true+++` | Indicates whether or not this instance should register its information with eureka server for discovery by others. In some cases, you do not want your instances to be discovered whereas you just want do discover other instances.
|eureka.server.peer-eureka-nodes-update-interval-ms | `+++0+++` |
|eureka.server.peer-eureka-status-refresh-time-interval-ms | `+++0+++` |
|spring.cloud.loadbalancer.eureka.approximate-zone-from-hostname | `+++false+++` | Used to determine whether we should try to get the `zone` value from host name.
|===
-1
View File
@@ -1 +0,0 @@
spring-cloud-netflix.adoc
Vendored
+125 -123
View File
@@ -8,7 +8,7 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
@@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
# Apache Maven Wrapper startup batch script, version 3.2.0
#
# Required ENV vars:
# ------------------
@@ -27,7 +27,6 @@
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@@ -36,6 +35,10 @@
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /usr/local/etc/mavenrc ] ; then
. /usr/local/etc/mavenrc
fi
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
@@ -50,7 +53,7 @@ fi
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
case "$(uname)" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
@@ -58,9 +61,9 @@ case "`uname`" in
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
else
export JAVA_HOME="/Library/Java/Home"
JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
fi
fi
;;
@@ -68,69 +71,38 @@ esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
JAVA_HOME=$(java-config --jre-home)
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
# TODO classpath?
[ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
javaExecutable="$(which javac)"
if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
readLink=$(which readlink)
if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
javaHome="$(dirname "\"$javaExecutable\"")"
javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
javaExecutable="$(readlink -f "\"$javaExecutable\"")"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
javaHome="$(dirname "\"$javaExecutable\"")"
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
@@ -146,7 +118,7 @@ if [ -z "$JAVACMD" ] ; then
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
fi
fi
@@ -160,12 +132,9 @@ if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
@@ -181,76 +150,99 @@ find_maven_basedir() {
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
wdir=$(cd "$wdir/.." || exit 1; pwd)
fi
# end of workaround
done
echo "${basedir}"
printf '%s' "$(cd "$basedir" || exit 1; pwd)"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
# Remove \r in case we run on Windows within Git Bash
# and check out the repository with auto CRLF management
# enabled. Otherwise, we may read lines that are delimited with
# \r\n and produce $'-Xarg\r' rather than -Xarg due to word
# splitting rules.
tr -s '\r\n' ' ' < "$1"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
log() {
if [ "$MVNW_VERBOSE" = true ]; then
printf '%s\n' "$1"
fi
}
BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
log "$MAVEN_PROJECTBASEDIR"
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
fi
wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
if [ -r "$wrapperJarPath" ]; then
log "Found $wrapperJarPath"
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
log "Couldn't find $wrapperJarPath, downloading it ..."
if [ -n "$MVNW_REPOURL" ]; then
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
else
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
fi
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar"
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
while IFS="=" read -r key value; do
# Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
safeValue=$(echo "$value" | tr -d '\r')
case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
log "Downloading from: $wrapperUrl"
if $cygwin; then
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
log "Found wget ... using wget"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
wget "$jarUrl" -O "$wrapperJarPath"
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
log "Found curl ... using curl"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
else
curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
fi
curl -o "$wrapperJarPath" "$jarUrl"
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
log "Falling back to using Java to download"
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaSource=$(cygpath --path --windows "$javaSource")
javaClass=$(cygpath --path --windows "$javaClass")
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass")
if [ -e "$javaSource" ]; then
if [ ! -e "$javaClass" ]; then
log " - Compiling MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/javac" "$javaSource")
fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..."
fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
if [ -e "$javaClass" ]; then
log " - Running MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
fi
fi
fi
@@ -259,48 +251,58 @@ fi
# End of extension
##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
# If specified, validate the SHA-256 sum of the Maven wrapper jar file
wrapperSha256Sum=""
while IFS="=" read -r key value; do
case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
esac
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
if [ -n "$wrapperSha256Sum" ]; then
wrapperSha256Result=false
if command -v sha256sum > /dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
wrapperSha256Result=true
fi
elif command -v shasum > /dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
wrapperSha256Result=true
fi
else
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
exit 1
fi
if [ $wrapperSha256Result = false ]; then
echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
exit 1
fi
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
echo "Running version check"
VERSION=$( sed '\!<parent!,\!</parent!d' `dirname $0`/pom.xml | grep '<version' | head -1 | sed -e 's/.*<version>//' -e 's!</version>.*$!!' )
echo "The found version is [${VERSION}]"
if echo $VERSION | egrep -q 'M|RC'; then
echo Activating \"milestone\" profile for version=\"$VERSION\"
echo $MAVEN_CONFIG | grep -q milestone || MAVEN_CONFIG="$MAVEN_CONFIG -Pmilestone"
else
echo Deactivating \"milestone\" profile for version=\"$VERSION\"
echo $MAVEN_CONFIG | grep -q milestone && MAVEN_CONFIG=$(echo $MAVEN_CONFIG | sed -e 's/-Pmilestone//')
fi
if echo $VERSION | egrep -q 'RELEASE'; then
echo Activating \"central\" profile for version=\"$VERSION\"
echo $MAVEN_CONFIG | grep -q milestone || MAVEN_CONFIG="$MAVEN_CONFIG -Pcentral"
else
echo Deactivating \"central\" profile for version=\"$VERSION\"
echo $MAVEN_CONFIG | grep -q central && MAVEN_CONFIG=$(echo $MAVEN_CONFIG | sed -e 's/-Pcentral//')
fi
# shellcheck disable=SC2086 # safe args
exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
Vendored Executable → Regular
+66 -22
View File
@@ -7,7 +7,7 @@
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@@ -18,15 +18,14 @@
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM Apache Maven Wrapper startup batch script, version 3.2.0
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@@ -37,7 +36,7 @@
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
@@ -46,8 +45,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
@@ -120,24 +119,69 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar"
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
echo Found %WRAPPER_JAR%
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
echo Finished downloading %WRAPPER_JAR%
if not "%MVNW_REPOURL%" == "" (
SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %WRAPPER_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
SET WRAPPER_SHA_256_SUM=""
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
)
IF NOT %WRAPPER_SHA_256_SUM%=="" (
powershell -Command "&{"^
"$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
"If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
" Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
" Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
" Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
" exit 1;"^
"}"^
"}"
if ERRORLEVEL 1 goto error
)
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
%MAVEN_DEBUG_OPTS% ^
-classpath %WRAPPER_JAR% ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
@@ -147,15 +191,15 @@ set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_BATCH_PAUSE%"=="on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
cmd /C exit /B %ERROR_CODE%
+91 -12
View File
@@ -3,14 +3,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-netflix</artifactId>
<version>4.0.4-SNAPSHOT</version>
<version>4.3.2</version>
<packaging>pom</packaging>
<name>Spring Cloud Netflix</name>
<description>Spring Cloud Netflix</description>
<url>https://github.com/spring-cloud/spring-cloud-netflix</url>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>4.0.6-SNAPSHOT</version>
<version>4.3.3</version>
<relativePath />
</parent>
<scm>
@@ -19,11 +20,69 @@
<developerConnection>scm:git:ssh://git@github.com/spring-cloud/spring-cloud-netflix.git</developerConnection>
<tag>HEAD</tag>
</scm>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<developers>
<developer>
<id>dsyer</id>
<name>Dave Syer</name>
<email>david.syer at broadcom.com</email>
<organization>Broadcom, Inc.</organization>
<organizationUrl>https://www.spring.io</organizationUrl>
<roles>
<role>lead</role>
</roles>
</developer>
<developer>
<id>sgibb</id>
<name>Spencer Gibb</name>
<email>spencer.gibb at broadcom.com</email>
<organization>Broadcom, Inc.</organization>
<organizationUrl>https://www.spring.io</organizationUrl>
<roles>
<role>lead</role>
</roles>
</developer>
<developer>
<id>mgrzejszczak</id>
<name>Marcin Grzejszczak</name>
<email>>marcin.grzejszczak at broadcom.com</email>
<organization>Broadcom, Inc.</organization>
<organizationUrl>https://www.spring.io</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<id>rbaxter</id>
<name>Ryan Baxter</name>
<email>ryan.baxter at broadcom.com</email>
<organization>Broadcom, Inc.</organization>
<organizationUrl>https://www.spring.io</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<id>omaciaszeksharma</id>
<name>Olga Maciaszek-Sharma</name>
<email>olga.maciaszek-sharma at broadcom.com</email>
<organization>Broadcom, Inc.</organization>
<organizationUrl>https://www.spring.io</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
<properties>
<bintray.package>netflix</bintray.package>
<spring-cloud-commons.version>4.0.5-SNAPSHOT</spring-cloud-commons.version>
<spring-cloud-config.version>4.0.5-SNAPSHOT</spring-cloud-config.version>
<testcontainers.version>1.17.6</testcontainers.version>
<spring-cloud-commons.version>4.3.2</spring-cloud-commons.version>
<spring-cloud-config.version>4.3.2</spring-cloud-config.version>
<testcontainers.version>1.21.4</testcontainers.version>
<mockserverclient.version>5.15.0</mockserverclient.version>
<!-- Sonar -->
@@ -32,8 +91,6 @@
<sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
<sonar.language>java</sonar.language>
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
<!-- FIXME: 4.0.0 -->
<duplicate-finder-maven-plugin.skip>true</duplicate-finder-maven-plugin.skip>
</properties>
<build>
<plugins>
@@ -132,6 +189,12 @@
<groupId>org.mock-server</groupId>
<artifactId>mockserver-client-java</artifactId>
<version>${mockserverclient.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
@@ -153,13 +216,29 @@
<module>docs</module>
</modules>
<profiles>
<profile>
<id>central</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<configuration>
<excludeArtifacts>
<artifact>spring-cloud-netflix-eureka-client-tls-tests</artifact>
</excludeArtifacts>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>spring</id>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@@ -170,7 +249,7 @@
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@@ -188,7 +267,7 @@
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@@ -199,7 +278,7 @@
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@@ -207,7 +286,7 @@
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release-local</url>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
+27 -8
View File
@@ -5,16 +5,16 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>4.0.6-SNAPSHOT</version>
<version>4.3.3</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-netflix-dependencies</artifactId>
<version>4.0.4-SNAPSHOT</version>
<version>4.3.2</version>
<packaging>pom</packaging>
<name>spring-cloud-netflix-dependencies</name>
<description>Spring Cloud Netflix Dependencies</description>
<properties>
<eureka.version>2.0.1</eureka.version>
<eureka.version>2.0.6</eureka.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -43,6 +43,10 @@
<artifactId>eureka-client</artifactId>
<version>${eureka.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
@@ -51,10 +55,18 @@
<groupId>com.github.vlsi.compactmap</groupId>
<artifactId>compactmap</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<artifactId>commons-configuration</artifactId>
<groupId>commons-configuration</groupId>
</exclusion>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
@@ -82,6 +94,10 @@
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
@@ -130,9 +146,12 @@
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- TODO: Move back to Eureka dependency when 1.10.17 released -->
</dependencies>
</dependencyManagement>
<profiles>
@@ -142,7 +161,7 @@
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@@ -153,7 +172,7 @@
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@@ -171,7 +190,7 @@
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@@ -182,7 +201,7 @@
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>4.0.4-SNAPSHOT</version>
<version>4.3.2</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-netflix-eureka-client-tls-tests</artifactId>
@@ -92,16 +92,21 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -48,14 +48,14 @@ public class AppRunner implements AutoCloseable {
SpringApplicationBuilder builder = new SpringApplicationBuilder(appClass);
builder.properties("spring.application.name=" + appClass.getName());
builder.properties("spring.jmx.enabled=false");
builder.properties(String.format("server.port=%d", availabeTcpPort()));
builder.properties(String.format("server.port=%d", availableTcpPort()));
builder.properties(props());
app = builder.build().run();
}
}
private int availabeTcpPort() {
private int availableTcpPort() {
return TestSocketUtils.findAvailableTcpPort();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -25,17 +25,17 @@ import java.util.function.Supplier;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
abstract class BaseCertTest {
abstract class BaseCertTests {
private static final Log log = LogFactory.getLog(BaseCertTest.class);
private static final Log log = LogFactory.getLog(BaseCertTests.class);
protected static final String KEY_STORE_PASSWORD = "test-key-store-password";
@@ -53,7 +53,7 @@ abstract class BaseCertTest {
protected static File wrongClientCert;
protected BaseCertTest() {
protected BaseCertTests() {
}
@SuppressWarnings("rawtypes")
@@ -155,15 +155,7 @@ abstract class BaseCertTest {
EurekaClientRunner client = createEurekaClient();
enableTlsClient(client);
client.setKeyStore(clientCert, WRONG_PASSWORD, WRONG_PASSWORD);
Assertions.assertThrows(BeanCreationException.class, client::start);
}
@Test
void nonExistKeyStoreCauseFailure() {
EurekaClientRunner client = createEurekaClient();
enableTlsClient(client);
client.setKeyStore(new File("nonExistFile"));
Assertions.assertThrows(BeanCreationException.class, client::start);
assertThatExceptionOfType(BeanCreationException.class).isThrownBy(client::start);
}
@Test
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -16,8 +16,8 @@
package org.springframework.cloud.netflix.eureka;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;
/**
* We need to use a suite cause we need to first run all the Eureka Servers, then close
@@ -26,8 +26,8 @@ import org.junit.runners.Suite;
* That means that when the new context starts we will fail cause the executor service is
* already shutdown.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ EurekaClientTest.class, RestTemplateEurekaClientTest.class })
@SelectClasses({ EurekaClientTests.class, RestTemplateEurekaClientTests.class })
@Suite
public class EurekaClientSuite {
}
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -16,20 +16,25 @@
package org.springframework.cloud.netflix.eureka;
import java.util.Collections;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.BeforeAll;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.netflix.eureka.http.DefaultEurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.RestTemplateDiscoveryClientOptionalArgs;
import org.springframework.cloud.netflix.eureka.http.RestTemplateTransportClientFactories;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Bean;
import static org.assertj.core.api.Assertions.assertThat;
public class EurekaClientTest extends BaseCertTest {
public class EurekaClientTests extends BaseCertTests {
private static final Log log = LogFactory.getLog(EurekaClientTest.class);
private static final Log LOG = LogFactory.getLog(EurekaClientTests.class);
static EurekaServerRunner server;
@@ -37,11 +42,11 @@ public class EurekaClientTest extends BaseCertTest {
@BeforeAll
public static void setupAll() {
server = startEurekaServer(EurekaClientTest.TestEurekaServer.class);
service = startService(server, EurekaClientTest.TestApp.class);
server = startEurekaServer(EurekaClientTests.TestEurekaServer.class);
service = startService(server, EurekaClientTests.TestApp.class);
assertThat(service.discoveryClientOptionalArgs()).isInstanceOf(RestTemplateDiscoveryClientOptionalArgs.class);
log.info("Successfully asserted that Jersey will be used");
waitForRegistration(() -> new EurekaClientTest().createEurekaClient());
LOG.info("Successfully asserted that Jersey will be used");
waitForRegistration(() -> new EurekaClientTests().createEurekaClient());
}
@Override
@@ -53,6 +58,18 @@ public class EurekaClientTest extends BaseCertTest {
@EnableAutoConfiguration
public static class TestApp {
@Bean
public RestTemplateTransportClientFactories forceRestTemplateTransportClientFactories(
RestTemplateDiscoveryClientOptionalArgs discoveryClientOptionalArgs) {
return new RestTemplateTransportClientFactories(discoveryClientOptionalArgs);
}
@Bean
public RestTemplateDiscoveryClientOptionalArgs discoveryClientOptionalArgs() {
return new RestTemplateDiscoveryClientOptionalArgs(new DefaultEurekaClientHttpRequestFactorySupplier(
new RestTemplateTimeoutProperties(), Collections.emptySet()));
}
}
@SpringBootConfiguration
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -0,0 +1,106 @@
/*
* Copyright 2018-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.cloud.netflix.eureka.http.EurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.RestClientDiscoveryClientOptionalArgs;
import org.springframework.cloud.netflix.eureka.http.RestClientTransportClientFactories;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestClient;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.cloud.netflix.eureka.config.DiscoveryClientOptionalArgsConfiguration.setupTLS;
/**
* Tests for verifying TLS setup with {@link RestClientTransportClientFactories}.
*
* @author Olga Maciaszek-Sharma
*/
public class RestClientEurekaClientTests extends BaseCertTests {
private static final Log LOG = LogFactory.getLog(RestClientEurekaClientTests.class);
private static EurekaServerRunner server;
private static EurekaClientRunner service;
@BeforeAll
public static void setupAll() {
server = startEurekaServer(TestEurekaServer.class);
service = startService(server, TestApp.class);
// Will use RestClient
assertThat(service.discoveryClientOptionalArgs()).isInstanceOf(RestClientDiscoveryClientOptionalArgs.class);
LOG.info("Successfully asserted that RestClient will be used");
waitForRegistration(() -> new RestClientEurekaClientTests().createEurekaClient());
}
@AfterAll
public static void tearDownAll() {
stopService(service);
stopEurekaServer(server);
}
@Override
EurekaClientRunner createEurekaClient() {
return new EurekaClientRunner(TestApp.class, server);
}
@SpringBootConfiguration
@EnableAutoConfiguration
public static class TestApp {
// Want to force reusing exactly the same bean as on production without excluding
// jersey from the classpath
@Bean
public RestClientDiscoveryClientOptionalArgs forceRestClientDiscoveryClientOptionalArgs(
TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier)
throws GeneralSecurityException, IOException {
RestClientDiscoveryClientOptionalArgs result = new RestClientDiscoveryClientOptionalArgs(
eurekaClientHttpRequestFactorySupplier, RestClient::builder);
setupTLS(result, tlsProperties);
return result;
}
@Bean
public RestClientTransportClientFactories forceRestClientTransportClientFactories(
RestClientDiscoveryClientOptionalArgs discoveryClientOptionalArgs) {
return new RestClientTransportClientFactories(discoveryClientOptionalArgs);
}
}
@SpringBootConfiguration
@EnableAutoConfiguration
@EnableEurekaServer
public static class TestEurekaServer {
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 the original author or authors.
* Copyright 2018-present 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.
@@ -26,18 +26,21 @@ import org.junit.jupiter.api.BeforeAll;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.cloud.netflix.eureka.config.DiscoveryClientOptionalArgsConfiguration;
import org.springframework.cloud.netflix.eureka.http.DefaultEurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.EurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.RestTemplateDiscoveryClientOptionalArgs;
import org.springframework.cloud.netflix.eureka.http.RestTemplateTransportClientFactories;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Bean;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.cloud.netflix.eureka.config.DiscoveryClientOptionalArgsConfiguration.setupTLS;
public class RestTemplateEurekaClientTest extends BaseCertTest {
public class RestTemplateEurekaClientTests extends BaseCertTests {
private static final Log log = LogFactory.getLog(RestTemplateEurekaClientTest.class);
private static final Log log = LogFactory.getLog(RestTemplateEurekaClientTests.class);
private static EurekaServerRunner server;
@@ -45,12 +48,12 @@ public class RestTemplateEurekaClientTest extends BaseCertTest {
@BeforeAll
public static void setupAll() {
server = startEurekaServer(RestTemplateEurekaClientTest.RestTemplateTestEurekaServer.class);
service = startService(server, RestTemplateEurekaClientTest.RestTemplateTestApp.class);
server = startEurekaServer(TestEurekaServer.class);
service = startService(server, RestTemplateEurekaClientTests.RestTemplateTestApp.class);
// Will use RestTemplate
assertThat(service.discoveryClientOptionalArgs()).isInstanceOf(RestTemplateDiscoveryClientOptionalArgs.class);
log.info("Successfully asserted that RestTemplate will be used");
waitForRegistration(() -> new RestTemplateEurekaClientTest().createEurekaClient());
waitForRegistration(() -> new RestTemplateEurekaClientTests().createEurekaClient());
}
@AfterAll
@@ -68,15 +71,27 @@ public class RestTemplateEurekaClientTest extends BaseCertTest {
@EnableAutoConfiguration
public static class RestTemplateTestApp {
// Want to force reusing exactly the same bean as on production without excluding
// jersey from the classpath
@Bean
public RestTemplateDiscoveryClientOptionalArgs forceRestTemplateDiscoveryClientOptionalArgs(
TlsProperties tlsProperties, DiscoveryClientOptionalArgsConfiguration configuration,
TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier)
throws GeneralSecurityException, IOException {
return configuration.restTemplateDiscoveryClientOptionalArgs(tlsProperties,
eurekaClientHttpRequestFactorySupplier);
RestTemplateDiscoveryClientOptionalArgs result = new RestTemplateDiscoveryClientOptionalArgs(
eurekaClientHttpRequestFactorySupplier, RestTemplateBuilder::new);
setupTLS(result, tlsProperties);
return result;
}
@Bean
public RestTemplateTransportClientFactories forceRestTemplateTransportClientFactories(
RestTemplateDiscoveryClientOptionalArgs discoveryClientOptionalArgs) {
return new RestTemplateTransportClientFactories(discoveryClientOptionalArgs);
}
@Bean
EurekaClientHttpRequestFactorySupplier defaultEurekaClientHttpRequestFactorySupplier(
RestTemplateTimeoutProperties restTemplateTimeoutProperties) {
return new DefaultEurekaClientHttpRequestFactorySupplier(restTemplateTimeoutProperties);
}
}
@@ -84,7 +99,7 @@ public class RestTemplateEurekaClientTest extends BaseCertTest {
@SpringBootConfiguration
@EnableAutoConfiguration
@EnableEurekaServer
public static class RestTemplateTestEurekaServer {
public static class TestEurekaServer {
}
+1 -6
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>4.0.4-SNAPSHOT</version>
<version>4.3.2</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-netflix-eureka-client</artifactId>
@@ -82,11 +82,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-test-support</artifactId>
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -193,20 +193,43 @@ public class CloudEurekaTransportConfig implements EurekaTransportConfig {
@Override
public String toString() {
return new StringBuilder("CloudEurekaTransportConfig{").append("sessionedClientReconnectIntervalSeconds=")
.append(sessionedClientReconnectIntervalSeconds).append(", ")
.append("retryableClientQuarantineRefreshPercentage=")
.append(retryableClientQuarantineRefreshPercentage).append(", ")
.append("bootstrapResolverRefreshIntervalSeconds=").append(bootstrapResolverRefreshIntervalSeconds)
.append(", ").append("applicationsResolverDataStalenessThresholdSeconds=")
.append(applicationsResolverDataStalenessThresholdSeconds).append(", ")
.append("asyncResolverRefreshIntervalMs=").append(asyncResolverRefreshIntervalMs).append(", ")
.append("asyncResolverWarmUpTimeoutMs=").append(asyncResolverWarmUpTimeoutMs).append(", ")
.append("asyncExecutorThreadPoolSize=").append(asyncExecutorThreadPoolSize).append(", ")
.append("readClusterVip='").append(readClusterVip).append("', ").append("writeClusterVip='")
.append(writeClusterVip).append("', ").append("bootstrapResolverForQuery=")
.append(bootstrapResolverForQuery).append(", ").append("bootstrapResolverStrategy='")
.append(bootstrapResolverStrategy).append("', ").append("applicationsResolverUseIp=")
.append(applicationsResolverUseIp).append(", ").append("}").toString();
.append(sessionedClientReconnectIntervalSeconds)
.append(", ")
.append("retryableClientQuarantineRefreshPercentage=")
.append(retryableClientQuarantineRefreshPercentage)
.append(", ")
.append("bootstrapResolverRefreshIntervalSeconds=")
.append(bootstrapResolverRefreshIntervalSeconds)
.append(", ")
.append("applicationsResolverDataStalenessThresholdSeconds=")
.append(applicationsResolverDataStalenessThresholdSeconds)
.append(", ")
.append("asyncResolverRefreshIntervalMs=")
.append(asyncResolverRefreshIntervalMs)
.append(", ")
.append("asyncResolverWarmUpTimeoutMs=")
.append(asyncResolverWarmUpTimeoutMs)
.append(", ")
.append("asyncExecutorThreadPoolSize=")
.append(asyncExecutorThreadPoolSize)
.append(", ")
.append("readClusterVip='")
.append(readClusterVip)
.append("', ")
.append("writeClusterVip='")
.append(writeClusterVip)
.append("', ")
.append("bootstrapResolverForQuery=")
.append(bootstrapResolverForQuery)
.append(", ")
.append("bootstrapResolverStrategy='")
.append(bootstrapResolverStrategy)
.append("', ")
.append("applicationsResolverUseIp=")
.append(applicationsResolverUseIp)
.append(", ")
.append("}")
.toString();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -103,6 +103,7 @@ import static org.springframework.cloud.commons.util.IdUtils.getDefaultInstanceI
* @author Daniel Lavoie
* @author Olga Maciaszek-Sharma
* @author Tim Ysewyn
* @author Robert Bleyl
*/
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties
@@ -224,8 +225,8 @@ public class EurekaClientAutoConfiguration {
}
@Bean
public EurekaServiceRegistry eurekaServiceRegistry() {
return new EurekaServiceRegistry();
public EurekaServiceRegistry eurekaServiceRegistry(EurekaInstanceConfigBean eurekaInstanceConfigBean) {
return new EurekaServiceRegistry(eurekaInstanceConfigBean);
}
// @Bean
@@ -257,7 +258,7 @@ public class EurekaClientAutoConfiguration {
@Autowired
private ApplicationContext context;
@Autowired
@Autowired(required = false)
private AbstractDiscoveryClientOptionalArgs<?> optionalArgs;
@Bean(destroyMethod = "shutdown")
@@ -280,8 +281,11 @@ public class EurekaClientAutoConfiguration {
public EurekaRegistration eurekaRegistration(EurekaClient eurekaClient,
CloudEurekaInstanceConfig instanceConfig, ApplicationInfoManager applicationInfoManager,
@Autowired(required = false) ObjectProvider<HealthCheckHandler> healthCheckHandler) {
return EurekaRegistration.builder(instanceConfig).with(applicationInfoManager).with(eurekaClient)
.with(healthCheckHandler).build();
return EurekaRegistration.builder(instanceConfig)
.with(applicationInfoManager)
.with(eurekaClient)
.with(healthCheckHandler)
.build();
}
}
@@ -293,7 +297,7 @@ public class EurekaClientAutoConfiguration {
@Autowired
private ApplicationContext context;
@Autowired
@Autowired(required = false)
private AbstractDiscoveryClientOptionalArgs<?> optionalArgs;
@Bean(destroyMethod = "shutdown")
@@ -307,7 +311,7 @@ public class EurekaClientAutoConfiguration {
// problem
// when shutdown is called on the CloudEurekaClient where the
// ApplicationInfoManager bean is
// requested but wont be allowed because we are shutting down. To avoid this
// requested but won't be allowed because we are shutting down. To avoid this
// we use the
// object directly.
ApplicationInfoManager appManager;
@@ -339,8 +343,11 @@ public class EurekaClientAutoConfiguration {
public EurekaRegistration eurekaRegistration(EurekaClient eurekaClient,
CloudEurekaInstanceConfig instanceConfig, ApplicationInfoManager applicationInfoManager,
@Autowired(required = false) ObjectProvider<HealthCheckHandler> healthCheckHandler) {
return EurekaRegistration.builder(instanceConfig).with(applicationInfoManager).with(eurekaClient)
.with(healthCheckHandler).build();
return EurekaRegistration.builder(instanceConfig)
.with(applicationInfoManager)
.with(eurekaClient)
.with(healthCheckHandler)
.build();
}
}
@@ -410,75 +417,30 @@ class EurekaClientHints implements RuntimeHintsRegistrar {
if (!ClassUtils.isPresent("com.netflix.discovery.DiscoveryClient", classLoader)) {
return;
}
hints.reflection().registerType(TypeReference.of(DiscoveryClient.class),
hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS, MemberCategory.INTROSPECT_DECLARED_METHODS))
.registerType(TypeReference.of(EurekaEndpoint.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS))
.registerType(TypeReference.of(DefaultEndpoint.class),
hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS, MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS))
.registerType(TypeReference.of(EurekaHttpClientDecorator.class),
hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS,
MemberCategory.INTROSPECT_DECLARED_METHODS))
.registerType(TypeReference.of(EurekaHttpResponse.class),
hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS, MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS))
.registerType(TypeReference.of(EurekaHttpClientDecorator.RequestExecutor.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS))
.registerType(TypeReference.of(ApplicationInfoManager.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS))
.registerType(TypeReference.of(InstanceInfo.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS))
.registerType(TypeReference.of(InstanceInfo.ActionType.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(InstanceInfo.PortWrapper.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(LeaseInfo.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(MyDataCenterInfo.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(DataCenterInfo.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(DataCenterInfo.Name.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(EurekaClient.class),
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS))
.registerType(TypeReference.of(TimedSupervisorTask.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(DataCenterTypeInfoResolver.class),
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS))
.registerType(TypeReference.of(ApplicationsJacksonBuilder.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(InstanceInfoJsonMixIn.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(Application.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(Applications.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(AsyncResolver.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(RetryableEurekaHttpClient.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(SessionedEurekaHttpClient.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.DECLARED_FIELDS))
.registerType(TypeReference.of(EurekaServiceInstance.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS));
hints.reflection()
.registerTypes(TypeReference.listOf(ApplicationInfoManager.class),
hint -> hint.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS))
.registerTypes(
TypeReference.listOf(DiscoveryClient.class, EurekaHttpClientDecorator.class,
InstanceInfo.ActionType.class, InstanceInfoJsonMixIn.class, SessionedEurekaHttpClient.class,
RetryableEurekaHttpClient.class, AsyncResolver.class, Applications.class,
TimedSupervisorTask.class),
hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS,
MemberCategory.INTROSPECT_DECLARED_METHODS))
.registerTypes(
TypeReference.listOf(EurekaEndpoint.class, EurekaHttpClientDecorator.RequestExecutor.class,
EurekaClient.class, DiscoveryClient.class),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS))
.registerTypes(TypeReference.listOf(DataCenterTypeInfoResolver.class),
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS))
.registerTypes(TypeReference.listOf(Application.class),
hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS, MemberCategory.INTROSPECT_DECLARED_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS))
.registerTypes(TypeReference.listOf(DefaultEndpoint.class, EurekaHttpResponse.class, InstanceInfo.class,
InstanceInfo.PortWrapper.class, LeaseInfo.class, MyDataCenterInfo.class, DataCenterInfo.class,
DataCenterInfo.Name.class, ApplicationsJacksonBuilder.class, EurekaServiceInstance.class),
hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS, MemberCategory.INVOKE_DECLARED_METHODS,
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -41,6 +41,7 @@ import static org.springframework.cloud.netflix.eureka.EurekaConstants.DEFAULT_P
*
* @author Dave Syer
* @author Gregor Zurowski
* @author Mooyong Lee
*/
@ConfigurationProperties(EurekaClientConfigBean.PREFIX)
public class EurekaClientConfigBean implements EurekaClientConfig, Ordered {
@@ -60,8 +61,6 @@ public class EurekaClientConfigBean implements EurekaClientConfig, Ordered {
*/
public static final String DEFAULT_ZONE = "defaultZone";
private static final int MINUTES = 60;
@Autowired(required = false)
PropertyResolver propertyResolver;
@@ -96,7 +95,7 @@ public class EurekaClientConfigBean implements EurekaClientConfig, Ordered {
* Eureka servers could be added or removed and this setting controls how soon the
* eureka clients should know about it.
*/
private int eurekaServiceUrlPollIntervalSeconds = 5 * MINUTES;
private int eurekaServiceUrlPollIntervalSeconds = 300; // 5 * MINUTES
/**
* Gets the proxy port to eureka server if any.
@@ -998,47 +997,147 @@ public class EurekaClientConfigBean implements EurekaClientConfig, Ordered {
@Override
public String toString() {
return new StringBuilder("EurekaClientConfigBean{").append("propertyResolver=").append(propertyResolver)
.append(", ").append("enabled=").append(enabled).append(", ").append("transport=").append(transport)
.append(", ").append("registryFetchIntervalSeconds=").append(registryFetchIntervalSeconds).append(", ")
.append("instanceInfoReplicationIntervalSeconds=").append(instanceInfoReplicationIntervalSeconds)
.append(", ").append("initialInstanceInfoReplicationIntervalSeconds=")
.append(initialInstanceInfoReplicationIntervalSeconds).append(", ")
.append("eurekaServiceUrlPollIntervalSeconds=").append(eurekaServiceUrlPollIntervalSeconds).append(", ")
.append("proxyPort='").append(proxyPort).append("', ").append("proxyHost='").append(proxyHost)
.append("', ").append("proxyUserName='").append(proxyUserName).append("', ").append("proxyPassword='")
.append(proxyPassword).append("', ").append("eurekaServerReadTimeoutSeconds=")
.append(eurekaServerReadTimeoutSeconds).append(", ").append("eurekaServerConnectTimeoutSeconds=")
.append(eurekaServerConnectTimeoutSeconds).append(", ").append("backupRegistryImpl='")
.append(backupRegistryImpl).append("', ").append("eurekaServerTotalConnections=")
.append(eurekaServerTotalConnections).append(", ").append("eurekaServerTotalConnectionsPerHost=")
.append(eurekaServerTotalConnectionsPerHost).append(", ").append("eurekaServerURLContext='")
.append(eurekaServerURLContext).append("', ").append("eurekaServerPort='").append(eurekaServerPort)
.append("', ").append("eurekaServerDNSName='").append(eurekaServerDNSName).append("', ")
.append("region='").append(region).append("', ").append("eurekaConnectionIdleTimeoutSeconds=")
.append(eurekaConnectionIdleTimeoutSeconds).append(", ").append("registryRefreshSingleVipAddress='")
.append(registryRefreshSingleVipAddress).append("', ").append("heartbeatExecutorThreadPoolSize=")
.append(heartbeatExecutorThreadPoolSize).append(", ")
.append("heartbeatExecutorExponentialBackOffBound=").append(heartbeatExecutorExponentialBackOffBound)
.append(", ").append("cacheRefreshExecutorThreadPoolSize=").append(cacheRefreshExecutorThreadPoolSize)
.append(", ").append("cacheRefreshExecutorExponentialBackOffBound=")
.append(cacheRefreshExecutorExponentialBackOffBound).append(", ").append("serviceUrl=")
.append(serviceUrl).append(", ").append("gZipContent=").append(gZipContent).append(", ")
.append("useDnsForFetchingServiceUrls=").append(useDnsForFetchingServiceUrls).append(", ")
.append("registerWithEureka=").append(registerWithEureka).append(", ").append("preferSameZoneEureka=")
.append(preferSameZoneEureka).append(", ").append("logDeltaDiff=").append(logDeltaDiff).append(", ")
.append("disableDelta=").append(disableDelta).append(", ").append("fetchRemoteRegionsRegistry='")
.append(fetchRemoteRegionsRegistry).append("', ").append("availabilityZones=").append(availabilityZones)
.append(", ").append("filterOnlyUpInstances=").append(filterOnlyUpInstances).append(", ")
.append("fetchRegistry=").append(fetchRegistry).append(", ").append("dollarReplacement='")
.append(dollarReplacement).append("', ").append("escapeCharReplacement='").append(escapeCharReplacement)
.append("', ").append("allowRedirects=").append(allowRedirects).append(", ")
.append("onDemandUpdateStatusChange=").append(onDemandUpdateStatusChange).append(", ")
.append("encoderName='").append(encoderName).append("', ").append("decoderName='").append(decoderName)
.append("', ").append("clientDataAccept='").append(clientDataAccept).append("', ")
.append("shouldUnregisterOnShutdown='").append(shouldUnregisterOnShutdown)
.append("shouldEnforceRegistrationAtInit='").append(shouldEnforceRegistrationAtInit).append("', ")
.append("order='").append(order).append("'}").toString();
return new StringBuilder("EurekaClientConfigBean{").append("propertyResolver=")
.append(propertyResolver)
.append(", ")
.append("enabled=")
.append(enabled)
.append(", ")
.append("transport=")
.append(transport)
.append(", ")
.append("registryFetchIntervalSeconds=")
.append(registryFetchIntervalSeconds)
.append(", ")
.append("instanceInfoReplicationIntervalSeconds=")
.append(instanceInfoReplicationIntervalSeconds)
.append(", ")
.append("initialInstanceInfoReplicationIntervalSeconds=")
.append(initialInstanceInfoReplicationIntervalSeconds)
.append(", ")
.append("eurekaServiceUrlPollIntervalSeconds=")
.append(eurekaServiceUrlPollIntervalSeconds)
.append(", ")
.append("proxyPort='")
.append(proxyPort)
.append("', ")
.append("proxyHost='")
.append(proxyHost)
.append("', ")
.append("proxyUserName='")
.append(proxyUserName)
.append("', ")
.append("proxyPassword='")
.append(proxyPassword)
.append("', ")
.append("eurekaServerReadTimeoutSeconds=")
.append(eurekaServerReadTimeoutSeconds)
.append(", ")
.append("eurekaServerConnectTimeoutSeconds=")
.append(eurekaServerConnectTimeoutSeconds)
.append(", ")
.append("backupRegistryImpl='")
.append(backupRegistryImpl)
.append("', ")
.append("eurekaServerTotalConnections=")
.append(eurekaServerTotalConnections)
.append(", ")
.append("eurekaServerTotalConnectionsPerHost=")
.append(eurekaServerTotalConnectionsPerHost)
.append(", ")
.append("eurekaServerURLContext='")
.append(eurekaServerURLContext)
.append("', ")
.append("eurekaServerPort='")
.append(eurekaServerPort)
.append("', ")
.append("eurekaServerDNSName='")
.append(eurekaServerDNSName)
.append("', ")
.append("region='")
.append(region)
.append("', ")
.append("eurekaConnectionIdleTimeoutSeconds=")
.append(eurekaConnectionIdleTimeoutSeconds)
.append(", ")
.append("registryRefreshSingleVipAddress='")
.append(registryRefreshSingleVipAddress)
.append("', ")
.append("heartbeatExecutorThreadPoolSize=")
.append(heartbeatExecutorThreadPoolSize)
.append(", ")
.append("heartbeatExecutorExponentialBackOffBound=")
.append(heartbeatExecutorExponentialBackOffBound)
.append(", ")
.append("cacheRefreshExecutorThreadPoolSize=")
.append(cacheRefreshExecutorThreadPoolSize)
.append(", ")
.append("cacheRefreshExecutorExponentialBackOffBound=")
.append(cacheRefreshExecutorExponentialBackOffBound)
.append(", ")
.append("serviceUrl=")
.append(serviceUrl)
.append(", ")
.append("gZipContent=")
.append(gZipContent)
.append(", ")
.append("useDnsForFetchingServiceUrls=")
.append(useDnsForFetchingServiceUrls)
.append(", ")
.append("registerWithEureka=")
.append(registerWithEureka)
.append(", ")
.append("preferSameZoneEureka=")
.append(preferSameZoneEureka)
.append(", ")
.append("logDeltaDiff=")
.append(logDeltaDiff)
.append(", ")
.append("disableDelta=")
.append(disableDelta)
.append(", ")
.append("fetchRemoteRegionsRegistry='")
.append(fetchRemoteRegionsRegistry)
.append("', ")
.append("availabilityZones=")
.append(availabilityZones)
.append(", ")
.append("filterOnlyUpInstances=")
.append(filterOnlyUpInstances)
.append(", ")
.append("fetchRegistry=")
.append(fetchRegistry)
.append(", ")
.append("dollarReplacement='")
.append(dollarReplacement)
.append("', ")
.append("escapeCharReplacement='")
.append(escapeCharReplacement)
.append("', ")
.append("allowRedirects=")
.append(allowRedirects)
.append(", ")
.append("onDemandUpdateStatusChange=")
.append(onDemandUpdateStatusChange)
.append(", ")
.append("encoderName='")
.append(encoderName)
.append("', ")
.append("decoderName='")
.append(decoderName)
.append("', ")
.append("clientDataAccept='")
.append(clientDataAccept)
.append("', ")
.append("shouldUnregisterOnShutdown='")
.append(shouldUnregisterOnShutdown)
.append("shouldEnforceRegistrationAtInit='")
.append(shouldEnforceRegistrationAtInit)
.append("', ")
.append("order='")
.append(order)
.append("'}")
.toString();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -19,6 +19,7 @@ package org.springframework.cloud.netflix.eureka;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.EurekaClient;
@@ -35,6 +36,7 @@ import org.springframework.core.Ordered;
*
* @author Spencer Gibb
* @author Tim Ysewyn
* @author Olga Maciaszek-Sharma
*/
public class EurekaDiscoveryClient implements DiscoveryClient {
@@ -79,7 +81,7 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
if (app.getInstances().isEmpty()) {
continue;
}
names.add(app.getName().toLowerCase());
names.add(app.getName().toLowerCase(Locale.ROOT));
}
return names;
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -84,8 +84,9 @@ public class EurekaDiscoveryClientConfiguration {
private EurekaAutoServiceRegistration autoRegistration;
public void onApplicationEvent(RefreshScopeRefreshedEvent event) {
// This will force the creation of the EurkaClient bean if not already created
// to make sure the client will be reregistered after a refresh event
// This will force the creation of the EurekaClient bean if not already
// created
// to make sure the client will be re-registered after a refresh event
if (eurekaClient != null) {
eurekaClient.getApplications();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -38,6 +38,7 @@ import org.springframework.util.StringUtils;
* @author Spencer Gibb
* @author Ryan Baxter
* @author Gregor Zurowski
* @author Robert Bleyl
*/
@ConfigurationProperties("eureka.instance")
public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, EnvironmentAware {
@@ -269,6 +270,12 @@ public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, Envi
*/
private boolean preferIpAddress = false;
/**
* If true the EurekaClient will be initialized asynchronously when the
* InstanceRegistry bean is created.
*/
private boolean asyncClientInitialization;
/**
* Initial status to register with remote Eureka server.
*/
@@ -547,6 +554,14 @@ public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, Envi
this.preferIpAddress = preferIpAddress;
}
public boolean isAsyncClientInitialization() {
return asyncClientInitialization;
}
public void setAsyncClientInitialization(boolean asyncClientInitialization) {
this.asyncClientInitialization = asyncClientInitialization;
}
public InstanceStatus getInitialStatus() {
return initialStatus;
}
@@ -597,6 +612,7 @@ public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, Envi
&& Objects.equals(namespace, that.namespace) && Objects.equals(hostname, that.hostname)
&& preferIpAddress == that.preferIpAddress && Objects.equals(initialStatus, that.initialStatus)
&& Arrays.equals(defaultAddressResolutionOrder, that.defaultAddressResolutionOrder)
&& asyncClientInitialization == that.asyncClientInitialization
&& Objects.equals(environment, that.environment);
}
@@ -607,34 +623,109 @@ public class EurekaInstanceConfigBean implements CloudEurekaInstanceConfig, Envi
leaseExpirationDurationInSeconds, virtualHostName, instanceId, secureVirtualHostName, aSGName,
metadataMap, dataCenterInfo, ipAddress, statusPageUrlPath, statusPageUrl, homePageUrlPath, homePageUrl,
healthCheckUrlPath, healthCheckUrl, secureHealthCheckUrl, namespace, hostname, preferIpAddress,
initialStatus, Arrays.hashCode(defaultAddressResolutionOrder), environment);
asyncClientInitialization, initialStatus, Arrays.hashCode(defaultAddressResolutionOrder), environment);
}
@Override
public String toString() {
return new StringBuilder("EurekaInstanceConfigBean{").append("hostInfo=").append(hostInfo).append(", ")
.append("inetUtils=").append(inetUtils).append(", ").append("appname='").append(appname).append("', ")
.append("appGroupName='").append(appGroupName).append("', ").append("instanceEnabledOnit=")
.append(instanceEnabledOnit).append(", ").append("nonSecurePort=").append(nonSecurePort).append(", ")
.append("securePort=").append(securePort).append(", ").append("nonSecurePortEnabled=")
.append(nonSecurePortEnabled).append(", ").append("securePortEnabled=").append(securePortEnabled)
.append(", ").append("leaseRenewalIntervalInSeconds=").append(leaseRenewalIntervalInSeconds)
.append(", ").append("leaseExpirationDurationInSeconds=").append(leaseExpirationDurationInSeconds)
.append(", ").append("virtualHostName='").append(virtualHostName).append("', ").append("instanceId='")
.append(instanceId).append("', ").append("secureVirtualHostName='").append(secureVirtualHostName)
.append("', ").append("aSGName='").append(aSGName).append("', ").append("metadataMap=")
.append(metadataMap).append(", ").append("dataCenterInfo=").append(dataCenterInfo).append(", ")
.append("ipAddress='").append(ipAddress).append("', ").append("statusPageUrlPath='")
.append(statusPageUrlPath).append("', ").append("statusPageUrl='").append(statusPageUrl).append("', ")
.append("homePageUrlPath='").append(homePageUrlPath).append("', ").append("homePageUrl='")
.append(homePageUrl).append("', ").append("healthCheckUrlPath='").append(healthCheckUrlPath)
.append("', ").append("healthCheckUrl='").append(healthCheckUrl).append("', ")
.append("secureHealthCheckUrl='").append(secureHealthCheckUrl).append("', ").append("namespace='")
.append(namespace).append("', ").append("hostname='").append(hostname).append("', ")
.append("preferIpAddress=").append(preferIpAddress).append(", ").append("initialStatus=")
.append(initialStatus).append(", ").append("defaultAddressResolutionOrder=")
.append(Arrays.toString(defaultAddressResolutionOrder)).append(", ").append("environment=")
.append(environment).append(", ").append("}").toString();
return new StringBuilder("EurekaInstanceConfigBean{").append("hostInfo=")
.append(hostInfo)
.append(", ")
.append("inetUtils=")
.append(inetUtils)
.append(", ")
.append("appname='")
.append(appname)
.append("', ")
.append("appGroupName='")
.append(appGroupName)
.append("', ")
.append("instanceEnabledOnit=")
.append(instanceEnabledOnit)
.append(", ")
.append("nonSecurePort=")
.append(nonSecurePort)
.append(", ")
.append("securePort=")
.append(securePort)
.append(", ")
.append("nonSecurePortEnabled=")
.append(nonSecurePortEnabled)
.append(", ")
.append("securePortEnabled=")
.append(securePortEnabled)
.append(", ")
.append("leaseRenewalIntervalInSeconds=")
.append(leaseRenewalIntervalInSeconds)
.append(", ")
.append("leaseExpirationDurationInSeconds=")
.append(leaseExpirationDurationInSeconds)
.append(", ")
.append("virtualHostName='")
.append(virtualHostName)
.append("', ")
.append("instanceId='")
.append(instanceId)
.append("', ")
.append("secureVirtualHostName='")
.append(secureVirtualHostName)
.append("', ")
.append("aSGName='")
.append(aSGName)
.append("', ")
.append("metadataMap=")
.append(metadataMap)
.append(", ")
.append("dataCenterInfo=")
.append(dataCenterInfo)
.append(", ")
.append("ipAddress='")
.append(ipAddress)
.append("', ")
.append("statusPageUrlPath='")
.append(statusPageUrlPath)
.append("', ")
.append("statusPageUrl='")
.append(statusPageUrl)
.append("', ")
.append("homePageUrlPath='")
.append(homePageUrlPath)
.append("', ")
.append("homePageUrl='")
.append(homePageUrl)
.append("', ")
.append("healthCheckUrlPath='")
.append(healthCheckUrlPath)
.append("', ")
.append("healthCheckUrl='")
.append(healthCheckUrl)
.append("', ")
.append("secureHealthCheckUrl='")
.append(secureHealthCheckUrl)
.append("', ")
.append("namespace='")
.append(namespace)
.append("', ")
.append("hostname='")
.append(hostname)
.append("', ")
.append("asyncClientInitialization=")
.append(asyncClientInitialization)
.append(", ")
.append("preferIpAddress=")
.append(preferIpAddress)
.append(", ")
.append("initialStatus=")
.append(initialStatus)
.append(", ")
.append("defaultAddressResolutionOrder=")
.append(Arrays.toString(defaultAddressResolutionOrder))
.append(", ")
.append("environment=")
.append(environment)
.append(", ")
.append("}")
.toString();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -35,8 +35,8 @@ public class InstanceInfoFactory {
public InstanceInfo create(EurekaInstanceConfig config) {
LeaseInfo.Builder leaseInfoBuilder = LeaseInfo.Builder.newBuilder()
.setRenewalIntervalInSecs(config.getLeaseRenewalIntervalInSeconds())
.setDurationInSecs(config.getLeaseExpirationDurationInSeconds());
.setRenewalIntervalInSecs(config.getLeaseRenewalIntervalInSeconds())
.setDurationInSecs(config.getLeaseExpirationDurationInSeconds());
// Builder the instance information to be registered with eureka
// server
@@ -46,19 +46,24 @@ public class InstanceInfoFactory {
if (!namespace.endsWith(".")) {
namespace = namespace + ".";
}
builder.setNamespace(namespace).setAppName(config.getAppname()).setInstanceId(config.getInstanceId())
.setAppGroupName(config.getAppGroupName()).setDataCenterInfo(config.getDataCenterInfo())
.setIPAddr(config.getIpAddress()).setHostName(config.getHostName(false))
.setPort(config.getNonSecurePort())
.enablePort(InstanceInfo.PortType.UNSECURE, config.isNonSecurePortEnabled())
.setSecurePort(config.getSecurePort())
.enablePort(InstanceInfo.PortType.SECURE, config.getSecurePortEnabled())
.setVIPAddress(config.getVirtualHostName()).setSecureVIPAddress(config.getSecureVirtualHostName())
.setHomePageUrl(config.getHomePageUrlPath(), config.getHomePageUrl())
.setStatusPageUrl(config.getStatusPageUrlPath(), config.getStatusPageUrl())
.setHealthCheckUrls(config.getHealthCheckUrlPath(), config.getHealthCheckUrl(),
config.getSecureHealthCheckUrl())
.setASGName(config.getASGName());
builder.setNamespace(namespace)
.setAppName(config.getAppname())
.setInstanceId(config.getInstanceId())
.setAppGroupName(config.getAppGroupName())
.setDataCenterInfo(config.getDataCenterInfo())
.setIPAddr(config.getIpAddress())
.setHostName(config.getHostName(false))
.setPort(config.getNonSecurePort())
.enablePort(InstanceInfo.PortType.UNSECURE, config.isNonSecurePortEnabled())
.setSecurePort(config.getSecurePort())
.enablePort(InstanceInfo.PortType.SECURE, config.getSecurePortEnabled())
.setVIPAddress(config.getVirtualHostName())
.setSecureVIPAddress(config.getSecureVirtualHostName())
.setHomePageUrl(config.getHomePageUrlPath(), config.getHomePageUrl())
.setStatusPageUrl(config.getStatusPageUrlPath(), config.getStatusPageUrl())
.setHealthCheckUrls(config.getHealthCheckUrlPath(), config.getHealthCheckUrl(),
config.getSecureHealthCheckUrl())
.setASGName(config.getASGName());
// Start off with the STARTING state to avoid traffic
if (!config.isInstanceEnabledOnit()) {
@@ -0,0 +1,37 @@
/*
* Copyright 2013-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.client.RestClient;
/**
* A {@link RestClient}-specific {@link TimeoutProperties} implementation.
*
* @author Olga Maciaszek-Sharma
* @since 4.2.0
*/
@ConfigurationProperties("eureka.client.restclient.timeout")
public class RestClientTimeoutProperties extends TimeoutProperties {
@Override
public String toString() {
return "RestClientTimeoutProperties{" + ", connectTimeout=" + connectTimeout + ", connectRequestTimeout="
+ connectRequestTimeout + ", socketTimeout=" + socketTimeout + '}';
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -16,78 +16,23 @@
package org.springframework.cloud.netflix.eureka;
import java.util.Objects;
import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.core5.http.io.SocketConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestTemplate;
/**
* Properties for configuring timeouts used in {@link RestTemplate} required by
* {@link RestTemplateEurekaHttpClient}.
* A {@link RestTemplate}-specific {@link TimeoutProperties} implementation.
*
* @author Jiwon Jeon
* @author Mooyong Lee
* @author Olga Maciaszek-Sharma
* @since 3.1.6
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Deprecated(forRemoval = true)
@ConfigurationProperties("eureka.client.rest-template-timeout")
public class RestTemplateTimeoutProperties {
/**
* Default values are set to 180000, in keeping with {@link RequestConfig} and
* {@link SocketConfig} defaults.
*/
private int connectTimeout = 3 * 60 * 1000;
private int connectRequestTimeout = 3 * 60 * 1000;
private int socketTimeout = 3 * 60 * 1000;
public int getConnectTimeout() {
return connectTimeout;
}
public int getConnectRequestTimeout() {
return connectRequestTimeout;
}
public int getSocketTimeout() {
return socketTimeout;
}
public void setConnectTimeout(int connectTimeout) {
this.connectTimeout = connectTimeout;
}
public void setConnectRequestTimeout(int connectRequestTimeout) {
this.connectRequestTimeout = connectRequestTimeout;
}
public void setSocketTimeout(int socketTimeout) {
this.socketTimeout = socketTimeout;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RestTemplateTimeoutProperties that = (RestTemplateTimeoutProperties) o;
return connectTimeout == that.connectTimeout && connectRequestTimeout == that.connectRequestTimeout
&& socketTimeout == that.socketTimeout;
}
@Override
public int hashCode() {
return Objects.hash(connectTimeout, connectRequestTimeout, socketTimeout);
}
public class RestTemplateTimeoutProperties extends TimeoutProperties {
@Override
public String toString() {
@@ -0,0 +1,92 @@
/*
* Copyright 2013-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka;
import java.util.Objects;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.core5.http.io.SocketConfig;
import org.springframework.web.client.RestTemplate;
/**
* Properties for configuring timeouts used in {@link RestTemplate} required by
* {@link EurekaHttpClient}.
*
* @author Jiwon Jeon
* @author Mooyong Lee
* @author Olga Maciaszek-Sharma
* @since 4.2.0
*/
public abstract class TimeoutProperties {
/**
* Default values are set to 180000, in keeping with {@link RequestConfig} and
* {@link SocketConfig} defaults.
*/
protected int connectTimeout = 180000; // 3 * MINUTES
protected int connectRequestTimeout = 180000; // 3 * MINUTES
protected int socketTimeout = 180000; // 3 * MINUTES
public int getConnectTimeout() {
return connectTimeout;
}
public int getConnectRequestTimeout() {
return connectRequestTimeout;
}
public int getSocketTimeout() {
return socketTimeout;
}
public void setConnectTimeout(int connectTimeout) {
this.connectTimeout = connectTimeout;
}
public void setConnectRequestTimeout(int connectRequestTimeout) {
this.connectRequestTimeout = connectRequestTimeout;
}
public void setSocketTimeout(int socketTimeout) {
this.socketTimeout = socketTimeout;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RestTemplateTimeoutProperties that = (RestTemplateTimeoutProperties) o;
return connectTimeout == that.connectTimeout && connectRequestTimeout == that.connectRequestTimeout
&& socketTimeout == that.socketTimeout;
}
@Override
public int hashCode() {
return Objects.hash(connectTimeout, connectRequestTimeout, socketTimeout);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -18,6 +18,7 @@ package org.springframework.cloud.netflix.eureka.config;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.Set;
import com.netflix.discovery.AbstractDiscoveryClientOptionalArgs;
import com.netflix.discovery.shared.transport.jersey.TransportClientFactories;
@@ -25,7 +26,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
import org.springframework.boot.autoconfigure.condition.AnyNestedCondition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -34,24 +36,34 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.SearchStrategy;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.configuration.SSLContextFactory;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.cloud.netflix.eureka.RestClientTimeoutProperties;
import org.springframework.cloud.netflix.eureka.RestTemplateTimeoutProperties;
import org.springframework.cloud.netflix.eureka.http.DefaultEurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.EurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.RestClientDiscoveryClientOptionalArgs;
import org.springframework.cloud.netflix.eureka.http.RestClientTransportClientFactories;
import org.springframework.cloud.netflix.eureka.http.RestTemplateDiscoveryClientOptionalArgs;
import org.springframework.cloud.netflix.eureka.http.RestTemplateTransportClientFactories;
import org.springframework.cloud.netflix.eureka.http.WebClientDiscoveryClientOptionalArgs;
import org.springframework.cloud.netflix.eureka.http.WebClientTransportClientFactories;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.reactive.function.client.WebClient;
/**
* @author Daniel Lavoie
* @author Armin Krezovic
* @author Olga Maciaszek-Sharma
* @author Wonchul Heo
*/
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(RestTemplateTimeoutProperties.class)
@EnableConfigurationProperties({ RestTemplateTimeoutProperties.class, RestClientTimeoutProperties.class })
public class DiscoveryClientOptionalArgsConfiguration {
protected static final Log logger = LogFactory.getLog(DiscoveryClientOptionalArgsConfiguration.class);
@@ -62,42 +74,8 @@ public class DiscoveryClientOptionalArgsConfiguration {
return new TlsProperties();
}
@Bean
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
@ConditionalOnMissingClass("org.glassfish.jersey.client.JerseyClient")
@ConditionalOnMissingBean(value = { AbstractDiscoveryClientOptionalArgs.class }, search = SearchStrategy.CURRENT)
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", matchIfMissing = true,
havingValue = "false")
public RestTemplateDiscoveryClientOptionalArgs restTemplateDiscoveryClientOptionalArgs(TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier)
throws GeneralSecurityException, IOException {
logger.info("Eureka HTTP Client uses RestTemplate.");
RestTemplateDiscoveryClientOptionalArgs result = new RestTemplateDiscoveryClientOptionalArgs(
eurekaClientHttpRequestFactorySupplier);
setupTLS(result, tlsProperties);
return result;
}
@Bean
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
@ConditionalOnMissingClass("org.glassfish.jersey.client.JerseyClient")
@ConditionalOnMissingBean(value = { TransportClientFactories.class }, search = SearchStrategy.CURRENT)
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", matchIfMissing = true,
havingValue = "false")
public RestTemplateTransportClientFactories restTemplateTransportClientFactories(
RestTemplateDiscoveryClientOptionalArgs optionalArgs) {
return new RestTemplateTransportClientFactories(optionalArgs);
}
@Bean
@ConditionalOnMissingBean
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
EurekaClientHttpRequestFactorySupplier defaultEurekaClientHttpRequestFactorySupplier(
RestTemplateTimeoutProperties restTemplateTimeoutProperties) {
return new DefaultEurekaClientHttpRequestFactorySupplier(restTemplateTimeoutProperties);
}
private static void setupTLS(AbstractDiscoveryClientOptionalArgs<?> args, TlsProperties properties)
// Visible for tests
public static void setupTLS(AbstractDiscoveryClientOptionalArgs<?> args, TlsProperties properties)
throws GeneralSecurityException, IOException {
if (properties.isEnabled()) {
SSLContextFactory factory = new SSLContextFactory(properties);
@@ -105,34 +83,79 @@ public class DiscoveryClientOptionalArgsConfiguration {
}
}
/**
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(name = "org.glassfish.jersey.client.JerseyClient")
@Conditional(OnRestTemplatePresentAndEnabledCondition.class)
@Deprecated
static class RestTemplateConfiguration {
@Bean
@ConditionalOnMissingBean
EurekaClientHttpRequestFactorySupplier defaultEurekaClientHttpRequestFactorySupplier(
RestTemplateTimeoutProperties restTemplateTimeoutProperties,
Set<EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer> requestConfigCustomizers) {
return new DefaultEurekaClientHttpRequestFactorySupplier(restTemplateTimeoutProperties,
requestConfigCustomizers);
}
@Bean
@ConditionalOnMissingBean(value = { AbstractDiscoveryClientOptionalArgs.class },
search = SearchStrategy.CURRENT)
public RestTemplateDiscoveryClientOptionalArgs restTemplateDiscoveryClientOptionalArgs(
TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
ObjectProvider<RestTemplateBuilder> restTemplateBuilders) throws GeneralSecurityException, IOException {
if (logger.isInfoEnabled()) {
logger.info("Eureka HTTP Client uses RestTemplate.");
}
RestTemplateDiscoveryClientOptionalArgs result = new RestTemplateDiscoveryClientOptionalArgs(
eurekaClientHttpRequestFactorySupplier, restTemplateBuilders::getIfAvailable);
setupTLS(result, tlsProperties);
return result;
}
@Bean
@ConditionalOnMissingBean(value = { TransportClientFactories.class }, search = SearchStrategy.CURRENT)
public RestTemplateTransportClientFactories restTemplateTransportClientFactories(
RestTemplateDiscoveryClientOptionalArgs optionalArgs) {
return new RestTemplateTransportClientFactories(optionalArgs);
}
}
@Configuration(proxyBeanMethods = false)
@Conditional(OnJerseyClientPresentAndEnabledCondition.class)
@ConditionalOnBean(value = AbstractDiscoveryClientOptionalArgs.class, search = SearchStrategy.CURRENT)
static class DiscoveryClientOptionalArgsTlsConfiguration {
DiscoveryClientOptionalArgsTlsConfiguration(TlsProperties tlsProperties,
AbstractDiscoveryClientOptionalArgs optionalArgs) throws GeneralSecurityException, IOException {
logger.info("Eureka HTTP Client uses Jersey");
if (logger.isInfoEnabled()) {
logger.info("Eureka HTTP Client uses Jersey");
}
setupTLS(optionalArgs, tlsProperties);
}
}
@ConditionalOnMissingClass("org.glassfish.jersey.client.JerseyClient")
@Configuration(proxyBeanMethods = false)
@Conditional(OnJerseyClientNotPresentOrNotEnabledCondition.class)
@ConditionalOnClass(name = "org.springframework.web.reactive.function.client.WebClient")
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", havingValue = "true")
protected static class WebClientConfiguration {
@Autowired
private TlsProperties tlsProperties;
@Bean
@ConditionalOnMissingBean(
value = { AbstractDiscoveryClientOptionalArgs.class, RestTemplateDiscoveryClientOptionalArgs.class },
search = SearchStrategy.CURRENT)
public WebClientDiscoveryClientOptionalArgs webClientDiscoveryClientOptionalArgs(
public WebClientDiscoveryClientOptionalArgs webClientDiscoveryClientOptionalArgs(TlsProperties tlsProperties,
ObjectProvider<WebClient.Builder> builder) throws GeneralSecurityException, IOException {
logger.info("Eureka HTTP Client uses WebClient.");
if (logger.isInfoEnabled()) {
logger.info("Eureka HTTP Client uses WebClient.");
}
WebClientDiscoveryClientOptionalArgs result = new WebClientDiscoveryClientOptionalArgs(
builder::getIfAvailable);
setupTLS(result, tlsProperties);
@@ -148,9 +171,9 @@ public class DiscoveryClientOptionalArgsConfiguration {
}
@Configuration
@ConditionalOnMissingClass({ "org.glassfish.jersey.client.JerseyClient",
"org.springframework.web.reactive.function.client.WebClient" })
@Configuration(proxyBeanMethods = false)
@Conditional(OnJerseyClientNotPresentOrNotEnabledCondition.class)
@ConditionalOnMissingClass("org.springframework.web.reactive.function.client.WebClient")
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", havingValue = "true")
protected static class WebClientNotFoundConfiguration {
@@ -162,4 +185,143 @@ public class DiscoveryClientOptionalArgsConfiguration {
}
@Configuration(proxyBeanMethods = false)
@Conditional(OnRestClientPresentAndEnabledCondition.class)
protected static class RestClientConfiguration {
@Bean
@ConditionalOnMissingBean
EurekaClientHttpRequestFactorySupplier defaultEurekaClientHttpRequestFactorySupplier(
RestClientTimeoutProperties restClientTimeoutProperties,
Set<EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer> requestConfigCustomizers) {
return new DefaultEurekaClientHttpRequestFactorySupplier(restClientTimeoutProperties,
requestConfigCustomizers);
}
@Bean
@ConditionalOnMissingBean(value = { AbstractDiscoveryClientOptionalArgs.class },
search = SearchStrategy.CURRENT)
public RestClientDiscoveryClientOptionalArgs restClientDiscoveryClientOptionalArgs(TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
ObjectProvider<RestClient.Builder> restClientBuilderProvider)
throws GeneralSecurityException, IOException {
if (logger.isInfoEnabled()) {
logger.info("Eureka HTTP Client uses RestClient.");
}
RestClientDiscoveryClientOptionalArgs result = new RestClientDiscoveryClientOptionalArgs(
eurekaClientHttpRequestFactorySupplier,
() -> restClientBuilderProvider.getIfAvailable(RestClient::builder));
setupTLS(result, tlsProperties);
return result;
}
@Bean
@ConditionalOnMissingBean(value = TransportClientFactories.class, search = SearchStrategy.CURRENT)
public RestClientTransportClientFactories restClientTransportClientFactories(
RestClientDiscoveryClientOptionalArgs args) {
return new RestClientTransportClientFactories(args);
}
}
static class OnJerseyClientPresentAndEnabledCondition extends AllNestedConditions {
OnJerseyClientPresentAndEnabledCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnClass(name = "org.glassfish.jersey.client.JerseyClient")
static class OnJerseyClientPresent {
}
@ConditionalOnProperty(value = "eureka.client.jersey.enabled", matchIfMissing = true)
static class OnJerseyClientEnabled {
}
}
static class OnJerseyClientNotPresentOrNotEnabledCondition extends AnyNestedCondition {
OnJerseyClientNotPresentOrNotEnabledCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnMissingClass("org.glassfish.jersey.client.JerseyClient")
static class OnJerseyClientMissing {
}
@ConditionalOnProperty(value = "eureka.client.jersey.enabled", havingValue = "false")
static class OnJerseyClientDisabled {
}
}
/**
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Deprecated(forRemoval = true)
static class OnRestTemplatePresentAndEnabledCondition extends AllNestedConditions {
OnRestTemplatePresentAndEnabledCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
static class OnRestTemplatePresent {
}
@Conditional(OnJerseyClientNotPresentOrNotEnabledCondition.class)
static class OnJerseyClientNotPresentOrNotEnabled {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", matchIfMissing = true,
havingValue = "false")
static class OnWebClientDisabled {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "restclient.enabled", havingValue = "false",
matchIfMissing = true)
static class OnRestClientDisabled {
}
}
static class OnRestClientPresentAndEnabledCondition extends AllNestedConditions {
OnRestClientPresentAndEnabledCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnClass(name = "org.springframework.web.client.RestClient")
static class OnRestClientPresent {
}
@Conditional(OnJerseyClientNotPresentOrNotEnabledCondition.class)
static class OnJerseyClientNotPresentOrNotEnabled {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", matchIfMissing = true,
havingValue = "false")
static class OnWebClientDisabled {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "restclient.enabled", havingValue = "true")
static class OnRestClientEnabled {
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -16,6 +16,8 @@
package org.springframework.cloud.netflix.eureka.config;
import java.util.Set;
import com.netflix.discovery.EurekaClientConfig;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
@@ -29,12 +31,17 @@ import org.springframework.boot.autoconfigure.condition.SearchStrategy;
import org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration;
import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.config.client.ConfigServerInstanceProvider;
import org.springframework.cloud.config.client.ConfigServicePropertySourceLocator;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.cloud.netflix.eureka.EurekaClientConfigBean;
import org.springframework.cloud.netflix.eureka.RestClientTimeoutProperties;
import org.springframework.cloud.netflix.eureka.RestTemplateTimeoutProperties;
import org.springframework.cloud.netflix.eureka.http.DefaultEurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.EurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.RestClientEurekaHttpClient;
import org.springframework.cloud.netflix.eureka.http.RestClientTransportClientFactory;
import org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient;
import org.springframework.cloud.netflix.eureka.http.RestTemplateTransportClientFactory;
import org.springframework.cloud.netflix.eureka.http.WebClientEurekaHttpClient;
@@ -44,18 +51,23 @@ import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.lang.Nullable;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.reactive.function.client.WebClient;
/**
* Bootstrap configuration for config client that wants to lookup the config server via
* Bootstrap configuration for config client that wants to look the config server up via
* discovery.
*
* @author Dave Syer
* @author Armin Krezovic
* @author Wonchul Heo
* @author Olga Maciaszek-Sharma
*/
@ConditionalOnClass(ConfigServicePropertySourceLocator.class)
@Conditional(EurekaConfigServerBootstrapConfiguration.EurekaConfigServerBootstrapCondition.class)
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties
@EnableConfigurationProperties({ RestTemplateTimeoutProperties.class, RestClientTimeoutProperties.class })
public class EurekaConfigServerBootstrapConfiguration {
@Bean
@@ -64,30 +76,73 @@ public class EurekaConfigServerBootstrapConfiguration {
return new EurekaClientConfigBean();
}
@Bean
@ConditionalOnMissingBean(EurekaHttpClient.class)
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", matchIfMissing = true,
havingValue = "false")
public RestTemplateEurekaHttpClient configDiscoveryRestTemplateEurekaHttpClient(EurekaClientConfigBean config,
Environment env, @Nullable TlsProperties properties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier) {
return (RestTemplateEurekaHttpClient) new RestTemplateTransportClientFactory(properties,
eurekaClientHttpRequestFactorySupplier)
.newClient(HostnameBasedUrlRandomizer.randomEndpoint(config, env));
}
@Bean
@ConditionalOnMissingBean
EurekaClientHttpRequestFactorySupplier defaultEurekaClientHttpRequestFactorySupplier() {
return new DefaultEurekaClientHttpRequestFactorySupplier();
}
@Bean
public ConfigServerInstanceProvider.Function eurekaConfigServerInstanceProvider(EurekaHttpClient client,
EurekaClientConfig config) {
return new EurekaConfigServerInstanceProvider(client, config)::getInstances;
}
/**
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Configuration(proxyBeanMethods = false)
@Conditional(RestTemplateConfiguration.OnRestTemplatePresentAndEnabledCondition.class)
@Deprecated
static class RestTemplateConfiguration {
@Bean
@ConditionalOnMissingBean(EurekaHttpClient.class)
public RestTemplateEurekaHttpClient configDiscoveryRestTemplateEurekaHttpClient(EurekaClientConfigBean config,
Environment env, @Nullable TlsProperties properties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
ObjectProvider<RestTemplateBuilder> restTemplateBuilders) {
return (RestTemplateEurekaHttpClient) new RestTemplateTransportClientFactory(properties,
eurekaClientHttpRequestFactorySupplier, restTemplateBuilders::getIfAvailable)
.newClient(HostnameBasedUrlRandomizer.randomEndpoint(config, env));
}
@Bean
@ConditionalOnMissingBean
EurekaClientHttpRequestFactorySupplier defaultEurekaClientHttpRequestFactorySupplier(
RestTemplateTimeoutProperties restTemplateTimeoutProperties,
Set<EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer> requestConfigCustomizers) {
return new DefaultEurekaClientHttpRequestFactorySupplier(restTemplateTimeoutProperties,
requestConfigCustomizers);
}
/**
* @deprecated {@link RestTemplate}-based implementation to be removed in favour
* of {@link RestClient}-based implementation.
*/
@Deprecated(forRemoval = true)
static class OnRestTemplatePresentAndEnabledCondition extends AllNestedConditions {
OnRestTemplatePresentAndEnabledCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnClass(name = "org.springframework.web.client.RestTemplate")
static class OnRestTemplatePresent {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", matchIfMissing = true,
havingValue = "false")
static class OnWebClientDisabled {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "restclient.enabled", havingValue = "false",
matchIfMissing = true)
static class OnRestClientDisabled {
}
}
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(name = "org.springframework.web.reactive.function.client.WebClient")
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", havingValue = "true")
@@ -99,7 +154,58 @@ public class EurekaConfigServerBootstrapConfiguration {
public WebClientEurekaHttpClient configDiscoveryWebClientEurekaHttpClient(EurekaClientConfigBean config,
ObjectProvider<WebClient.Builder> builder, Environment env) {
return (WebClientEurekaHttpClient) new WebClientTransportClientFactory(builder::getIfAvailable)
.newClient(HostnameBasedUrlRandomizer.randomEndpoint(config, env));
.newClient(HostnameBasedUrlRandomizer.randomEndpoint(config, env));
}
}
@Configuration(proxyBeanMethods = false)
@Conditional(RestClientConfiguration.OnRestClientPresentAndEnabledCondition.class)
static class RestClientConfiguration {
@Bean
@ConditionalOnMissingBean(EurekaHttpClient.class)
public RestClientEurekaHttpClient configDiscoveryRestClientEurekaHttpClient(EurekaClientConfigBean config,
@Nullable TlsProperties properties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
ObjectProvider<RestClient.Builder> restClientBuilderProvider, Environment env) {
return (RestClientEurekaHttpClient) new RestClientTransportClientFactory(properties,
eurekaClientHttpRequestFactorySupplier,
() -> restClientBuilderProvider.getIfAvailable(RestClient::builder))
.newClient(HostnameBasedUrlRandomizer.randomEndpoint(config, env));
}
@Bean
@ConditionalOnMissingBean
EurekaClientHttpRequestFactorySupplier defaultEurekaClientHttpRequestFactorySupplier(
RestClientTimeoutProperties restClientTimeoutProperties,
Set<EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer> requestConfigCustomizers) {
return new DefaultEurekaClientHttpRequestFactorySupplier(restClientTimeoutProperties,
requestConfigCustomizers);
}
static class OnRestClientPresentAndEnabledCondition extends AllNestedConditions {
OnRestClientPresentAndEnabledCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnClass(name = "org.springframework.web.client.RestClient")
static class OnRestClientPresentCondition {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "webclient.enabled", matchIfMissing = true,
havingValue = "false")
static class OnWebClientDisabled {
}
@ConditionalOnProperty(prefix = "eureka.client", name = "restclient.enabled", havingValue = "true")
static class OnRestClientEnabled {
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -17,24 +17,23 @@
package org.springframework.cloud.netflix.eureka.config;
import java.util.Collections;
import java.util.List;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
import org.apache.commons.logging.Log;
import org.springframework.boot.BootstrapContext;
import org.springframework.boot.BootstrapRegistry;
import org.springframework.boot.BootstrapRegistryInitializer;
import org.springframework.boot.context.properties.bind.BindHandler;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.config.client.ConfigClientProperties;
import org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver.PropertyResolver;
import org.springframework.cloud.config.client.ConfigServerInstanceProvider;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.cloud.netflix.eureka.EurekaClientConfigBean;
import org.springframework.cloud.netflix.eureka.RestClientTimeoutProperties;
import org.springframework.cloud.netflix.eureka.http.DefaultEurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.EurekaClientHttpRequestFactorySupplier;
import org.springframework.cloud.netflix.eureka.http.RestTemplateTransportClientFactory;
import org.springframework.cloud.netflix.eureka.http.RestClientTransportClientFactory;
import org.springframework.util.ClassUtils;
public class EurekaConfigServerBootstrapper implements BootstrapRegistryInitializer {
@@ -45,52 +44,40 @@ public class EurekaConfigServerBootstrapper implements BootstrapRegistryInitiali
return;
}
// It is important that we pass a lambda for the Function or else we will get a
// ClassNotFoundException when config is not on the classpath
registry.registerIfAbsent(ConfigServerInstanceProvider.Function.class, EurekaFunction::create);
}
private static Boolean getDiscoveryEnabled(Binder binder) {
return binder.bind(ConfigClientProperties.CONFIG_DISCOVERY_ENABLED, Boolean.class).orElse(false)
&& binder.bind("eureka.client.enabled", Boolean.class).orElse(true)
&& binder.bind("spring.cloud.discovery.enabled", Boolean.class).orElse(true);
}
final static class EurekaFunction implements ConfigServerInstanceProvider.Function {
private final BootstrapContext context;
static EurekaFunction create(BootstrapContext context) {
return new EurekaFunction(context);
}
private EurekaFunction(BootstrapContext context) {
this.context = context;
}
@Override
public List<ServiceInstance> apply(String serviceId, Binder binder, BindHandler bindHandler, Log log) {
if (binder == null || !getDiscoveryEnabled(binder)) {
return Collections.emptyList();
registry.registerIfAbsent(EurekaClientConfigBean.class, context -> {
if (!getDiscoveryEnabled(context)) {
return null;
}
PropertyResolver propertyResolver = getPropertyResolver(context);
return propertyResolver.resolveConfigurationProperties(EurekaClientConfigBean.PREFIX,
EurekaClientConfigBean.class, EurekaClientConfigBean::new);
});
EurekaClientConfigBean config = binder.bind(EurekaClientConfigBean.PREFIX, EurekaClientConfigBean.class)
.orElseGet(EurekaClientConfigBean::new);
EurekaHttpClient httpClient = new RestTemplateTransportClientFactory(
registry.registerIfAbsent(ConfigServerInstanceProvider.Function.class, context -> {
if (!getDiscoveryEnabled(context)) {
return (id) -> Collections.emptyList();
}
EurekaClientConfigBean config = context.get(EurekaClientConfigBean.class);
EurekaHttpClient httpClient = new RestClientTransportClientFactory(
context.getOrElse(TlsProperties.class, null),
context.getOrElse(EurekaClientHttpRequestFactorySupplier.class,
new DefaultEurekaClientHttpRequestFactorySupplier()))
.newClient(HostnameBasedUrlRandomizer.randomEndpoint(config, binder));
return new EurekaConfigServerInstanceProvider(httpClient, config).getInstances(serviceId);
}
new DefaultEurekaClientHttpRequestFactorySupplier(new RestClientTimeoutProperties(),
Collections.emptySet())))
.newClient(HostnameBasedUrlRandomizer.randomEndpoint(config, getPropertyResolver(context)));
return new EurekaConfigServerInstanceProvider(httpClient, config)::getInstances;
});
}
@Override
public List<ServiceInstance> apply(String serviceId) {
// This should never be called now but is here for backward
// compatibility
return apply(serviceId, null, null, null);
}
private static PropertyResolver getPropertyResolver(BootstrapContext context) {
return context.getOrElseSupply(PropertyResolver.class,
() -> new PropertyResolver(context.get(Binder.class), context.getOrElse(BindHandler.class, null)));
}
public static Boolean getDiscoveryEnabled(BootstrapContext bootstrapContext) {
PropertyResolver propertyResolver = getPropertyResolver(bootstrapContext);
return propertyResolver.get(ConfigClientProperties.CONFIG_DISCOVERY_ENABLED, Boolean.class, false)
&& propertyResolver.get("eureka.client.enabled", Boolean.class, true)
&& propertyResolver.get("spring.cloud.discovery.enabled", Boolean.class, true);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -31,6 +31,9 @@ import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.netflix.eureka.EurekaServiceInstance;
import org.springframework.http.HttpStatus;
/**
* @author Tang Xiong
*/
public class EurekaConfigServerInstanceProvider {
private final Log log;
@@ -53,7 +56,11 @@ public class EurekaConfigServerInstanceProvider {
if (log.isDebugEnabled()) {
log.debug("eurekaConfigServerInstanceProvider finding instances for " + serviceId);
}
EurekaHttpResponse<Applications> response = client.getApplications(config.getRegion());
String remoteRegionsStr = config.fetchRegistryForRemoteRegions();
String[] remoteRegions = remoteRegionsStr == null ? null : remoteRegionsStr.split(",");
EurekaHttpResponse<Applications> response = config.getRegistryRefreshSingleVipAddress() == null
? client.getApplications(remoteRegions)
: client.getVip(config.getRegistryRefreshSingleVipAddress(), remoteRegions);
List<ServiceInstance> instances = new ArrayList<>();
if (!isSuccessful(response) || response.getEntity() == null) {
return instances;
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -23,12 +23,15 @@ import com.netflix.discovery.endpoint.EndpointUtils;
import com.netflix.discovery.shared.resolver.DefaultEndpoint;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver.PropertyResolver;
import org.springframework.cloud.netflix.eureka.EurekaClientConfigBean;
import org.springframework.core.env.Environment;
import org.springframework.util.StringUtils;
public final class HostnameBasedUrlRandomizer implements EndpointUtils.ServiceUrlRandomizer {
private static final String EUREKA_INSTANCE_HOSTNAME = "eureka.instance.hostname";
private final String hostname;
HostnameBasedUrlRandomizer(String hostname) {
@@ -64,12 +67,17 @@ public final class HostnameBasedUrlRandomizer implements EndpointUtils.ServiceUr
}
public static DefaultEndpoint randomEndpoint(EurekaClientConfig config, Environment env) {
String hostname = env.getProperty("eureka.instance.hostname");
String hostname = env.getProperty(EUREKA_INSTANCE_HOSTNAME);
return new DefaultEndpoint(getEurekaUrl(config, hostname));
}
public static DefaultEndpoint randomEndpoint(EurekaClientConfig config, Binder binder) {
String hostname = binder.bind("eureka.instance.hostname", String.class).orElseGet(() -> null);
String hostname = binder.bind(EUREKA_INSTANCE_HOSTNAME, String.class).orElseGet(() -> null);
return new DefaultEndpoint(getEurekaUrl(config, hostname));
}
public static DefaultEndpoint randomEndpoint(EurekaClientConfig config, PropertyResolver propertyResolver) {
String hostname = propertyResolver.get(EUREKA_INSTANCE_HOSTNAME, String.class, null);
return new DefaultEndpoint(getEurekaUrl(config, hostname));
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -16,11 +16,14 @@
package org.springframework.cloud.netflix.eureka.http;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import org.apache.hc.client5.http.config.ConnectionConfig;
import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
@@ -32,6 +35,7 @@ import org.apache.hc.core5.http.io.SocketConfig;
import org.apache.hc.core5.util.Timeout;
import org.springframework.cloud.netflix.eureka.RestTemplateTimeoutProperties;
import org.springframework.cloud.netflix.eureka.TimeoutProperties;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.lang.Nullable;
@@ -47,31 +51,52 @@ import org.springframework.lang.Nullable;
*/
public class DefaultEurekaClientHttpRequestFactorySupplier implements EurekaClientHttpRequestFactorySupplier {
private final RestTemplateTimeoutProperties restTemplateTimeoutProperties;
private final TimeoutProperties timeoutProperties;
// TODO: switch to final after removing deprecated interfaces
private Set<RequestConfigCustomizer> requestConfigCustomizers = Collections.emptySet();
/**
* @deprecated in favour of
* {@link DefaultEurekaClientHttpRequestFactorySupplier#DefaultEurekaClientHttpRequestFactorySupplier(RestTemplateTimeoutProperties)}
* {@link DefaultEurekaClientHttpRequestFactorySupplier#DefaultEurekaClientHttpRequestFactorySupplier(TimeoutProperties, Set)}
*/
@Deprecated
@Deprecated(forRemoval = true)
public DefaultEurekaClientHttpRequestFactorySupplier() {
this.restTemplateTimeoutProperties = new RestTemplateTimeoutProperties();
this.timeoutProperties = new RestTemplateTimeoutProperties();
}
public DefaultEurekaClientHttpRequestFactorySupplier(RestTemplateTimeoutProperties restTemplateTimeoutProperties) {
this.restTemplateTimeoutProperties = restTemplateTimeoutProperties;
/**
* @deprecated in favour of
* {@link DefaultEurekaClientHttpRequestFactorySupplier#DefaultEurekaClientHttpRequestFactorySupplier(TimeoutProperties, Set)}
*/
@Deprecated(forRemoval = true)
public DefaultEurekaClientHttpRequestFactorySupplier(RestTemplateTimeoutProperties timeoutProperties) {
this.timeoutProperties = timeoutProperties;
}
/**
* @deprecated in favour of
* {@link DefaultEurekaClientHttpRequestFactorySupplier#DefaultEurekaClientHttpRequestFactorySupplier(TimeoutProperties, Set)}
*/
@Deprecated(forRemoval = true)
public DefaultEurekaClientHttpRequestFactorySupplier(TimeoutProperties timeoutProperties) {
this.timeoutProperties = timeoutProperties;
}
public DefaultEurekaClientHttpRequestFactorySupplier(TimeoutProperties timeoutProperties,
Set<RequestConfigCustomizer> requestConfigCustomizers) {
this.timeoutProperties = timeoutProperties;
this.requestConfigCustomizers = requestConfigCustomizers;
}
@Override
public ClientHttpRequestFactory get(SSLContext sslContext, @Nullable HostnameVerifier hostnameVerifier) {
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
if (sslContext != null || hostnameVerifier != null || restTemplateTimeoutProperties != null) {
httpClientBuilder.setConnectionManager(
buildConnectionManager(sslContext, hostnameVerifier, restTemplateTimeoutProperties));
}
if (restTemplateTimeoutProperties != null) {
httpClientBuilder.setDefaultRequestConfig(buildRequestConfig());
if (sslContext != null || hostnameVerifier != null || timeoutProperties != null) {
httpClientBuilder
.setConnectionManager(buildConnectionManager(sslContext, hostnameVerifier, timeoutProperties));
}
httpClientBuilder.setDefaultRequestConfig(buildRequestConfig());
CloseableHttpClient httpClient = httpClientBuilder.build();
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
@@ -80,11 +105,11 @@ public class DefaultEurekaClientHttpRequestFactorySupplier implements EurekaClie
}
private HttpClientConnectionManager buildConnectionManager(SSLContext sslContext, HostnameVerifier hostnameVerifier,
RestTemplateTimeoutProperties restTemplateTimeoutProperties) {
TimeoutProperties timeoutProperties) {
PoolingHttpClientConnectionManagerBuilder connectionManagerBuilder = PoolingHttpClientConnectionManagerBuilder
.create();
.create();
SSLConnectionSocketFactoryBuilder sslConnectionSocketFactoryBuilder = SSLConnectionSocketFactoryBuilder
.create();
.create();
if (sslContext != null) {
sslConnectionSocketFactoryBuilder.setSslContext(sslContext);
}
@@ -92,20 +117,25 @@ public class DefaultEurekaClientHttpRequestFactorySupplier implements EurekaClie
sslConnectionSocketFactoryBuilder.setHostnameVerifier(hostnameVerifier);
}
connectionManagerBuilder.setSSLSocketFactory(sslConnectionSocketFactoryBuilder.build());
if (restTemplateTimeoutProperties != null) {
if (timeoutProperties != null) {
connectionManagerBuilder.setDefaultSocketConfig(SocketConfig.custom()
.setSoTimeout(Timeout.of(restTemplateTimeoutProperties.getSocketTimeout(), TimeUnit.MILLISECONDS))
.build());
.setSoTimeout(Timeout.of(timeoutProperties.getSocketTimeout(), TimeUnit.MILLISECONDS))
.build());
connectionManagerBuilder.setDefaultConnectionConfig(ConnectionConfig.custom()
.setConnectTimeout(Timeout.of(timeoutProperties.getConnectTimeout(), TimeUnit.MILLISECONDS))
.build());
}
return connectionManagerBuilder.build();
}
private RequestConfig buildRequestConfig() {
return RequestConfig.custom()
.setConnectTimeout(Timeout.of(restTemplateTimeoutProperties.getConnectTimeout(), TimeUnit.MILLISECONDS))
.setConnectionRequestTimeout(
Timeout.of(restTemplateTimeoutProperties.getConnectRequestTimeout(), TimeUnit.MILLISECONDS))
.build();
RequestConfig.Builder requestConfigBuilder = RequestConfig.custom();
if (timeoutProperties != null) {
requestConfigBuilder.setConnectionRequestTimeout(
Timeout.of(timeoutProperties.getConnectRequestTimeout(), TimeUnit.MILLISECONDS));
}
requestConfigCustomizers.forEach(customizer -> customizer.customize(requestConfigBuilder));
return requestConfigBuilder.build();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -19,6 +19,8 @@ package org.springframework.cloud.netflix.eureka.http;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import org.apache.hc.client5.http.config.RequestConfig;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.lang.Nullable;
@@ -38,4 +40,17 @@ public interface EurekaClientHttpRequestFactorySupplier {
*/
ClientHttpRequestFactory get(SSLContext sslContext, @Nullable HostnameVerifier hostnameVerifier);
/**
* Allows customising the {@link RequestConfig} of the underlying Apache HC5 instance.
*
* @author Olga Maciaszek-Sharma
* @since 4.2.1
*/
@FunctionalInterface
interface RequestConfigCustomizer {
void customize(RequestConfig.Builder builder);
}
}
@@ -0,0 +1,147 @@
/*
* Copyright 2017-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka.http;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Optional;
import javax.net.ssl.SSLContext;
import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
import com.fasterxml.jackson.databind.ser.std.BeanSerializerBase;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.converters.jackson.mixin.ApplicationsJsonMixIn;
import com.netflix.discovery.converters.jackson.mixin.InstanceInfoJsonMixIn;
import com.netflix.discovery.converters.jackson.serializer.InstanceInfoJsonBeanSerializer;
import com.netflix.discovery.shared.Applications;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
import org.springframework.cloud.configuration.SSLContextFactory;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.lang.Nullable;
/**
* Utility class for dealing with {@link EurekaHttpClient}.
*
* @author Daniel Lavoie
* @author Wonchul Heo
* @author Olga Maciaszek-Sharma
* @since 4.2.0
*/
final class EurekaHttpClientUtils {
private EurekaHttpClientUtils() {
throw new AssertionError("Must not instantiate constant utility class");
}
/**
* Provides the serialization configurations required by the Eureka Server. JSON
* content exchanged with eureka requires a root node matching the entity being
* serialized or deserialized. Achieved with
* {@link SerializationFeature#WRAP_ROOT_VALUE} and
* {@link DeserializationFeature#UNWRAP_ROOT_VALUE}.
* {@link PropertyNamingStrategies.SnakeCaseStrategy} is applied to the underlying
* {@link ObjectMapper}.
* @return a {@link MappingJackson2HttpMessageConverter} object
*/
static MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter() {
final MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
converter.setObjectMapper(objectMapper());
return converter;
}
/**
* Provides the serialization configurations required by the Eureka Server. JSON
* content exchanged with eureka requires a root node matching the entity being
* serialized or deserialized. Achieved with
* {@link SerializationFeature#WRAP_ROOT_VALUE} and
* {@link DeserializationFeature#UNWRAP_ROOT_VALUE}.
* {@link PropertyNamingStrategies.SnakeCaseStrategy} is applied to the underlying
* {@link ObjectMapper}.
* @return a {@link ObjectMapper} object
*/
static ObjectMapper objectMapper() {
final ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
final SimpleModule jsonModule = new SimpleModule();
jsonModule.setSerializerModifier(createJsonSerializerModifier());
objectMapper.registerModule(jsonModule);
objectMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
objectMapper.addMixIn(Applications.class, ApplicationsJsonMixIn.class);
objectMapper.addMixIn(InstanceInfo.class, InstanceInfoJsonMixIn.class);
return objectMapper;
}
private static BeanSerializerModifier createJsonSerializerModifier() {
return new BeanSerializerModifier() {
@Override
public JsonSerializer<?> modifySerializer(SerializationConfig config, BeanDescription beanDesc,
JsonSerializer<?> serializer) {
if (beanDesc.getBeanClass().isAssignableFrom(InstanceInfo.class)) {
return new InstanceInfoJsonBeanSerializer((BeanSerializerBase) serializer, false);
}
return serializer;
}
};
}
@Nullable
static UserInfo extractUserInfo(String serviceUrl) {
try {
final URI serviceURI = new URI(serviceUrl);
if (serviceURI.getUserInfo() != null) {
final String[] credentials = serviceURI.getUserInfo().split(":");
if (credentials.length == 2) {
return new UserInfo(credentials[0], credentials[1]);
}
}
}
catch (URISyntaxException ignore) {
}
return null;
}
static Optional<SSLContext> context(TlsProperties properties) {
if (properties == null || !properties.isEnabled()) {
return Optional.empty();
}
try {
return Optional.of(new SSLContextFactory(properties).createSSLContext());
}
catch (Exception e) {
throw new IllegalStateException(e);
}
}
record UserInfo(String username, String password) {
}
}
@@ -0,0 +1,67 @@
/*
* Copyright 2017-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka.http;
import java.io.IOException;
import java.io.InputStream;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.client.ClientHttpResponse;
/**
* Response that ignores body, specifically for 404 errors.
*
* @author Spencer Gibb
* @author Wonchul Heo
* @since 4.2.0
*/
class NotFoundHttpResponse implements ClientHttpResponse {
private final ClientHttpResponse response;
NotFoundHttpResponse(ClientHttpResponse response) {
this.response = response;
}
@Override
public HttpStatusCode getStatusCode() throws IOException {
return response.getStatusCode();
}
@Override
public String getStatusText() throws IOException {
return response.getStatusText();
}
@Override
public void close() {
response.close();
}
@Override
public InputStream getBody() throws IOException {
// ignore body on 404 for heartbeat, see gh-4145
return null;
}
@Override
public HttpHeaders getHeaders() {
return response.getHeaders();
}
}
@@ -0,0 +1,55 @@
/*
* Copyright 2017-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka.http;
import java.util.function.Supplier;
import com.netflix.discovery.AbstractDiscoveryClientOptionalArgs;
import jakarta.ws.rs.client.ClientRequestFilter;
import org.springframework.web.client.RestClient;
/**
* {@link RestClient} implementation of DiscoveryClientOptionalArgs that supports
* supplying {@link ClientRequestFilter}.
*
* @author Wonchul Heo
* @author Olga Maciaszek-Sharma
* @since 4.2.0
*/
public class RestClientDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> {
private final EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier;
private final Supplier<RestClient.Builder> restClientBuilderSupplier;
public RestClientDiscoveryClientOptionalArgs(
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
Supplier<RestClient.Builder> restClientBuilderSupplier) {
this.eurekaClientHttpRequestFactorySupplier = eurekaClientHttpRequestFactorySupplier;
this.restClientBuilderSupplier = restClientBuilderSupplier;
}
EurekaClientHttpRequestFactorySupplier getEurekaClientHttpRequestFactorySupplier() {
return eurekaClientHttpRequestFactorySupplier;
}
Supplier<RestClient.Builder> getRestClientBuilderSupplier() {
return restClientBuilderSupplier;
}
}
@@ -0,0 +1,238 @@
/*
* Copyright 2017-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka.http;
import java.net.URI;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.appinfo.InstanceInfo.InstanceStatus;
import com.netflix.discovery.shared.Application;
import com.netflix.discovery.shared.Applications;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
import com.netflix.discovery.shared.transport.EurekaHttpResponse;
import com.netflix.discovery.shared.transport.EurekaHttpResponse.EurekaHttpResponseBuilder;
import com.netflix.discovery.util.StringUtil;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestClient;
import org.springframework.web.util.UriBuilder;
import static com.netflix.discovery.shared.transport.EurekaHttpResponse.anEurekaHttpResponse;
/**
* {@link RestClient} implementation of {@link EurekaHttpClient}.
*
* @author Wonchul Heo
* @since 4.2.0
*/
public class RestClientEurekaHttpClient implements EurekaHttpClient {
private final RestClient restClient;
public RestClientEurekaHttpClient(RestClient restClient) {
this.restClient = restClient;
}
@Override
public EurekaHttpResponse<Void> register(InstanceInfo info) {
final ResponseEntity<Void> response = restClient.post()
.uri(builder -> builder.pathSegment("apps", info.getAppName()).build())
.body(info)
.header(HttpHeaders.ACCEPT_ENCODING, "gzip")
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.toBodilessEntity();
return eurekaHttpResponse(response);
}
@Override
public EurekaHttpResponse<Void> cancel(String appName, String id) {
final ResponseEntity<Void> response = restClient.delete()
.uri(builder -> builder.pathSegment("apps", appName, id).build())
.retrieve()
.toBodilessEntity();
return eurekaHttpResponse(response);
}
@Override
public EurekaHttpResponse<InstanceInfo> sendHeartBeat(String appName, String id, InstanceInfo info,
InstanceStatus overriddenStatus) {
final Function<UriBuilder, URI> uriFunction = builder -> builder.pathSegment("apps", appName, id)
.queryParam("status", info.getStatus().toString())
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.queryParamIfPresent("overriddenstatus", Optional.ofNullable(overriddenStatus).map(InstanceStatus::name))
.build();
final ResponseEntity<InstanceInfo> response = restClient.put()
.uri(uriFunction)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.toEntity(InstanceInfo.class);
final EurekaHttpResponseBuilder<InstanceInfo> builder = anEurekaHttpResponse(statusCodeValueOf(response),
InstanceInfo.class)
.headers(headersOf(response));
final InstanceInfo entity = response.getBody();
if (entity != null) {
builder.entity(entity);
}
return builder.build();
}
@Override
public EurekaHttpResponse<Void> statusUpdate(String appName, String id, InstanceStatus newStatus,
InstanceInfo info) {
final Function<UriBuilder, URI> uriFunction = builder -> builder.pathSegment("apps", appName, id, "status")
.queryParam("value", newStatus.name())
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.build();
final ResponseEntity<Void> response = restClient.put()
.uri(uriFunction)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.toBodilessEntity();
return eurekaHttpResponse(response);
}
@Override
public EurekaHttpResponse<Void> deleteStatusOverride(String appName, String id, InstanceInfo info) {
final Function<UriBuilder, URI> uriFunction = builder -> builder.pathSegment("apps", appName, id, "status")
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.build();
final ResponseEntity<Void> response = restClient.delete()
.uri(uriFunction)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.toBodilessEntity();
return eurekaHttpResponse(response);
}
@Override
public EurekaHttpResponse<Applications> getApplications(String... regions) {
return getApplicationsInternal("/apps/", regions);
}
@Override
public EurekaHttpResponse<Applications> getDelta(String... regions) {
return getApplicationsInternal("/apps/delta", regions);
}
@Override
public EurekaHttpResponse<Applications> getVip(String vipAddress, String... regions) {
return getApplicationsInternal("/vips/" + vipAddress, regions);
}
@Override
public EurekaHttpResponse<Applications> getSecureVip(String secureVipAddress, String... regions) {
return getApplicationsInternal("/svips/" + secureVipAddress, regions);
}
@Override
public EurekaHttpResponse<Application> getApplication(String appName) {
final ResponseEntity<Application> response = restClient.get()
.uri("/apps/" + appName)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.toEntity(Application.class);
final int statusCode = statusCodeValueOf(response);
final Application body = response.getBody();
final Application application = statusCode == HttpStatus.OK.value() && body != null ? body : null;
return anEurekaHttpResponse(statusCode, application).headers(headersOf(response)).build();
}
@Override
public EurekaHttpResponse<InstanceInfo> getInstance(String appName, String id) {
return getInstanceInternal("/apps/" + appName + '/' + id);
}
@Override
public EurekaHttpResponse<InstanceInfo> getInstance(String id) {
return getInstanceInternal("/instances/" + id);
}
@Override
public void shutdown() {
}
public RestClient getRestClient() {
return restClient;
}
private EurekaHttpResponse<Applications> getApplicationsInternal(String urlPath, String[] regions) {
final Function<UriBuilder, URI> uriFunction = builder -> builder
.queryParamIfPresent("regions",
Optional.ofNullable(regions).filter(it -> it.length > 0).map(StringUtil::join))
.build();
final ResponseEntity<Applications> response = restClient.get()
.uri(urlPath, uriFunction)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.toEntity(Applications.class);
final int statusCode = statusCodeValueOf(response);
final Applications body = response.getBody();
return anEurekaHttpResponse(statusCode, statusCode == HttpStatus.OK.value() && body != null ? body : null)
.headers(headersOf(response))
.build();
}
private EurekaHttpResponse<InstanceInfo> getInstanceInternal(String urlPath) {
final ResponseEntity<InstanceInfo> response = restClient.get()
.uri(urlPath)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.toEntity(InstanceInfo.class);
final int statusCode = statusCodeValueOf(response);
final InstanceInfo body = response.getBody();
return anEurekaHttpResponse(statusCode, statusCode == HttpStatus.OK.value() && body != null ? body : null)
.headers(headersOf(response))
.build();
}
private static Map<String, String> headersOf(ResponseEntity<?> response) {
return response.getHeaders().toSingleValueMap();
}
private static int statusCodeValueOf(ResponseEntity<?> response) {
return response.getStatusCode().value();
}
private static EurekaHttpResponse<Void> eurekaHttpResponse(ResponseEntity<?> response) {
return anEurekaHttpResponse(statusCodeValueOf(response)).headers(headersOf(response)).build();
}
}
@@ -0,0 +1,58 @@
/*
* Copyright 2017-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka.http;
import java.util.Collection;
import java.util.Optional;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.EurekaClientConfig;
import com.netflix.discovery.shared.transport.TransportClientFactory;
import com.netflix.discovery.shared.transport.jersey.TransportClientFactories;
/**
* @author Wonchul Heo
* @author Olga Maciaszek-Sharma
* @since 4.2.0
*/
public class RestClientTransportClientFactories implements TransportClientFactories<Void> {
private final RestClientDiscoveryClientOptionalArgs args;
public RestClientTransportClientFactories(RestClientDiscoveryClientOptionalArgs args) {
this.args = args;
}
@Override
public TransportClientFactory newTransportClientFactory(EurekaClientConfig clientConfig,
Collection<Void> additionalFilters, InstanceInfo myInstanceInfo) {
return new RestClientTransportClientFactory(args.getSSLContext(), args.getHostnameVerifier(),
args.getEurekaClientHttpRequestFactorySupplier(), args.getRestClientBuilderSupplier());
}
@Override
public TransportClientFactory newTransportClientFactory(final EurekaClientConfig clientConfig,
final Collection<Void> additionalFilters, final InstanceInfo myInstanceInfo,
final Optional<SSLContext> sslContext, final Optional<HostnameVerifier> hostnameVerifier) {
return new RestClientTransportClientFactory(args.getSSLContext(), args.getHostnameVerifier(),
args.getEurekaClientHttpRequestFactorySupplier(), args.getRestClientBuilderSupplier());
}
}
@@ -0,0 +1,122 @@
/*
* Copyright 2017-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.netflix.eureka.http;
import java.util.Optional;
import java.util.function.Supplier;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import com.netflix.discovery.shared.resolver.EurekaEndpoint;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
import com.netflix.discovery.shared.transport.TransportClientFactory;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.client.support.BasicAuthenticationInterceptor;
import org.springframework.web.client.RestClient;
import org.springframework.web.util.UriComponentsBuilder;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.context;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.extractUserInfo;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.mappingJacksonHttpMessageConverter;
/**
* Provides the custom {@link RestClient} required by the
* {@link RestClientEurekaHttpClient}. Relies on Jackson for serialization and
* deserialization.
*
* @author Wonchul Heo
* @author Olga Maciaszek-Sharma
* @since 4.2.0
*/
public class RestClientTransportClientFactory implements TransportClientFactory {
private final Optional<SSLContext> sslContext;
private final Optional<HostnameVerifier> hostnameVerifier;
private final EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier;
private final Supplier<RestClient.Builder> builderSupplier;
public RestClientTransportClientFactory(Optional<SSLContext> sslContext,
Optional<HostnameVerifier> hostnameVerifier,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
Supplier<RestClient.Builder> builderSupplier) {
this.sslContext = sslContext;
this.hostnameVerifier = hostnameVerifier;
this.eurekaClientHttpRequestFactorySupplier = eurekaClientHttpRequestFactorySupplier;
this.builderSupplier = builderSupplier;
}
public RestClientTransportClientFactory(TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
Supplier<RestClient.Builder> builderSupplier) {
this(context(tlsProperties), Optional.empty(), eurekaClientHttpRequestFactorySupplier, builderSupplier);
}
public RestClientTransportClientFactory(TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier) {
this(tlsProperties, eurekaClientHttpRequestFactorySupplier, RestClient::builder);
}
@Override
public EurekaHttpClient newClient(EurekaEndpoint endpoint) {
// we want a copy to modify. Don't change the original
final RestClient.Builder builder = builderSupplier.get().clone();
ClientHttpRequestFactory requestFactory = this.eurekaClientHttpRequestFactorySupplier
.get(this.sslContext.orElse(null), this.hostnameVerifier.orElse(null));
builder.requestFactory(requestFactory);
setUrl(builder, endpoint.getServiceUrl());
builder.messageConverters(converters -> converters.add(0, mappingJacksonHttpMessageConverter()));
builder.defaultStatusHandler(HttpStatusCode::isError, (req, res) -> {
});
builder.requestInterceptor((request, body, execution) -> {
final ClientHttpResponse response = execution.execute(request, body);
if (!response.getStatusCode().equals(HttpStatus.NOT_FOUND)) {
return response;
}
return new NotFoundHttpResponse(response);
});
return new RestClientEurekaHttpClient(builder.build());
}
@Override
public void shutdown() {
}
private static void setUrl(RestClient.Builder builder, String serviceUrl) {
final String url = UriComponentsBuilder.fromUriString(serviceUrl).userInfo(null).toUriString();
final EurekaHttpClientUtils.UserInfo userInfo = extractUserInfo(serviceUrl);
if (userInfo != null) {
builder.requestInterceptor(new BasicAuthenticationInterceptor(userInfo.username(), userInfo.password()));
}
builder.baseUrl(url);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -16,18 +16,37 @@
package org.springframework.cloud.netflix.eureka.http;
import java.util.function.Supplier;
import com.netflix.discovery.AbstractDiscoveryClientOptionalArgs;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestTemplate;
/**
* @author Daniel Lavoie
* @author Armin Krezovic
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Deprecated
public class RestTemplateDiscoveryClientOptionalArgs extends AbstractDiscoveryClientOptionalArgs<Void> {
protected final EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier;
protected final Supplier<RestTemplateBuilder> restTemplateBuilderSupplier;
public RestTemplateDiscoveryClientOptionalArgs(
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier) {
this(eurekaClientHttpRequestFactorySupplier, RestTemplateBuilder::new);
}
public RestTemplateDiscoveryClientOptionalArgs(
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
Supplier<RestTemplateBuilder> restTemplateBuilderSupplier) {
this.eurekaClientHttpRequestFactorySupplier = eurekaClientHttpRequestFactorySupplier;
this.restTemplateBuilderSupplier = restTemplateBuilderSupplier;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -16,6 +16,7 @@
package org.springframework.cloud.netflix.eureka.http;
import java.net.URI;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -30,8 +31,6 @@ import com.netflix.discovery.shared.transport.EurekaHttpClient;
import com.netflix.discovery.shared.transport.EurekaHttpResponse;
import com.netflix.discovery.shared.transport.EurekaHttpResponse.EurekaHttpResponseBuilder;
import com.netflix.discovery.util.StringUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -39,17 +38,21 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import static com.netflix.discovery.shared.transport.EurekaHttpResponse.anEurekaHttpResponse;
/**
* @author Daniel Lavoie
* @author Václav Plic
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Deprecated(forRemoval = true)
public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
protected final Log logger = LogFactory.getLog(getClass());
private final RestTemplate restTemplate;
private String serviceUrl;
@@ -72,13 +75,16 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Void> register(InstanceInfo info) {
String urlPath = serviceUrl + "apps/" + info.getAppName();
URI uri = UriComponentsBuilder.fromHttpUrl(serviceUrl)
.path("apps/{appName}")
.buildAndExpand(info.getAppName())
.toUri();
HttpHeaders headers = new HttpHeaders();
headers.add(HttpHeaders.ACCEPT_ENCODING, "gzip");
headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
ResponseEntity<Void> response = restTemplate.exchange(urlPath, HttpMethod.POST, new HttpEntity<>(info, headers),
ResponseEntity<Void> response = restTemplate.exchange(uri, HttpMethod.POST, new HttpEntity<>(info, headers),
Void.class);
return anEurekaHttpResponse(response.getStatusCode().value()).headers(headersOf(response)).build();
@@ -86,9 +92,12 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Void> cancel(String appName, String id) {
String urlPath = serviceUrl + "apps/" + appName + '/' + id;
URI uri = UriComponentsBuilder.fromHttpUrl(serviceUrl)
.path("apps/{appName}/{id}")
.buildAndExpand(appName, id)
.toUri();
ResponseEntity<Void> response = restTemplate.exchange(urlPath, HttpMethod.DELETE, null, Void.class);
ResponseEntity<Void> response = restTemplate.exchange(uri, HttpMethod.DELETE, null, Void.class);
return anEurekaHttpResponse(response.getStatusCode().value()).headers(headersOf(response)).build();
}
@@ -96,15 +105,22 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<InstanceInfo> sendHeartBeat(String appName, String id, InstanceInfo info,
InstanceStatus overriddenStatus) {
String urlPath = serviceUrl + "apps/" + appName + '/' + id + "?status=" + info.getStatus().toString()
+ "&lastDirtyTimestamp=" + info.getLastDirtyTimestamp().toString()
+ (overriddenStatus != null ? "&overriddenstatus=" + overriddenStatus.name() : "");
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromHttpUrl(serviceUrl)
.path("apps/{appName}/{id}")
.queryParam("status", info.getStatus().toString())
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString());
ResponseEntity<InstanceInfo> response = restTemplate.exchange(urlPath, HttpMethod.PUT, null,
InstanceInfo.class);
if (overriddenStatus != null) {
uriBuilder = uriBuilder.queryParam("overriddenstatus", overriddenStatus.name());
}
URI uri = uriBuilder.buildAndExpand(appName, id).toUri();
ResponseEntity<InstanceInfo> response = restTemplate.exchange(uri, HttpMethod.PUT, null, InstanceInfo.class);
EurekaHttpResponseBuilder<InstanceInfo> eurekaResponseBuilder = anEurekaHttpResponse(
response.getStatusCode().value(), InstanceInfo.class).headers(headersOf(response));
response.getStatusCode().value(), InstanceInfo.class)
.headers(headersOf(response));
if (response.hasBody()) {
eurekaResponseBuilder.entity(response.getBody());
@@ -116,20 +132,27 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Void> statusUpdate(String appName, String id, InstanceStatus newStatus,
InstanceInfo info) {
String urlPath = serviceUrl + "apps/" + appName + '/' + id + "/status?value=" + newStatus.name()
+ "&lastDirtyTimestamp=" + info.getLastDirtyTimestamp().toString();
URI uri = UriComponentsBuilder.fromHttpUrl(serviceUrl)
.path("apps/{appName}/{id}/status")
.queryParam("value", newStatus.name())
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.buildAndExpand(appName, id)
.toUri();
ResponseEntity<Void> response = restTemplate.exchange(urlPath, HttpMethod.PUT, null, Void.class);
ResponseEntity<Void> response = restTemplate.exchange(uri, HttpMethod.PUT, null, Void.class);
return anEurekaHttpResponse(response.getStatusCode().value()).headers(headersOf(response)).build();
}
@Override
public EurekaHttpResponse<Void> deleteStatusOverride(String appName, String id, InstanceInfo info) {
String urlPath = serviceUrl + "apps/" + appName + '/' + id + "/status?lastDirtyTimestamp="
+ info.getLastDirtyTimestamp().toString();
URI uri = UriComponentsBuilder.fromHttpUrl(serviceUrl)
.path("apps/{appName}/{id}/status")
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.buildAndExpand(appName, id)
.toUri();
ResponseEntity<Void> response = restTemplate.exchange(urlPath, HttpMethod.DELETE, null, Void.class);
ResponseEntity<Void> response = restTemplate.exchange(uri, HttpMethod.DELETE, null, Void.class);
return anEurekaHttpResponse(response.getStatusCode().value()).headers(headersOf(response)).build();
}
@@ -140,18 +163,22 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
}
private EurekaHttpResponse<Applications> getApplicationsInternal(String urlPath, String[] regions) {
String url = serviceUrl + urlPath;
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromHttpUrl(serviceUrl).path(urlPath);
if (regions != null && regions.length > 0) {
url = url + (urlPath.contains("?") ? "&" : "?") + "regions=" + StringUtil.join(regions);
uriBuilder = uriBuilder.queryParam("regions", StringUtil.join(regions));
}
ResponseEntity<EurekaApplications> response = restTemplate.exchange(url, HttpMethod.GET, null,
URI uri = uriBuilder.build().toUri();
ResponseEntity<EurekaApplications> response = restTemplate.exchange(uri, HttpMethod.GET, null,
EurekaApplications.class);
return anEurekaHttpResponse(response.getStatusCode().value(),
response.getStatusCode().value() == HttpStatus.OK.value() && response.hasBody()
? (Applications) response.getBody() : null).headers(headersOf(response)).build();
? (Applications) response.getBody() : null)
.headers(headersOf(response))
.build();
}
@Override
@@ -171,9 +198,9 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Application> getApplication(String appName) {
String urlPath = serviceUrl + "apps/" + appName;
URI uri = UriComponentsBuilder.fromHttpUrl(serviceUrl).path("apps/{appName}").buildAndExpand(appName).toUri();
ResponseEntity<Application> response = restTemplate.exchange(urlPath, HttpMethod.GET, null, Application.class);
ResponseEntity<Application> response = restTemplate.exchange(uri, HttpMethod.GET, null, Application.class);
Application application = response.getStatusCode().value() == HttpStatus.OK.value() && response.hasBody()
? response.getBody() : null;
@@ -183,23 +210,24 @@ public class RestTemplateEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<InstanceInfo> getInstance(String appName, String id) {
return getInstanceInternal("apps/" + appName + '/' + id);
return getInstanceInternal("apps", appName, id);
}
@Override
public EurekaHttpResponse<InstanceInfo> getInstance(String id) {
return getInstanceInternal("instances/" + id);
return getInstanceInternal("instances", id);
}
private EurekaHttpResponse<InstanceInfo> getInstanceInternal(String urlPath) {
urlPath = serviceUrl + urlPath;
private EurekaHttpResponse<InstanceInfo> getInstanceInternal(String... pathSegments) {
URI uri = UriComponentsBuilder.fromHttpUrl(serviceUrl).pathSegment(pathSegments).build().toUri();
ResponseEntity<InstanceInfo> response = restTemplate.exchange(urlPath, HttpMethod.GET, null,
InstanceInfo.class);
ResponseEntity<InstanceInfo> response = restTemplate.exchange(uri, HttpMethod.GET, null, InstanceInfo.class);
return anEurekaHttpResponse(response.getStatusCode().value(),
response.getStatusCode().value() == HttpStatus.OK.value() && response.hasBody() ? response.getBody()
: null).headers(headersOf(response)).build();
: null)
.headers(headersOf(response))
.build();
}
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -27,9 +27,16 @@ import com.netflix.discovery.EurekaClientConfig;
import com.netflix.discovery.shared.transport.TransportClientFactory;
import com.netflix.discovery.shared.transport.jersey.TransportClientFactories;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestTemplate;
/**
* @author Daniel Lavoie
* @author Armin Krezovic
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Deprecated(forRemoval = true)
public class RestTemplateTransportClientFactories implements TransportClientFactories<Void> {
private final RestTemplateDiscoveryClientOptionalArgs args;
@@ -41,16 +48,16 @@ public class RestTemplateTransportClientFactories implements TransportClientFact
@Override
public TransportClientFactory newTransportClientFactory(EurekaClientConfig clientConfig,
Collection<Void> additionalFilters, InstanceInfo myInstanceInfo) {
return new RestTemplateTransportClientFactory(this.args.getSSLContext(), this.args.getHostnameVerifier(),
this.args.eurekaClientHttpRequestFactorySupplier);
return new RestTemplateTransportClientFactory(args.getSSLContext(), args.getHostnameVerifier(),
args.eurekaClientHttpRequestFactorySupplier, args.restTemplateBuilderSupplier);
}
@Override
public TransportClientFactory newTransportClientFactory(final EurekaClientConfig clientConfig,
final Collection<Void> additionalFilters, final InstanceInfo myInstanceInfo,
final Optional<SSLContext> sslContext, final Optional<HostnameVerifier> hostnameVerifier) {
return new RestTemplateTransportClientFactory(this.args.getSSLContext(), this.args.getHostnameVerifier(),
this.args.eurekaClientHttpRequestFactorySupplier);
return new RestTemplateTransportClientFactory(args.getSSLContext(), args.getHostnameVerifier(),
args.eurekaClientHttpRequestFactorySupplier, args.restTemplateBuilderSupplier);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -16,54 +16,45 @@
package org.springframework.cloud.netflix.eureka.http;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Optional;
import java.util.function.Supplier;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
import com.fasterxml.jackson.databind.ser.std.BeanSerializerBase;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.converters.jackson.mixin.ApplicationsJsonMixIn;
import com.netflix.discovery.converters.jackson.mixin.InstanceInfoJsonMixIn;
import com.netflix.discovery.converters.jackson.serializer.InstanceInfoJsonBeanSerializer;
import com.netflix.discovery.shared.Applications;
import com.netflix.discovery.shared.resolver.EurekaEndpoint;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
import com.netflix.discovery.shared.transport.TransportClientFactory;
import org.springframework.cloud.configuration.SSLContextFactory;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.configuration.TlsProperties;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.client.support.BasicAuthenticationInterceptor;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.context;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.extractUserInfo;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.mappingJacksonHttpMessageConverter;
/**
* Provides the custom {@link RestTemplate} required by the
* {@link RestTemplateEurekaHttpClient}. Relies on Jackson for serialization and
* deserialization.
*
* @author Daniel Lavoie
* @author Armin Krezovic
* @author Wonchul Heo
* @author Olga Maciaszek-Sharma
* @deprecated {@link RestTemplate}-based implementation to be removed in favour of
* {@link RestClient}-based implementation.
*/
@Deprecated(forRemoval = true)
public class RestTemplateTransportClientFactory implements TransportClientFactory {
private final Optional<SSLContext> sslContext;
@@ -72,37 +63,44 @@ public class RestTemplateTransportClientFactory implements TransportClientFactor
private final EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier;
public RestTemplateTransportClientFactory(TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier) {
this.sslContext = context(tlsProperties);
this.hostnameVerifier = Optional.empty();
private final Supplier<RestTemplateBuilder> restTemplateBuilderSupplier;
public RestTemplateTransportClientFactory(Optional<SSLContext> sslContext,
Optional<HostnameVerifier> hostnameVerifier,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
Supplier<RestTemplateBuilder> restTemplateBuilderSupplier) {
this.sslContext = sslContext;
this.hostnameVerifier = hostnameVerifier;
this.eurekaClientHttpRequestFactorySupplier = eurekaClientHttpRequestFactorySupplier;
this.restTemplateBuilderSupplier = restTemplateBuilderSupplier;
}
private Optional<SSLContext> context(TlsProperties properties) {
if (properties == null || !properties.isEnabled()) {
return Optional.empty();
}
try {
return Optional.of(new SSLContextFactory(properties).createSSLContext());
}
catch (Exception e) {
throw new IllegalStateException(e);
}
public RestTemplateTransportClientFactory(TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier,
Supplier<RestTemplateBuilder> restTemplateBuilderSupplier) {
this(context(tlsProperties), Optional.empty(), eurekaClientHttpRequestFactorySupplier,
restTemplateBuilderSupplier);
}
public RestTemplateTransportClientFactory(TlsProperties tlsProperties,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier) {
this(tlsProperties, eurekaClientHttpRequestFactorySupplier, RestTemplateBuilder::new);
}
public RestTemplateTransportClientFactory(Optional<SSLContext> sslContext,
Optional<HostnameVerifier> hostnameVerifier,
EurekaClientHttpRequestFactorySupplier eurekaClientHttpRequestFactorySupplier) {
this.sslContext = sslContext;
this.hostnameVerifier = hostnameVerifier;
this.eurekaClientHttpRequestFactorySupplier = eurekaClientHttpRequestFactorySupplier;
this(sslContext, hostnameVerifier, eurekaClientHttpRequestFactorySupplier, RestTemplateBuilder::new);
}
// Visible for testing
/**
* @deprecated pass the default values while initialising object in test classes.
*/
@Deprecated(forRemoval = true)
public RestTemplateTransportClientFactory() {
this.sslContext = Optional.empty();
this.hostnameVerifier = Optional.empty();
this.eurekaClientHttpRequestFactorySupplier = new DefaultEurekaClientHttpRequestFactorySupplier();
this(Optional.empty(), Optional.empty(), new DefaultEurekaClientHttpRequestFactorySupplier());
}
@Override
@@ -119,21 +117,25 @@ public class RestTemplateTransportClientFactory implements TransportClientFactor
private RestTemplate restTemplate(String serviceUrl) {
ClientHttpRequestFactory requestFactory = this.eurekaClientHttpRequestFactorySupplier
.get(this.sslContext.orElse(null), this.hostnameVerifier.orElse(null));
RestTemplate restTemplate = new RestTemplate(requestFactory);
.get(this.sslContext.orElse(null), this.hostnameVerifier.orElse(null));
try {
URI serviceURI = new URI(serviceUrl);
if (serviceURI.getUserInfo() != null) {
String[] credentials = serviceURI.getUserInfo().split(":");
if (credentials.length == 2) {
restTemplate.getInterceptors()
.add(new BasicAuthenticationInterceptor(credentials[0], credentials[1]));
}
}
RestTemplate restTemplate;
if (restTemplateBuilderSupplier != null && restTemplateBuilderSupplier.get() != null) {
// Avoid using RestTemplateBuilder.requestFactory(() -> requestFactory)
// when we have a concrete type, the reflective builder can throw errors if
// there is custom configuration (ie Redirects.DONT_FOLLOW) gh-4423
restTemplate = restTemplateBuilderSupplier.get().build();
restTemplate.setRequestFactory(requestFactory);
}
else {
restTemplate = new RestTemplate(requestFactory);
}
catch (URISyntaxException ignore) {
final EurekaHttpClientUtils.UserInfo userInfo = extractUserInfo(serviceUrl);
if (userInfo != null) {
restTemplate.getInterceptors()
.add(new BasicAuthenticationInterceptor(userInfo.username(), userInfo.password()));
}
restTemplate.getMessageConverters().add(0, mappingJacksonHttpMessageConverter());
@@ -150,102 +152,19 @@ public class RestTemplateTransportClientFactory implements TransportClientFactor
return restTemplate;
}
/**
* Provides the serialization configurations required by the Eureka Server. JSON
* content exchanged with eureka requires a root node matching the entity being
* serialized or deserialized. Achived with
* {@link SerializationFeature#WRAP_ROOT_VALUE} and
* {@link DeserializationFeature#UNWRAP_ROOT_VALUE}.
* {@link PropertyNamingStrategies.SnakeCaseStrategy} is applied to the underlying
* {@link ObjectMapper}.
* @return a {@link MappingJackson2HttpMessageConverter} object
*/
public MappingJackson2HttpMessageConverter mappingJacksonHttpMessageConverter() {
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
converter.setObjectMapper(new ObjectMapper().setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE));
SimpleModule jsonModule = new SimpleModule();
jsonModule.setSerializerModifier(createJsonSerializerModifier());
converter.getObjectMapper().registerModule(jsonModule);
converter.getObjectMapper().configure(SerializationFeature.WRAP_ROOT_VALUE, true);
converter.getObjectMapper().configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
converter.getObjectMapper().addMixIn(Applications.class, ApplicationsJsonMixIn.class);
converter.getObjectMapper().addMixIn(InstanceInfo.class, InstanceInfoJsonMixIn.class);
return converter;
}
public static BeanSerializerModifier createJsonSerializerModifier() {
return new BeanSerializerModifier() {
@Override
public JsonSerializer<?> modifySerializer(SerializationConfig config, BeanDescription beanDesc,
JsonSerializer<?> serializer) {
if (beanDesc.getBeanClass().isAssignableFrom(InstanceInfo.class)) {
return new InstanceInfoJsonBeanSerializer((BeanSerializerBase) serializer, false);
}
return serializer;
}
};
}
@Override
public void shutdown() {
}
/**
* Response that ignores body, specifically for 404 errors.
*/
private static class NotFoundHttpResponse implements ClientHttpResponse {
private final ClientHttpResponse response;
NotFoundHttpResponse(ClientHttpResponse response) {
this.response = response;
}
@Override
public HttpStatusCode getStatusCode() throws IOException {
return response.getStatusCode();
}
@Override
public int getRawStatusCode() throws IOException {
return response.getRawStatusCode();
}
@Override
public String getStatusText() throws IOException {
return response.getStatusText();
}
@Override
public void close() {
response.close();
}
@Override
public InputStream getBody() throws IOException {
// ignore body on 404 for heartbeat, see gh-4145
return null;
}
@Override
public HttpHeaders getHeaders() {
return response.getHeaders();
}
}
class ErrorHandler extends DefaultResponseErrorHandler {
@Override
protected boolean hasError(HttpStatusCode statusCode) {
/**
* When the Eureka server restarts and a client tries to sent a heartbeat the
* server will respond with a 404. By default RestTemplate will throw an
* When the Eureka server restarts and a client tries to send a heartbeat the
* server will respond with a 404. By default, RestTemplate will throw an
* exception in this case. What we want is to return the 404 to the upstream
* code so it will send another registration request to the server.
* code, so it will send another registration request to the server.
*/
if (statusCode.is4xxClientError()) {
return false;
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -17,6 +17,7 @@
package org.springframework.cloud.netflix.eureka.http;
import java.util.Map;
import java.util.Optional;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.appinfo.InstanceInfo.InstanceStatus;
@@ -42,6 +43,7 @@ import static com.netflix.discovery.shared.transport.EurekaHttpResponse.anEureka
/**
* @author Daniel Lavoie
* @author Haytham Mohamed
* @author Václav Plic
*/
public class WebClientEurekaHttpClient implements EurekaHttpClient {
@@ -53,34 +55,48 @@ public class WebClientEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Void> register(InstanceInfo info) {
return webClient.post().uri("apps/" + info.getAppName()).body(BodyInserters.fromValue(info))
.header(HttpHeaders.ACCEPT_ENCODING, "gzip")
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE).retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError).toBodilessEntity().map(this::eurekaHttpResponse)
.block();
return webClient.post()
.uri(uriBuilder -> uriBuilder.path("apps/{appName}").build(info.getAppName()))
.body(BodyInserters.fromValue(info))
.header(HttpHeaders.ACCEPT_ENCODING, "gzip")
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toBodilessEntity()
.map(this::eurekaHttpResponse)
.block();
}
@Override
public EurekaHttpResponse<Void> cancel(String appName, String id) {
return webClient.delete().uri("apps/" + appName + '/' + id).retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError).toBodilessEntity().map(this::eurekaHttpResponse)
.block();
return webClient.delete()
.uri(uriBuilder -> uriBuilder.path("apps/{appName}/{id}").build(appName, id))
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toBodilessEntity()
.map(this::eurekaHttpResponse)
.block();
}
@Override
public EurekaHttpResponse<InstanceInfo> sendHeartBeat(String appName, String id, InstanceInfo info,
InstanceStatus overriddenStatus) {
String urlPath = "apps/" + appName + '/' + id + "?status=" + info.getStatus().toString()
+ "&lastDirtyTimestamp=" + info.getLastDirtyTimestamp().toString()
+ (overriddenStatus != null ? "&overriddenstatus=" + overriddenStatus.name() : "");
ResponseEntity<InstanceInfo> response = webClient.put().uri(urlPath)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE).retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError).toEntity(InstanceInfo.class).block();
ResponseEntity<InstanceInfo> response = webClient.put()
.uri(uriBuilder -> uriBuilder.path("apps/{appName}/{id}")
.queryParam("status", info.getStatus().toString())
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.build(appName, id))
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toEntity(InstanceInfo.class)
.block();
EurekaHttpResponseBuilder<InstanceInfo> builder = anEurekaHttpResponse(statusCodeValueOf(response),
InstanceInfo.class).headers(headersOf(response));
InstanceInfo.class)
.headers(headersOf(response));
InstanceInfo entity = response.getBody();
@@ -95,22 +111,31 @@ public class WebClientEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Void> statusUpdate(String appName, String id, InstanceStatus newStatus,
InstanceInfo info) {
String urlPath = "apps/" + appName + '/' + id + "/status?value=" + newStatus.name() + "&lastDirtyTimestamp="
+ info.getLastDirtyTimestamp().toString();
return webClient.put().uri(urlPath).header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve().onStatus(HttpStatusCode::isError, this::ignoreError).toBodilessEntity()
.map(this::eurekaHttpResponse).block();
return webClient.put()
.uri(uriBuilder -> uriBuilder.path("apps/{appName}/{id}/status")
.queryParam("value", newStatus.name())
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.build(appName, id))
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toBodilessEntity()
.map(this::eurekaHttpResponse)
.block();
}
@Override
public EurekaHttpResponse<Void> deleteStatusOverride(String appName, String id, InstanceInfo info) {
String urlPath = "apps/" + appName + '/' + id + "/status?lastDirtyTimestamp="
+ info.getLastDirtyTimestamp().toString();
return webClient.delete().uri(urlPath).header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve().onStatus(HttpStatusCode::isError, this::ignoreError).toBodilessEntity()
.map(this::eurekaHttpResponse).block();
return webClient.delete()
.uri(uriBuilder -> uriBuilder.path("apps/{appName}/{id}/status")
.queryParam("lastDirtyTimestamp", info.getLastDirtyTimestamp().toString())
.build(appName, id))
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toBodilessEntity()
.map(this::eurekaHttpResponse)
.block();
}
@Override
@@ -119,23 +144,25 @@ public class WebClientEurekaHttpClient implements EurekaHttpClient {
}
private EurekaHttpResponse<Applications> getApplicationsInternal(String urlPath, String[] regions) {
String url = urlPath;
Optional<String> regionsParam = (regions != null && regions.length > 0) ? Optional.of(StringUtil.join(regions))
: Optional.empty();
if (regions != null && regions.length > 0) {
url = url + (urlPath.contains("?") ? "&" : "?") + "regions=" + StringUtil.join(regions);
}
ResponseEntity<Applications> response = webClient.get().uri(url)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE).retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError).toEntity(Applications.class).block();
ResponseEntity<Applications> response = webClient.get()
.uri(uriBuilder -> uriBuilder.path(urlPath).queryParamIfPresent("regions", regionsParam).build())
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toEntity(Applications.class)
.block();
int statusCode = statusCodeValueOf(response);
Applications body = response.getBody();
return anEurekaHttpResponse(statusCode, statusCode == HttpStatus.OK.value() && body != null ? body : null)
.headers(headersOf(response)).build();
.headers(headersOf(response))
.build();
}
@Override
@@ -156,9 +183,13 @@ public class WebClientEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<Application> getApplication(String appName) {
ResponseEntity<Application> response = webClient.get().uri("apps/" + appName)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE).retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError).toEntity(Application.class).block();
ResponseEntity<Application> response = webClient.get()
.uri(uriBuilder -> uriBuilder.path("apps/{appName}").build(appName))
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toEntity(Application.class)
.block();
int statusCode = statusCodeValueOf(response);
Application body = response.getBody();
@@ -170,24 +201,29 @@ public class WebClientEurekaHttpClient implements EurekaHttpClient {
@Override
public EurekaHttpResponse<InstanceInfo> getInstance(String appName, String id) {
return getInstanceInternal("apps/" + appName + '/' + id);
return getInstanceInternal("apps", appName, id);
}
@Override
public EurekaHttpResponse<InstanceInfo> getInstance(String id) {
return getInstanceInternal("instances/" + id);
return getInstanceInternal("instances", id);
}
private EurekaHttpResponse<InstanceInfo> getInstanceInternal(String urlPath) {
ResponseEntity<InstanceInfo> response = webClient.get().uri(urlPath)
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE).retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError).toEntity(InstanceInfo.class).block();
private EurekaHttpResponse<InstanceInfo> getInstanceInternal(String... pathSegments) {
ResponseEntity<InstanceInfo> response = webClient.get()
.uri(uriBuilder -> uriBuilder.pathSegment(pathSegments).build())
.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.retrieve()
.onStatus(HttpStatusCode::isError, this::ignoreError)
.toEntity(InstanceInfo.class)
.block();
int statusCode = statusCodeValueOf(response);
InstanceInfo body = response.getBody();
return anEurekaHttpResponse(statusCode, statusCode == HttpStatus.OK.value() && body != null ? body : null)
.headers(headersOf(response)).build();
.headers(headersOf(response))
.build();
}
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -16,33 +16,21 @@
package org.springframework.cloud.netflix.eureka.http;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.function.Supplier;
import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
import com.fasterxml.jackson.databind.ser.std.BeanSerializerBase;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.converters.jackson.mixin.ApplicationsJsonMixIn;
import com.netflix.discovery.converters.jackson.mixin.InstanceInfoJsonMixIn;
import com.netflix.discovery.converters.jackson.serializer.InstanceInfoJsonBeanSerializer;
import com.netflix.discovery.shared.Applications;
import com.netflix.discovery.shared.resolver.EurekaEndpoint;
import com.netflix.discovery.shared.transport.EurekaHttpClient;
import com.netflix.discovery.shared.transport.TransportClientFactory;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.netty.http.client.HttpClient;
import reactor.netty.resources.ConnectionProvider;
import reactor.netty.resources.LoopResources;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.http.codec.ClientCodecConfigurer;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
@@ -50,6 +38,10 @@ import org.springframework.web.reactive.function.client.ClientResponse;
import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
import org.springframework.web.reactive.function.client.ExchangeFilterFunctions;
import org.springframework.web.reactive.function.client.WebClient;
import org.springframework.web.util.UriComponentsBuilder;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.extractUserInfo;
import static org.springframework.cloud.netflix.eureka.http.EurekaHttpClientUtils.objectMapper;
/**
* Provides the custom {@link WebClient.Builder} required by the
@@ -58,13 +50,21 @@ import org.springframework.web.reactive.function.client.WebClient;
*
* @author Daniel Lavoie
* @author Haytham Mohamed
* @author Armin Krezovic
* @author Wonchul Heo
*/
public class WebClientTransportClientFactory implements TransportClientFactory {
private final Supplier<WebClient.Builder> builderSupplier;
private final ConnectionProvider connectionProvider;
private final LoopResources loopResources;
public WebClientTransportClientFactory(Supplier<WebClient.Builder> builderSupplier) {
this.builderSupplier = builderSupplier;
this.connectionProvider = ConnectionProvider.create("eureka-webclient");
this.loopResources = LoopResources.create("eureka-webclient");
}
@Override
@@ -74,39 +74,24 @@ public class WebClientTransportClientFactory implements TransportClientFactory {
setUrl(builder, endpoint.getServiceUrl());
setCodecs(builder);
builder.filter(http4XxErrorExchangeFilterFunction());
// Use dedicated Reactor Netty resources independent of the reactive web server
// to prevent RejectedExecutionException during graceful shutdown when the
// server's event loop terminates before DiscoveryClient deregisters.
builder.clientConnector(
new ReactorClientHttpConnector(HttpClient.create(this.connectionProvider).runOn(this.loopResources)));
return new WebClientEurekaHttpClient(builder.build());
}
private WebClient.Builder setUrl(WebClient.Builder builder, String serviceUrl) {
String url = serviceUrl;
try {
URI serviceURI = new URI(serviceUrl);
if (serviceURI.getUserInfo() != null) {
String[] credentials = serviceURI.getUserInfo().split(":");
if (credentials.length == 2) {
builder.filter(ExchangeFilterFunctions.basicAuthentication(credentials[0], credentials[1]));
url = serviceUrl.replace(credentials[0] + ":" + credentials[1] + "@", "");
}
}
}
catch (URISyntaxException ignore) {
String url = UriComponentsBuilder.fromUriString(serviceUrl).userInfo(null).toUriString();
final EurekaHttpClientUtils.UserInfo userInfo = extractUserInfo(serviceUrl);
if (userInfo != null) {
builder.filter(ExchangeFilterFunctions.basicAuthentication(userInfo.username(), userInfo.password()));
}
return builder.baseUrl(url);
}
private static BeanSerializerModifier createJsonSerializerModifier() {
return new BeanSerializerModifier() {
@Override
public JsonSerializer<?> modifySerializer(SerializationConfig config, BeanDescription beanDesc,
JsonSerializer<?> serializer) {
if (beanDesc.getBeanClass().isAssignableFrom(InstanceInfo.class)) {
return new InstanceInfoJsonBeanSerializer((BeanSerializerBase) serializer, false);
}
return serializer;
}
};
}
private void setCodecs(WebClient.Builder builder) {
ObjectMapper objectMapper = objectMapper();
builder.codecs(configurer -> {
@@ -117,32 +102,6 @@ public class WebClientTransportClientFactory implements TransportClientFactory {
});
}
/**
* Provides the serialization configurations required by the Eureka Server. JSON
* content exchanged with eureka requires a root node matching the entity being
* serialized or deserialized. Achieved with
* {@link SerializationFeature#WRAP_ROOT_VALUE} and
* {@link DeserializationFeature#UNWRAP_ROOT_VALUE}.
* {@link PropertyNamingStrategies.SnakeCaseStrategy} is applied to the underlying
* {@link ObjectMapper}.
* @return a {@link ObjectMapper} object
*/
private ObjectMapper objectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
SimpleModule jsonModule = new SimpleModule();
jsonModule.setSerializerModifier(createJsonSerializerModifier());
objectMapper.registerModule(jsonModule);
objectMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
objectMapper.addMixIn(Applications.class, ApplicationsJsonMixIn.class);
objectMapper.addMixIn(InstanceInfo.class, InstanceInfoJsonMixIn.class);
return objectMapper;
}
// Skip over 4xx http errors
private ExchangeFilterFunction http4XxErrorExchangeFilterFunction() {
return ExchangeFilterFunction.ofResponseProcessor(clientResponse -> {
@@ -153,9 +112,11 @@ public class WebClientTransportClientFactory implements TransportClientFactory {
return Mono.just(newResponse);
}
if (clientResponse.statusCode().equals(HttpStatus.NOT_FOUND)) {
ClientResponse newResponse = clientResponse.mutate().statusCode(clientResponse.statusCode())
// ignore body on 404 for heartbeat, see gh-4145
.body(Flux.empty()).build();
ClientResponse newResponse = clientResponse.mutate()
.statusCode(clientResponse.statusCode())
// ignore body on 404 for heartbeat, see gh-4145
.body(Flux.empty())
.build();
return Mono.just(newResponse);
}
return Mono.just(clientResponse);
@@ -164,6 +125,8 @@ public class WebClientTransportClientFactory implements TransportClientFactory {
@Override
public void shutdown() {
this.connectionProvider.dispose();
this.loopResources.dispose();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2022 the original author or authors.
* Copyright 2017-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-present 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.
@@ -52,15 +52,16 @@ public class EurekaReactiveDiscoveryClient implements ReactiveDiscoveryClient {
@Override
public Flux<ServiceInstance> getInstances(String serviceId) {
return Flux.defer(() -> Flux.fromIterable(eurekaClient.getInstancesByVipAddress(serviceId, false)))
.map(EurekaServiceInstance::new);
.map(EurekaServiceInstance::new);
}
@Override
public Flux<String> getServices() {
return Flux.defer(() -> Mono.justOrEmpty(eurekaClient.getApplications()))
.flatMapIterable(Applications::getRegisteredApplications)
.filter(application -> !application.getInstances().isEmpty()).map(Application::getName)
.map(String::toLowerCase);
.flatMapIterable(Applications::getRegisteredApplications)
.filter(application -> !application.getInstances().isEmpty())
.map(Application::getName)
.map(String::toLowerCase);
}
@Override
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 the original author or authors.
* Copyright 2019-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.cloud.client.discovery.event.InstancePreRegisteredEvent;
import org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent;
import org.springframework.cloud.client.serviceregistry.AutoServiceRegistration;
import org.springframework.context.ApplicationContext;
@@ -33,11 +34,15 @@ import org.springframework.context.event.SmartApplicationListener;
import org.springframework.core.Ordered;
/**
* Provides an implementation of {@link AutoServiceRegistration} for registering service
* instances in Eureka.
*
* @author Dave Syer
* @author Spencer Gibb
* @author Jon Schneider
* @author Jakub Narloch
* @author Raiyan Raiyan
* @author Olga Maciaszek-Sharma
*/
public class EurekaAutoServiceRegistration
implements AutoServiceRegistration, SmartLifecycle, Ordered, SmartApplicationListener {
@@ -65,37 +70,38 @@ public class EurekaAutoServiceRegistration
@Override
public void start() {
// only set the port if the nonSecurePort or securePort is 0 and this.port != 0
if (this.port.get() != 0) {
if (this.registration.getNonSecurePort() == 0) {
this.registration.setNonSecurePort(this.port.get());
// only set the port if the nonSecurePort or securePort is 0 and port != 0
if (port.get() != 0) {
if (registration.getNonSecurePort() == 0) {
registration.setNonSecurePort(port.get());
}
if (this.registration.getSecurePort() == 0 && this.registration.isSecure()) {
this.registration.setSecurePort(this.port.get());
if (registration.getSecurePort() == 0 && registration.isSecure()) {
registration.setSecurePort(port.get());
}
}
// only initialize if nonSecurePort is greater than 0 and it isn't already running
// because of containerPortInitializer below
if (!this.running.get() && this.registration.getNonSecurePort() > 0) {
if (!running.get() && registration.getNonSecurePort() > 0) {
context.publishEvent(new InstancePreRegisteredEvent(this, registration));
this.serviceRegistry.register(this.registration);
serviceRegistry.register(registration);
this.context.publishEvent(new InstanceRegisteredEvent<>(this, this.registration.getInstanceConfig()));
this.running.set(true);
context.publishEvent(new InstanceRegisteredEvent<>(this, registration.getInstanceConfig()));
running.set(true);
}
}
@Override
public void stop() {
this.serviceRegistry.deregister(this.registration);
this.running.set(false);
serviceRegistry.deregister(registration);
running.set(false);
}
@Override
public boolean isRunning() {
return this.running.get();
return running.get();
}
@Override
@@ -116,7 +122,7 @@ public class EurekaAutoServiceRegistration
@Override
public int getOrder() {
return this.order;
return order;
}
@Override
@@ -140,9 +146,9 @@ public class EurekaAutoServiceRegistration
String contextName = event.getApplicationContext().getServerNamespace();
if (contextName == null || !contextName.equals("management")) {
int localPort = event.getWebServer().getPort();
if (this.port.get() == 0) {
if (port.get() == 0) {
log.info("Updating port to " + localPort);
this.port.compareAndSet(0, localPort);
port.compareAndSet(0, localPort);
start();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.
@@ -17,25 +17,54 @@
package org.springframework.cloud.netflix.eureka.serviceregistry;
import java.util.HashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.netflix.appinfo.InstanceInfo;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.client.serviceregistry.ServiceRegistry;
import org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean;
import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UNKNOWN;
/**
* @author Spencer Gibb
* @author Robert Bleyl
*/
public class EurekaServiceRegistry implements ServiceRegistry<EurekaRegistration> {
private static final Log log = LogFactory.getLog(EurekaServiceRegistry.class);
private EurekaInstanceConfigBean eurekaInstanceConfigBean;
public EurekaServiceRegistry() {
}
public EurekaServiceRegistry(EurekaInstanceConfigBean eurekaInstanceConfigBean) {
this.eurekaInstanceConfigBean = eurekaInstanceConfigBean;
}
@Override
public void register(EurekaRegistration reg) {
maybeInitializeClient(reg);
if (eurekaInstanceConfigBean != null && eurekaInstanceConfigBean.isAsyncClientInitialization()) {
if (log.isDebugEnabled()) {
log.debug("Initializing client asynchronously...");
}
ExecutorService executorService = Executors.newSingleThreadExecutor();
executorService.submit(() -> {
maybeInitializeClient(reg);
if (log.isDebugEnabled()) {
log.debug("Asynchronous client initialization done.");
}
});
}
else {
maybeInitializeClient(reg);
}
if (log.isInfoEnabled()) {
log.info("Registering application " + reg.getApplicationInfoManager().getInfo().getAppName()
@@ -45,7 +74,7 @@ public class EurekaServiceRegistry implements ServiceRegistry<EurekaRegistration
reg.getApplicationInfoManager().setInstanceStatus(reg.getInstanceConfig().getInitialStatus());
reg.getHealthCheckHandler()
.ifAvailable(healthCheckHandler -> reg.getEurekaClient().registerHealthCheck(healthCheckHandler));
.ifAvailable(healthCheckHandler -> reg.getEurekaClient().registerHealthCheck(healthCheckHandler));
}
private void maybeInitializeClient(EurekaRegistration reg) {
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 the original author or authors.
* Copyright 2013-present 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.

Some files were not shown because too many files have changed in this diff Show More