Compare commits

...
Author SHA1 Message Date
buildmaster 551fecde83 Update SNAPSHOT to 2.2.2.RELEASE 2020-03-04 16:05:27 +00:00
Spencer Gibb aed8d19aea Updates contract version to 2.2.1.RELEASE 2020-02-04 18:23:35 -05:00
Olga Maciaszek-Sharma ff6b50d0a8 Adjust to changes in commons. 2020-02-04 19:40:28 +01:00
Spencer Gibb 3cb98b70ce Updates eureka to 1.9.17
Doesn't shutdown servo for AbstractDocumentationTests.

fixes gh-3743
2020-01-29 12:17:00 -05:00
Spencer Gibb d1ffc8d72e Revert "Updates eureka to 1.9.17"
This reverts commit 49f88c4e
2020-01-27 15:42:45 -05:00
Spencer Gibb 49f88c4e7c Updates eureka to 1.9.17
fixes gh-3743
2020-01-27 14:14:03 -05:00
Spencer Gibb 53bffa7f04 formatting 2020-01-27 12:26:33 -05:00
Spencer Gibb 8e1ada2b3d formatting 2020-01-27 12:26:17 -05:00
Spencer Gibb 4122aadb73 Removes implementation in preference of parent class 2020-01-27 12:24:42 -05:00
Spencer Gibb 92c0c7d503 Merge branch '2.1.x' into 2.2.x 2020-01-27 12:24:15 -05:00
Dmitrii_Priporov 34b1a07124 Implements ServiceInstance.getScheme() using InstanceInfo.
fixes gh-3727
2020-01-27 12:24:07 -05:00
Spencer Gibb ae637ab3e5 Implements getScheme 2020-01-27 12:23:41 -05:00
Spencer Gibb 2cd7e41c05 Merge branch '2.1.x' into 2.2.x 2020-01-27 11:30:32 -05:00
Flora KALISA cf95248c37 Documents defaultZone case sensitivity
Fixes gh-3695
2020-01-27 11:29:33 -05:00
buildmaster b904eaa886 Bumping versions 2020-01-21 13:55:23 +00:00
Spencer Gibb 3455489f47 Migrates deprecations 2020-01-17 17:58:31 -05:00
buildmaster af919cac66 Bumping versions 2020-01-15 17:47:08 +00:00
Eric Bussieres ead46658c0 Fix for customizer not applied (#3722)
* Fix for customizer not applied when circuit breaker are created in advance

* Checkstyle
2020-01-14 13:34:04 -05:00
buildmaster 732f7d40ea Bumping versions 2020-01-14 17:46:24 +00:00
Spencer Gibb 67444a07c2 Merge branch '2.1.x' 2020-01-13 20:36:16 -05:00
OLPMO a6da307048 Optimize some code (#3693)
* Optimize some code

* fix error of ImportOrder
2020-01-13 20:32:00 -05:00
Andrew McCallum 55dabe8e6b Fix Apache HTTP client typos (#3687) 2020-01-13 18:38:46 -05:00
LiangYong 7e82a47dd3 fixed #3692 issue (#3728)
* fixed #3692 issue

fixed #3692  : Ribbon not getting list of servers from properties with lazy initialization

* Fixeds #3692 issue & add add test

* fix check style failed
2020-01-10 17:18:35 +01:00
fecqs c56e4a35d5 Fixes misspelling in sagan index 2020-01-06 20:32:01 -05:00
buildmaster 02f3bb8bba Bumping versions 2019-12-20 17:46:33 +00:00
buildmaster a4fc71a5b1 Bumping versions to 2.2.2.BUILD-SNAPSHOT after release 2019-12-20 12:36:13 +00:00
buildmaster a33387faa6 Going back to snapshots 2019-12-20 12:36:13 +00:00
buildmaster ec087d0747 Update SNAPSHOT to 2.2.1.RELEASE 2019-12-20 12:31:01 +00:00
Olga Maciaszek-Sharma 23659f8aea Gh 3718 add zoned loadbalancer instrumentation (#3720)
* Add instrumentation for zoned LoadBalancer.

* Add documentation.

* Fix after review.

* Fix after review.
2019-12-19 17:46:50 +01:00
Spencer Gibb b51a15c3f2 ignores .flattened-pom.xml 2019-12-17 17:49:38 -05:00
Spencer Gibb dc30eb2073 removes .flattened-pom.xml 2019-12-17 17:49:03 -05:00
Deepika Mohan c6b8873f0c Fix typo: clas -> class (#3710) 2019-12-16 16:45:52 +01:00
buildmaster 78cce48aa1 Bumping versions 2019-11-26 17:45:50 +00:00
buildmaster 73c40cf561 Bumping versions to 2.2.1.BUILD-SNAPSHOT after release 2019-11-26 10:03:40 +00:00
buildmaster a10d7b69d4 Going back to snapshots 2019-11-26 10:03:40 +00:00
buildmaster 4164297a89 Update SNAPSHOT to 2.2.0.RELEASE 2019-11-26 09:57:00 +00:00
buildmaster 56534dba1c Bumping versions 2019-11-22 17:45:45 +00:00
buildmaster f50e3d60a9 Bumping versions 2019-11-20 17:45:30 +00:00
Ryan Baxter e31d478c11 Update issue templates 2019-11-19 16:25:35 -05:00
Ryan Baxter 0fa901f6bc Create security.md 2019-11-19 16:24:32 -05:00
buildmaster 23366ac178 Bumping versions to 2.1.5.BUILD-SNAPSHOT after release 2019-11-18 14:58:44 +00:00
buildmaster 6fc234494a Going back to snapshots 2019-11-18 14:58:44 +00:00
buildmaster fdbbc6b7e7 Update SNAPSHOT to 2.1.4.RELEASE 2019-11-18 14:53:27 +00:00
Ryan Baxter 67fd109d68 Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2019-11-13 19:38:36 -05:00
Ryan Baxter 3ecf5a7420 Update configuration to use proxyBeanMethods=false. Fixes #3677 2019-11-13 19:38:30 -05:00
buildmaster 69f4c901a9 Going back to snapshots 2019-11-08 21:41:50 +00:00
buildmaster 3130493a3c Update SNAPSHOT to 2.2.0.RC2 2019-11-08 21:38:52 +00:00
buildmaster 87529e0994 Bumping versions 2019-11-07 13:52:14 +00:00
Marcin Grzejszczak e8816398a8 Added maven flatten plugin 2019-11-07 14:37:26 +01:00
Dave Syer bb1269d635 Also add build helper config for contract tests 2019-11-06 09:43:26 +00:00
Dave Syer 38cec4e35d Fix some dependencies that show up in the wrong scope
Apparently you can build on the command line but Eclipse is fussy
now and wouldn't compile these projects without explicit
dependencies.
2019-11-06 09:43:26 +00:00
buildmaster 2b5d246725 Bumping versions 2019-11-05 17:47:29 +00:00
Ryan Baxter 9b2405f3eb Adding configuration metadata for spring cloud circuitbreaker 2019-11-04 16:28:31 -05:00
Ryan Baxter 4ca1901417 Fix command key configuration. Use id as command key and class as group key. 2019-10-31 16:43:41 -04:00
Ryan Baxter 2208011dd3 Add property to disable spring cloud circuit breaker for hystrix 2019-10-31 16:42:59 -04:00
Ryan Baxter 9a2b254d0c Merge remote-tracking branch 'origin/2.1.x' 2019-10-24 17:09:37 -04:00
Ryan Baxter 9103d95ebc removing resource class from circle config 2019-10-24 17:09:18 -04:00
buildmaster d74b319b44 Going back to snapshots 2019-10-24 20:39:42 +00:00
buildmaster 3d3d528e02 Update SNAPSHOT to 2.2.0.RC1 2019-10-24 20:36:47 +00:00
buildmaster 28326b506b Going back to snapshots 2019-10-03 19:22:30 +00:00
buildmaster 392565f395 Update SNAPSHOT to 2.2.0.M3 2019-10-03 19:19:39 +00:00
Tim Ysewyn 532a95e783 Added support for reactive service discovery 2019-10-02 16:40:51 +02:00
Ryan Baxter 5d09760b94 Applying #3407 to the 2.1.x branch 2019-10-01 19:27:17 -04:00
Spencer Gibb ac60c28baa Updates to use "components" rather than "details"
See https://github.com/spring-projects/spring-boot/issues/17929
2019-09-30 13:17:07 -04:00
Olga Maciaszek-Sharma 40ec6066c1 Merge 2.1.x. 2019-09-26 16:34:04 +02:00
Olga Maciaszek-Sharma d0c5bede65 Gh 3464 upgrade scc new (#3667)
* Upgrade Spring Cloud Contract version to 2.1.3.RELEASE.

* Gh 3409 turbine stream test (#3665)

* Add stream-test-support.

* Fix condition.

* Remove outdated workaround.

(cherry picked from commit 24f5e0b043)
2019-09-26 16:13:45 +02:00
OLPMO bd6005e23d Optimize code of eureka (#3660)
* Optimize code of eureka

* Merge newest code

* fix checkstyle bug
2019-09-26 14:07:49 +02:00
buildmaster e8ff2ebaf8 Bumping versions 2019-09-25 17:45:22 +00:00
Olga Maciaszek-Sharma 24f5e0b043 Gh 3409 turbine stream test (#3665)
* Add stream-test-support.

* Fix condition.

* Remove outdated workaround.
2019-09-25 19:32:09 +02:00
Spencer Gibb 8eb843c951 Updates health check handler to use new StatusAggregator 2019-09-25 12:59:39 -04:00
Spencer Gibb 543ab09012 polish 2019-09-25 12:59:11 -04:00
Ryan Baxter 7389f25f1c Merge remote-tracking branch 'origin/2.1.x' 2019-09-19 16:43:33 -04:00
Ryan Baxter ac9f021b92 Fix RestTemplateEurekaHttpClient status update endpoint. Fixes #3571 (#3657) 2019-09-19 16:42:37 -04:00
Spencer Gibb b0b5459adb removes useless comments 2019-09-18 13:31:27 -04:00
Olga Maciaszek-Sharma 669ce753b2 Merge branch '2.1.x'
# Conflicts:
#	docs/pom.xml
#	pom.xml
#	spring-cloud-netflix-archaius/pom.xml
#	spring-cloud-netflix-concurrency-limits/pom.xml
#	spring-cloud-netflix-core/pom.xml
#	spring-cloud-netflix-dependencies/pom.xml
#	spring-cloud-netflix-eureka-client/pom.xml
#	spring-cloud-netflix-eureka-server/pom.xml
#	spring-cloud-netflix-hystrix-contract/pom.xml
#	spring-cloud-netflix-hystrix-dashboard/pom.xml
#	spring-cloud-netflix-hystrix-stream/pom.xml
#	spring-cloud-netflix-hystrix/pom.xml
#	spring-cloud-netflix-ribbon/pom.xml
#	spring-cloud-netflix-sidecar/pom.xml
#	spring-cloud-netflix-turbine-stream/pom.xml
#	spring-cloud-netflix-turbine/pom.xml
#	spring-cloud-netflix-zuul/pom.xml
#	spring-cloud-starter-netflix/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-archaius/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-eureka-client/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-eureka-server/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-hystrix-dashboard/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-hystrix/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-ribbon/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-turbine-stream/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-turbine/pom.xml
#	spring-cloud-starter-netflix/spring-cloud-starter-netflix-zuul/pom.xml
2019-09-18 13:40:33 +02:00
Olga Maciaszek-Sharma a7655046b9 Remove spring.provides. 2019-09-18 13:38:49 +02:00
buildmaster 7dbac954d1 Bumping versions 2019-09-16 17:45:17 +00:00
Rafał Żukowski 828bc82363 ConditionalOnMissingBean on formBodyWrapperFilter, debugFilter… (#3609) 2019-09-16 12:26:08 -04:00
Olga Maciaszek-Sharma e8b50d80ed Update docs. (#3650) 2019-09-13 17:09:01 +02:00
Olga Maciaszek-Sharma 181d210aa5 Add Spring Cloud LoadBalancer starter to Eureka starters. Fixes gh-3646. (#3647) 2019-09-11 12:48:46 +02:00
buildmaster 6e487520ed Bumping versions to 2.1.4.BUILD-SNAPSHOT after release 2019-09-09 19:06:23 +00:00
buildmaster 6e4334ac52 Going back to snapshots 2019-09-09 19:06:23 +00:00
buildmaster 924c889c31 Update SNAPSHOT to 2.1.3.RELEASE 2019-09-09 18:54:26 +00:00
Spencer Gibb d4db93a86a Merge branch '2.1.x' 2019-09-04 15:54:32 -04:00
Spencer Gibb 4953b3ccdc Upgrades eureka to 1.9.13 and excludes compactmap.
fixes gh-3636
2019-09-04 15:53:58 -04:00
Ryan Baxter 438d3f9b0e Fromatting 2019-09-03 16:57:48 -04:00
Ryan Baxter d5de0fc55c Merge remote-tracking branch 'origin/2.1.x' 2019-09-03 16:18:00 -04:00
Ryan Baxter 9c24024bc9 Updating readme with note about building spring-cloud-netflix-hystrix-contract. Fixes #3497 2019-09-03 16:17:32 -04:00
Spencer Gibb 388faaa8e5 Removes okhttp3 again after added back in older branch. 2019-09-03 14:36:27 -04:00
Ryan Baxter b386a78dae Merge remote-tracking branch 'origin/2.1.x' 2019-09-03 10:56:45 -04:00
Denys Ivano 0ea0472b4f Re-create connection manager on "zuul.host.*" property change (#3407)
* Re-create connection manager on "zuul.host.*" property change 

Fixes #3406

* Wrap connectionManager.shutdown() in try/catch block. Polishing
2019-09-03 10:55:47 -04:00
Spencer Gibb af8978a886 Moves okhttp3 dep mgmt back to bom 2019-08-30 14:53:11 -04:00
Spencer Gibb 6d74bebf66 Removes dependency management for okhttp3 2019-08-29 12:22:29 -04:00
Spencer Gibb a99b5d66ca Merge branch '2.1.x' 2019-08-29 12:17:02 -04:00
Spencer Gibb 3c9de171c7 Moves non-netflix dependencies out of bom into root pom.
fixes gh-3639
2019-08-29 12:14:59 -04:00
Ryan Baxter b0e694601e Merge remote-tracking branch 'origin/2.1.x' 2019-08-28 20:18:54 -04:00
emilnkrastev 0e90beeb01 Initialize remoteRegionAppWhitelist with default value (#3634) 2019-08-28 20:18:17 -04:00
Ryan Baxter e160395978 Separated circuitbreaker auto config to its own file 2019-08-28 13:57:09 -04:00
Ryan Baxter 46c25b38d7 Adding spring cloud circuitbreaker hystrix implementation 2019-08-27 20:14:16 -04:00
buildmaster 455c60c15c Going back to snapshots 2019-08-14 14:55:06 +00:00
buildmaster 00b419be94 Update SNAPSHOT to 2.2.0.M2 2019-08-14 14:51:52 +00:00
Spencer Gibb df33d0bd07 Merge branch '2.1.x' 2019-08-01 17:02:03 -04:00
Yuxin Bai df37357316 set replication client filters in RefreshablePeerEurekaNodes (#3610)
fixes gh-3554
2019-08-01 17:00:48 -04:00
Marcin Grzejszczak 9d40b5dc4e Added symbolic link of index.adoc 2019-07-29 14:33:54 +02:00
Marcin Grzejszczak ec28a40f90 Added symbolic link of index.adoc 2019-07-29 14:33:48 +02:00
buildmaster b8fb056981 Going back to snapshots 2019-07-03 18:03:09 +00:00
buildmaster b0ace4774e Update SNAPSHOT to 2.2.0.M1 2019-07-03 18:00:04 +00:00
Ryan Baxter 34c96c99cf Merge remote-tracking branch 'origin/2.1.x' 2019-07-03 11:27:08 -04:00
Ryan Baxter 54bd12c7c2 Separate and fix tests in SidecarApplicationTests (#3585)
* Separate and fix tests in SidecarApplicationTests.  Fixes #3584

* Renaming classes so they end in Tests
2019-07-03 11:17:27 -04:00
Spencer Gibb f29ea94f6e Bumps to 2.1.3.BUILD-SNAPSHOT and build to 2.1.7 2019-06-21 12:11:45 -04:00
Dave Syer 5741326cb5 Add jaxb-runtime to eureka server starter
See https://github.com/spring-io/start.spring.io/issues/119
2019-06-21 11:31:22 -04:00
buildmaster 609c66c2f0 Bumping versions to 2.1.4.BUILD-SNAPSHOT after release 2019-06-20 16:56:25 +00:00
buildmaster 58643b0aae Going back to snapshots 2019-06-20 16:56:24 +00:00
buildmaster d20f70a0c3 Update SNAPSHOT to 2.1.2.RELEASE 2019-06-20 16:48:20 +00:00
Greg Adams c24e7e05bf conditional sidecar autoconfig EurekaInstanceConfigBean (#3568)
fix for gh-3545
2019-06-17 20:43:08 -04:00
Spencer Gibb fd710d8a7d Merge branch '2.1.x' 2019-06-13 20:10:40 -04:00
Spencer Gibb b6814e1133 Updates eureka to 1.9.12 2019-06-13 20:07:23 -04:00
Spencer Gibb 62deb59314 Rename freemarker templates to ftlh
fixes gh-3566
2019-06-13 19:51:37 -04:00
Spencer Gibb 925f460d64 Rename freemarker templates to ftlh
fixes gh-3566
2019-06-13 19:38:07 -04:00
buildmaster 232bff2041 Bumping versions to 2.1.3.BUILD-SNAPSHOT after release 2019-06-11 19:08:47 +00:00
buildmaster e9b1dcd2fd Going back to snapshots 2019-06-11 19:08:47 +00:00
buildmaster 42a8855370 Update SNAPSHOT to 2.1.2.RELEASE 2019-06-11 18:59:05 +00:00
Spencer Gibb 6c2359a0ca Merge branch '2.1.x' 2019-06-10 12:33:50 -04:00
Spencer Gibb 3770d6c14f Updates eureka to 1.9.10
fixes gh-3553
2019-06-10 12:33:30 -04:00
Spencer Gibb 571d1b7bb7 Merge branch '2.1.x' 2019-06-05 15:44:45 -04:00
Spencer Gibb b975b31d97 Merge branch '2.0.x' into 2.1.x 2019-06-05 15:44:18 -04:00
Chris White 4145df96dc Filter WebServerInitializedEvent for web-only. (#3514)
Filter WebServerInitializedEvent for web-only, excluding management.

Fixes gh-2732
2019-06-05 14:35:49 -04:00
PeichengLiu c01d9e6b59 fix a syntax error in the document (#3525) 2019-06-03 10:18:48 -04:00
Ryan Baxter 609b4f5838 Moving to Horsham 2019-05-29 11:25:41 -04:00
Olga Maciaszek-Sharma 23e1c36462 Reformat with the newest Spring javaformat plugin version 2019-05-29 16:35:22 +02:00
Olga Maciaszek-Sharma 4d765b37bb Merge branch '2.1.x' 2019-05-29 16:22:15 +02:00
HeemangHan e0d8cc5469 fix typo (#3543) 2019-05-29 16:21:13 +02:00
Siavash Shaghafi e606cc527e adds caution about property name case-sensitivity (#3533)
* adds caution about property name case-sensitivity

* applies review suggestion
2019-05-23 13:55:27 +02:00
Ryan Baxter 4403e1c8ff Merge remote-tracking branch 'origin/2.1.x' 2019-05-21 13:00:16 -04:00
Ryan Baxter fbb59f8d0a Merge remote-tracking branch 'origin/2.0.x' into 2.1.x 2019-05-21 12:59:48 -04:00
Ryan Baxter 066ffa3fea Merge branch 'aftersss-2.0.x.fix' into 2.0.x 2019-05-21 12:45:21 -04:00
Ryan Baxter fe3dfcc4e8 Polishing documentation 2019-05-21 12:44:30 -04:00
Ryan Baxter a2ee96ebb9 Merge branch '2.0.x.fix' of https://github.com/aftersss/spring-cloud-netflix into aftersss-2.0.x.fix 2019-05-21 11:10:07 -04:00
Ryan Baxter 0b0f5d2334 Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2019-05-21 11:09:30 -04:00
Ryan Baxter 25cd7a5810 Formatting changes 2019-05-21 11:09:18 -04:00
Dave Syer 7aab07365d Add jaxb-runtime to eureka server starter
See https://github.com/spring-io/start.spring.io/issues/119
2019-05-20 10:40:35 +01:00
Dave Syer 6acaa9be8b Update xstream to latest patch level 2019-05-13 13:52:10 +01:00
Dave Syer 11a9819e3b Tweak test to work with Java 12
Also some format changes (checkstyle/Boot plugin)
2019-05-13 10:57:55 +01:00
Dave Syer 4997b69433 Remove deprecated class usage 2019-05-13 09:14:23 +01:00
Dave Syer e2f1f368b5 Make http trace filter bean injection conditional
Recent changes in Spring Boot have meant that there is no longer
an httpTraceFilter bean by default. We can just make it conditional.

Fixes gh-3528
2019-05-13 09:04:55 +01:00
Ryan Baxter 7ea5c3a32f Merge remote-tracking branch 'origin/2.1.x' 2019-05-10 14:23:30 -04:00
Ryan Baxter bd46dc4233 Merge remote-tracking branch 'origin/2.0.x' into 2.1.x 2019-05-10 14:22:52 -04:00
Ryan Baxter cc12f2e82f Cleanup ThreadLocal in SendResponseFilter. Fixes #2283 (#3530) 2019-05-10 13:52:45 -04:00
wenqi.huang 2bbb537b17 Add some documentation about the property eureka.client.refresh.enable 2019-05-03 10:52:54 +08:00
wenqi.huang 84ccefcd4a Add some documentation about the property eureka.client.refresh.enable 2019-05-03 10:42:40 +08:00
Marcin Grzejszczak 03b1e326ce Added sagan pages; fixes gh-3521 2019-04-29 13:21:56 +04:00
Spencer Gibb 7449915919 Bumps to Germantown 2019-04-25 10:28:47 +02:00
wenqi.huang 7fd55be4b3 Add more tests for @ConditionalOnRefreshScope 2019-04-11 18:28:09 +08:00
wenqi.huang ffebfebe31 Add more tests for @ConditionalOnRefreshScope 2019-04-11 18:02:24 +08:00
wenqi.huang bf1cc4d270 Give users a choice to determine whether the EurekaClient instance can be refreshed or not. 2019-04-11 17:19:50 +08:00
Ryan Baxter 0e66862cbb Merge remote-tracking branch 'origin/2.1.x' 2019-04-10 20:29:34 -04:00
Ryan Baxter df8083fb23 Merge remote-tracking branch 'origin/2.0.x' into 2.1.x 2019-04-10 20:28:01 -04:00
Craig Andrews 33113beca8 Do not set the Content-Encoding when ungzipping (#3421)
If the original request has Accept-Encoding not set, the origin response may still be gzipped.
In that case (in which Zuul unzips the response), it must not set the Content-Encoding response header.
2019-04-10 19:42:47 -04:00
Spencer Gibb ee9c704a4c Fixes change in framework api 2019-04-05 11:34:26 -04:00
Spencer Gibb 105f8d85b3 adds checkstyle suppressions. 2019-04-05 11:22:53 -04:00
Ryan Baxter cc6ec1572b Merge branch 'spring-operator-polish-urls-remaining-master' 2019-03-28 20:12:30 -04:00
Ryan Baxter 37d39617bf Fixing tests 2019-03-28 20:12:03 -04:00
Ryan Baxter 3c92af4a06 Merge branch 'polish-urls-remaining-master' of https://github.com/spring-operator/spring-cloud-netflix into spring-operator-polish-urls-remaining-master 2019-03-28 16:16:27 -04:00
Ryan Baxter 2f8a750a13 Merge branch 'spring-operator-polish-urls-remaining-2.0.x' into 2.0.x 2019-03-28 12:30:01 -04:00
Ryan Baxter 35fa602286 Fixing broken tests 2019-03-28 12:29:49 -04:00
Ryan Baxter 4d9a4ea3f6 Merge branch 'polish-urls-remaining-2.0.x' of https://github.com/spring-operator/spring-cloud-netflix into spring-operator-polish-urls-remaining-2.0.x 2019-03-28 12:02:08 -04:00
Ryan Baxter e3993945eb Merge branch '2.1.x' of github.com:spring-cloud/spring-cloud-netflix into 2.1.x 2019-03-28 12:00:03 -04:00
Ryan Baxter 71e1e06faf Merge branch 'spring-operator-polish-urls-remaining-2.1.x' into 2.1.x 2019-03-28 11:59:14 -04:00
Ryan Baxter 6d77a2e25a Fixing broken tests 2019-03-28 11:58:51 -04:00
Spring Operator 0cdf207631 URL Cleanup (#3470)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd with 2 occurrences migrated to:
  https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd ([https](https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd) result 200).
* [ ] http://repo.spring.io/libs-milestone-local with 2 occurrences migrated to:
  https://repo.spring.io/libs-milestone-local ([https](https://repo.spring.io/libs-milestone-local) result 302).
* [ ] http://repo.spring.io/libs-snapshot-local with 2 occurrences migrated to:
  https://repo.spring.io/libs-snapshot-local ([https](https://repo.spring.io/libs-snapshot-local) result 302).
* [ ] http://repo.spring.io/release with 1 occurrences migrated to:
  https://repo.spring.io/release ([https](https://repo.spring.io/release) result 302).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 50 occurrences
* http://www.isdc.ro/wro with 1 occurrences
* http://www.w3.org/2000/svg with 2 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 25 occurrences
2019-03-26 11:53:21 -04:00
Spring Operator 3c0c452628 URL Cleanup (#3448)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 362 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-26 11:51:33 -04:00
Spring Operator eff47e0464 URL Cleanup (#3441)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 27 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 54 occurrences
* http://www.isdc.ro/wro with 1 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 27 occurrences
2019-03-26 11:50:20 -04:00
Spring Operator 70aadd2280 URL Cleanup (#3471)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://maven.apache.org/xsd/maven-4.0.0.xsd with 27 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* [ ] http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd with 2 occurrences migrated to:
  https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd ([https](https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 54 occurrences
* http://www.isdc.ro/wro with 1 occurrences
* http://www.w3.org/2000/svg with 2 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 27 occurrences
2019-03-26 11:47:06 -04:00
Spring Operator f7cb82abb5 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://conor.cc (200) with 4 occurrences could not be migrated:
   ([https](https://conor.cc) result SSLProtocolException).
* [ ] http://richclarkdesign.com (200) with 1 occurrences could not be migrated:
   ([https](https://richclarkdesign.com) result SSLHandshakeException).
* [ ] http://tinysort.sjeiti.com/ (200) with 1 occurrences could not be migrated:
   ([https](https://tinysort.sjeiti.com/) result SSLException).
* [ ] http://unknown-origin.com (200) with 1 occurrences could not be migrated:
   ([https](https://unknown-origin.com) result AnnotatedConnectException).
* [ ] http://www.sjeiti.com/ (301) with 1 occurrences could not be migrated:
   ([https](https://www.sjeiti.com/) result SSLException).
* [ ] http://foo.com (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com) result SSLHandshakeException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://ejohn.org/ (301) with 1 occurrences migrated to:
  https://johnresig.com/ ([https](https://ejohn.org/) result ClosedChannelException).
* [ ] http://ejohn.org/blog/javascript-micro-templating/ (301) with 1 occurrences migrated to:
  https://johnresig.com/blog/javascript-micro-templating/ ([https](https://ejohn.org/blog/javascript-micro-templating/) result ClosedChannelException).
* [ ] http://example3.com/ (302) with 1 occurrences migrated to:
  https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com ([https](https://example3.com/) result ConnectTimeoutException).
* [ ] http://example3.com (302) with 2 occurrences migrated to:
  https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com ([https](https://example3.com) result ConnectTimeoutException).
* [ ] http://192.168.13.90:9999/actuator/health (ConnectTimeoutException) with 1 occurrences migrated to:
  https://192.168.13.90:9999/actuator/health ([https](https://192.168.13.90:9999/actuator/health) result ConnectTimeoutException).
* [ ] http://192.168.13.90:9999/actuator/info (ConnectTimeoutException) with 1 occurrences migrated to:
  https://192.168.13.90:9999/actuator/info ([https](https://192.168.13.90:9999/actuator/info) result ConnectTimeoutException).
* [ ] http://www.w3.org/TR/html4/loose.dtd (ReadTimeoutException) with 1 occurrences migrated to:
  https://www.w3.org/TR/html4/loose.dtd ([https](https://www.w3.org/TR/html4/loose.dtd) result ReadTimeoutException).
* [ ] http://allowed-origin.com (UnknownHostException) with 2 occurrences migrated to:
  https://allowed-origin.com ([https](https://allowed-origin.com) result UnknownHostException).
* [ ] http://compose.docker.io/ (UnknownHostException) with 2 occurrences migrated to:
  https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException).
* [ ] http://custom-example.com (UnknownHostException) with 1 occurrences migrated to:
  https://custom-example.com ([https](https://custom-example.com) result UnknownHostException).
* [ ] http://custom-example.com/ (UnknownHostException) with 1 occurrences migrated to:
  https://custom-example.com/ ([https](https://custom-example.com/) result UnknownHostException).
* [ ] http://earlymade.com (UnknownHostException) with 4 occurrences migrated to:
  https://earlymade.com ([https](https://earlymade.com) result UnknownHostException).
* [ ] http://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ ([https](https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/) result UnknownHostException).
* [ ] http://example.com,http://example2.com (UnknownHostException) with 2 occurrences migrated to:
  https://example.com,http://example2.com ([https](https://example.com,https://example2.com) result UnknownHostException).
* [ ] http://example1.com,http://example2.com (UnknownHostException) with 1 occurrences migrated to:
  https://example1.com,http://example2.com ([https](https://example1.com,https://example2.com) result UnknownHostException).
* [ ] http://first.example.com (UnknownHostException) with 1 occurrences migrated to:
  https://first.example.com ([https](https://first.example.com) result UnknownHostException).
* [ ] http://hostname:port/turbine/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://hostname:port/turbine/turbine.stream ([https](https://hostname:port/turbine/turbine.stream) result UnknownHostException).
* [ ] http://hystrix-app:port/actuator/hystrix.stream (UnknownHostException) with 1 occurrences migrated to:
  https://hystrix-app:port/actuator/hystrix.stream ([https](https://hystrix-app:port/actuator/hystrix.stream) result UnknownHostException).
* [ ] http://legacy.example.com (UnknownHostException) with 1 occurrences migrated to:
  https://legacy.example.com ([https](https://legacy.example.com) result UnknownHostException).
* [ ] http://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME ([https](https://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream ([https](https://my.turbine.sever:8989/turbine.stream) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=customers (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=customers ([https](https://my.turbine.sever:8989/turbine.stream?cluster=customers) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=default (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=default ([https](https://my.turbine.sever:8989/turbine.stream?cluster=default) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=products (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=products ([https](https://my.turbine.sever:8989/turbine.stream?cluster=products) result UnknownHostException).
* [ ] http://sidecar.local.spring.io:5678/configserver/default-master.yml (UnknownHostException) with 1 occurrences migrated to:
  https://sidecar.local.spring.io:5678/configserver/default-master.yml ([https](https://sidecar.local.spring.io:5678/configserver/default-master.yml) result UnknownHostException).
* [ ] http://turbine-hostname:port/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://turbine-hostname:port/turbine.stream ([https](https://turbine-hostname:port/turbine.stream) result UnknownHostException).
* [ ] http://turbine-hostname:port/turbine.stream?cluster= (UnknownHostException) with 1 occurrences migrated to:
  https://turbine-hostname:port/turbine.stream?cluster= ([https](https://turbine-hostname:port/turbine.stream?cluster=) result UnknownHostException).
* [ ] http://user2:pwd2@test2.com (UnknownHostException) with 1 occurrences migrated to:
  https://user2:pwd2@test2.com ([https](https://user2:pwd2@test2.com) result UnknownHostException).
* [ ] http://user:foo@example.com:80/eureka (UnknownHostException) with 1 occurrences migrated to:
  https://user:foo@example.com:80/eureka ([https](https://user:foo@example.com:80/eureka) result UnknownHostException).
* [ ] http://user:pwd@test1.com (UnknownHostException) with 1 occurrences migrated to:
  https://user:pwd@test1.com ([https](https://user:pwd@test1.com) result UnknownHostException).
* [ ] http://example.com/users_service (404) with 1 occurrences migrated to:
  https://example.com/users_service ([https](https://example.com/users_service) result 404).
* [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://asciidoctor.org with 1 occurrences migrated to:
  https://asciidoctor.org ([https](https://asciidoctor.org) result 200).
* [ ] http://example.com with 15 occurrences migrated to:
  https://example.com ([https](https://example.com) result 200).
* [ ] http://example.com/ with 5 occurrences migrated to:
  https://example.com/ ([https](https://example.com/) result 200).
* [ ] http://github.com/ with 1 occurrences migrated to:
  https://github.com/ ([https](https://github.com/) result 200).
* [ ] http://hello.com with 3 occurrences migrated to:
  https://hello.com ([https](https://hello.com) result 200).
* [ ] http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html with 1 occurrences migrated to:
  https://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html ([https](https://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html) result 200).
* [ ] http://martinfowler.com/bliki/CircuitBreaker.html with 1 occurrences migrated to:
  https://martinfowler.com/bliki/CircuitBreaker.html ([https](https://martinfowler.com/bliki/CircuitBreaker.html) result 200).
* [ ] http://projects.spring.io/spring-cloud/ with 6 occurrences migrated to:
  https://projects.spring.io/spring-cloud/ ([https](https://projects.spring.io/spring-cloud/) result 200).
* [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 3 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* [ ] http://www.gnu.org/licenses/gpl.html with 1 occurrences migrated to:
  https://www.gnu.org/licenses/gpl.html ([https](https://www.gnu.org/licenses/gpl.html) result 200).
* [ ] http://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27 with 1 occurrences migrated to:
  https://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27 ([https](https://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27) result 200).
* [ ] http://commons.apache.org/proper/commons-configuration with 1 occurrences migrated to:
  https://commons.apache.org/proper/commons-configuration ([https](https://commons.apache.org/proper/commons-configuration) result 301).
* [ ] http://creativecommons.org/licenses/MIT/ with 4 occurrences migrated to:
  https://creativecommons.org/licenses/MIT/ ([https](https://creativecommons.org/licenses/MIT/) result 301).
* [ ] http://plugins.jetbrains.com/plugin/6546 with 3 occurrences migrated to:
  https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301).
* [ ] http://raw.github.com/ with 1 occurrences migrated to:
  https://raw.github.com/ ([https](https://raw.github.com/) result 301).
* [ ] http://service.com with 3 occurrences migrated to:
  https://service.com ([https](https://service.com) result 301).
* [ ] http://www.opensource.org/licenses/mit-license.php with 1 occurrences migrated to:
  https://www.opensource.org/licenses/mit-license.php ([https](https://www.opensource.org/licenses/mit-license.php) result 301).
* [ ] http://eclipse.org with 2 occurrences migrated to:
  https://eclipse.org ([https](https://eclipse.org) result 302).
* [ ] http://eclipse.org/m2e/ with 4 occurrences migrated to:
  https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302).
* [ ] http://example2.com/ with 1 occurrences migrated to:
  https://example2.com/ ([https](https://example2.com/) result 302).
* [ ] http://simplegrid.info with 4 occurrences migrated to:
  https://simplegrid.info ([https](https://simplegrid.info) result 302).
* [ ] http://simplegrid.info/ with 1 occurrences migrated to:
  https://simplegrid.info/ ([https](https://simplegrid.info/) result 302).
* [ ] http://www.springsource.com/developer/sts with 2 occurrences migrated to:
  https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302).

# Ignored
These URLs were intentionally ignored.

* http://%s:%s with 1 occurrences
* http://badClients/good with 1 occurrences
* http://badClients/null with 1 occurrences
* http://badClients/ping with 1 occurrences
* http://badClients/timeout with 1 occurrences
* http://bar with 1 occurrences
* http://defaul-host3:8678/eureka/,http://defaul-host4:8678/eureka/ with 1 occurrences
* http://defaul-host4:8678/eureka/ with 2 occurrences
* http://defaul-host5:8678/eureka/ with 2 occurrences
* http://defaul-host6:8678/eureka/ with 2 occurrences
* http://default-host1:8678/eureka/ with 2 occurrences
* http://default-host2:8678/eureka/ with 2 occurrences
* http://default-host3:8678/eureka/ with 2 occurrences
* http://foo with 5 occurrences
* http://foo/ with 2 occurrences
* http://foo/%20bar with 1 occurrences
* http://foo/%20bar?hello=1+2 with 2 occurrences
* http://foo:7001/ with 1 occurrences
* http://foo:7777/ with 1 occurrences
* http://host/doStuff with 1 occurrences
* http://host:7777/Management/health with 1 occurrences
* http://host:7777/Management/info with 1 occurrences
* http://host:7777/Server/Management/health with 1 occurrences
* http://host:7777/Server/Management/info with 1 occurrences
* http://host:7777/Server/health with 1 occurrences
* http://host:7777/Server/info with 1 occurrences
* http://host:7777/health with 1 occurrences
* http://host:7777/info with 1 occurrences
* http://host:8888/Management/health with 3 occurrences
* http://host:8888/Management/info with 3 occurrences
* http://host:8888/health with 2 occurrences
* http://host:8888/info with 2 occurrences
* http://localhost with 135 occurrences
* http://localhost/ with 2 occurrences
* http://localhost/info with 1 occurrences
* http://localhost/ping with 2 occurrences
* http://localhost/status with 1 occurrences
* http://localhost:%d/lazy/sample with 1 occurrences
* http://localhost:%d/service/redirectedUri with 1 occurrences
* http://localhost:5678/configserver with 1 occurrences
* http://localhost:5678/customers with 1 occurrences
* http://localhost:5678/hosts/ with 1 occurrences
* http://localhost:7777/local with 4 occurrences
* http://localhost:8000/health.json with 1 occurrences
* http://localhost:8000/src/test/resources/health.json with 1 occurrences
* http://localhost:8080 with 2 occurrences
* http://localhost:8081 with 3 occurrences
* http://localhost:8383/turbine.stream?cluster=RACES with 1 occurrences
* http://localhost:8383/turbine.stream?cluster=WEB with 1 occurrences
* http://localhost:8678/eureka/ with 1 occurrences
* http://localhost:8761 with 2 occurrences
* http://localhost:8761/eureka/ with 5 occurrences
* http://localhost:9000 with 2 occurrences
* http://mhhost2:0/foo/health with 2 occurrences
* http://mhhost2:0/foo/info with 2 occurrences
* http://myhost2:9000 with 1 occurrences
* http://myhost:8080 with 1 occurrences
* http://myhost:8989 with 1 occurrences
* http://myhost:9000 with 1 occurrences
* http://myservice with 1 occurrences
* http://peer1/eureka/ with 1 occurrences
* http://peer1/eureka/,http://peer2/eureka/,http://peer3/eureka/ with 1 occurrences
* http://peer2/eureka/ with 1 occurrences
* http://region1-zone-host:8678/eureka/ with 2 occurrences
* http://region2-zone-host:8678/eureka/ with 2 occurrences
* http://region4-zone-host:8678/eureka/ with 2 occurrences
* http://simple/ with 1 occurrences
* http://simple/emptypost with 1 occurrences
* http://simple/header with 1 occurrences
* http://simple/path/ with 2 occurrences
* http://simple/post with 1 occurrences
* http://simple/request?param= with 1 occurrences
* http://simple_bad with 1 occurrences
* http://test1.com with 1 occurrences
* http://test1.com,http://test2.com with 1 occurrences
* http://test1.com,http://user2:pwd2@test2.com with 1 occurrences
* http://test2.com with 1 occurrences
* http://test3.com,http://test4.com with 1 occurrences
* http://test3.com,http://user4:pwd4@test4.com with 1 occurrences
* http://test:test@localhost:8761 with 1 occurrences
* http://test@localhost:8761 with 1 occurrences
* http://testService with 1 occurrences
* http://user:password@localhost:8761/eureka with 1 occurrences
* http://user:password@localhost:8761/eureka/ with 1 occurrences
2019-03-26 03:43:54 -05:00
Spring Operator 7ec928600d URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://conor.cc (200) with 4 occurrences could not be migrated:
   ([https](https://conor.cc) result SSLProtocolException).
* [ ] http://richclarkdesign.com (200) with 1 occurrences could not be migrated:
   ([https](https://richclarkdesign.com) result SSLHandshakeException).
* [ ] http://tinysort.sjeiti.com/ (200) with 1 occurrences could not be migrated:
   ([https](https://tinysort.sjeiti.com/) result SSLException).
* [ ] http://unknown-origin.com (200) with 1 occurrences could not be migrated:
   ([https](https://unknown-origin.com) result AnnotatedConnectException).
* [ ] http://www.sjeiti.com/ (301) with 1 occurrences could not be migrated:
   ([https](https://www.sjeiti.com/) result SSLException).
* [ ] http://foo.com (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com) result SSLHandshakeException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://ejohn.org/ (301) with 1 occurrences migrated to:
  https://johnresig.com/ ([https](https://ejohn.org/) result ClosedChannelException).
* [ ] http://ejohn.org/blog/javascript-micro-templating/ (301) with 1 occurrences migrated to:
  https://johnresig.com/blog/javascript-micro-templating/ ([https](https://ejohn.org/blog/javascript-micro-templating/) result ClosedChannelException).
* [ ] http://example3.com/ (302) with 1 occurrences migrated to:
  https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com ([https](https://example3.com/) result ConnectTimeoutException).
* [ ] http://example3.com (302) with 2 occurrences migrated to:
  https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com ([https](https://example3.com) result ConnectTimeoutException).
* [ ] http://192.168.13.90:9999/actuator/health (ConnectTimeoutException) with 1 occurrences migrated to:
  https://192.168.13.90:9999/actuator/health ([https](https://192.168.13.90:9999/actuator/health) result ConnectTimeoutException).
* [ ] http://192.168.13.90:9999/actuator/info (ConnectTimeoutException) with 1 occurrences migrated to:
  https://192.168.13.90:9999/actuator/info ([https](https://192.168.13.90:9999/actuator/info) result ConnectTimeoutException).
* [ ] http://www.w3.org/TR/html4/loose.dtd (ReadTimeoutException) with 1 occurrences migrated to:
  https://www.w3.org/TR/html4/loose.dtd ([https](https://www.w3.org/TR/html4/loose.dtd) result ReadTimeoutException).
* [ ] http://allowed-origin.com (UnknownHostException) with 2 occurrences migrated to:
  https://allowed-origin.com ([https](https://allowed-origin.com) result UnknownHostException).
* [ ] http://compose.docker.io/ (UnknownHostException) with 2 occurrences migrated to:
  https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException).
* [ ] http://custom-example.com (UnknownHostException) with 1 occurrences migrated to:
  https://custom-example.com ([https](https://custom-example.com) result UnknownHostException).
* [ ] http://custom-example.com/ (UnknownHostException) with 1 occurrences migrated to:
  https://custom-example.com/ ([https](https://custom-example.com/) result UnknownHostException).
* [ ] http://earlymade.com (UnknownHostException) with 4 occurrences migrated to:
  https://earlymade.com ([https](https://earlymade.com) result UnknownHostException).
* [ ] http://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ ([https](https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/) result UnknownHostException).
* [ ] http://example.com,http://example2.com (UnknownHostException) with 2 occurrences migrated to:
  https://example.com,http://example2.com ([https](https://example.com,https://example2.com) result UnknownHostException).
* [ ] http://example1.com,http://example2.com (UnknownHostException) with 1 occurrences migrated to:
  https://example1.com,http://example2.com ([https](https://example1.com,https://example2.com) result UnknownHostException).
* [ ] http://first.example.com (UnknownHostException) with 1 occurrences migrated to:
  https://first.example.com ([https](https://first.example.com) result UnknownHostException).
* [ ] http://hostname:port/turbine/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://hostname:port/turbine/turbine.stream ([https](https://hostname:port/turbine/turbine.stream) result UnknownHostException).
* [ ] http://hystrix-app:port/actuator/hystrix.stream (UnknownHostException) with 1 occurrences migrated to:
  https://hystrix-app:port/actuator/hystrix.stream ([https](https://hystrix-app:port/actuator/hystrix.stream) result UnknownHostException).
* [ ] http://legacy.example.com (UnknownHostException) with 1 occurrences migrated to:
  https://legacy.example.com ([https](https://legacy.example.com) result UnknownHostException).
* [ ] http://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME ([https](https://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream ([https](https://my.turbine.sever:8989/turbine.stream) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=customers (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=customers ([https](https://my.turbine.sever:8989/turbine.stream?cluster=customers) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=default (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=default ([https](https://my.turbine.sever:8989/turbine.stream?cluster=default) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=products (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=products ([https](https://my.turbine.sever:8989/turbine.stream?cluster=products) result UnknownHostException).
* [ ] http://sidecar.local.spring.io:5678/configserver/default-master.yml (UnknownHostException) with 1 occurrences migrated to:
  https://sidecar.local.spring.io:5678/configserver/default-master.yml ([https](https://sidecar.local.spring.io:5678/configserver/default-master.yml) result UnknownHostException).
* [ ] http://turbine-hostname:port/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://turbine-hostname:port/turbine.stream ([https](https://turbine-hostname:port/turbine.stream) result UnknownHostException).
* [ ] http://turbine-hostname:port/turbine.stream?cluster= (UnknownHostException) with 1 occurrences migrated to:
  https://turbine-hostname:port/turbine.stream?cluster= ([https](https://turbine-hostname:port/turbine.stream?cluster=) result UnknownHostException).
* [ ] http://user2:pwd2@test2.com (UnknownHostException) with 1 occurrences migrated to:
  https://user2:pwd2@test2.com ([https](https://user2:pwd2@test2.com) result UnknownHostException).
* [ ] http://user:foo@example.com:80/eureka (UnknownHostException) with 1 occurrences migrated to:
  https://user:foo@example.com:80/eureka ([https](https://user:foo@example.com:80/eureka) result UnknownHostException).
* [ ] http://user:pwd@test1.com (UnknownHostException) with 1 occurrences migrated to:
  https://user:pwd@test1.com ([https](https://user:pwd@test1.com) result UnknownHostException).
* [ ] http://example.com/users_service (404) with 1 occurrences migrated to:
  https://example.com/users_service ([https](https://example.com/users_service) result 404).
* [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://asciidoctor.org with 1 occurrences migrated to:
  https://asciidoctor.org ([https](https://asciidoctor.org) result 200).
* [ ] http://example.com with 15 occurrences migrated to:
  https://example.com ([https](https://example.com) result 200).
* [ ] http://example.com/ with 5 occurrences migrated to:
  https://example.com/ ([https](https://example.com/) result 200).
* [ ] http://github.com/ with 1 occurrences migrated to:
  https://github.com/ ([https](https://github.com/) result 200).
* [ ] http://hello.com with 3 occurrences migrated to:
  https://hello.com ([https](https://hello.com) result 200).
* [ ] http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html with 1 occurrences migrated to:
  https://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html ([https](https://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html) result 200).
* [ ] http://martinfowler.com/bliki/CircuitBreaker.html with 1 occurrences migrated to:
  https://martinfowler.com/bliki/CircuitBreaker.html ([https](https://martinfowler.com/bliki/CircuitBreaker.html) result 200).
* [ ] http://projects.spring.io/spring-cloud/ with 6 occurrences migrated to:
  https://projects.spring.io/spring-cloud/ ([https](https://projects.spring.io/spring-cloud/) result 200).
* [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 3 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* [ ] http://www.gnu.org/licenses/gpl.html with 1 occurrences migrated to:
  https://www.gnu.org/licenses/gpl.html ([https](https://www.gnu.org/licenses/gpl.html) result 200).
* [ ] http://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27 with 1 occurrences migrated to:
  https://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27 ([https](https://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27) result 200).
* [ ] http://commons.apache.org/proper/commons-configuration with 1 occurrences migrated to:
  https://commons.apache.org/proper/commons-configuration ([https](https://commons.apache.org/proper/commons-configuration) result 301).
* [ ] http://creativecommons.org/licenses/MIT/ with 4 occurrences migrated to:
  https://creativecommons.org/licenses/MIT/ ([https](https://creativecommons.org/licenses/MIT/) result 301).
* [ ] http://plugins.jetbrains.com/plugin/6546 with 3 occurrences migrated to:
  https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301).
* [ ] http://raw.github.com/ with 1 occurrences migrated to:
  https://raw.github.com/ ([https](https://raw.github.com/) result 301).
* [ ] http://service.com with 3 occurrences migrated to:
  https://service.com ([https](https://service.com) result 301).
* [ ] http://www.opensource.org/licenses/mit-license.php with 1 occurrences migrated to:
  https://www.opensource.org/licenses/mit-license.php ([https](https://www.opensource.org/licenses/mit-license.php) result 301).
* [ ] http://eclipse.org with 2 occurrences migrated to:
  https://eclipse.org ([https](https://eclipse.org) result 302).
* [ ] http://eclipse.org/m2e/ with 4 occurrences migrated to:
  https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302).
* [ ] http://example2.com/ with 1 occurrences migrated to:
  https://example2.com/ ([https](https://example2.com/) result 302).
* [ ] http://simplegrid.info with 4 occurrences migrated to:
  https://simplegrid.info ([https](https://simplegrid.info) result 302).
* [ ] http://simplegrid.info/ with 1 occurrences migrated to:
  https://simplegrid.info/ ([https](https://simplegrid.info/) result 302).
* [ ] http://www.springsource.com/developer/sts with 2 occurrences migrated to:
  https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302).

# Ignored
These URLs were intentionally ignored.

* http://%s:%s with 1 occurrences
* http://badClients/good with 1 occurrences
* http://badClients/null with 1 occurrences
* http://badClients/ping with 1 occurrences
* http://badClients/timeout with 1 occurrences
* http://bar with 1 occurrences
* http://defaul-host3:8678/eureka/,http://defaul-host4:8678/eureka/ with 1 occurrences
* http://defaul-host4:8678/eureka/ with 2 occurrences
* http://defaul-host5:8678/eureka/ with 2 occurrences
* http://defaul-host6:8678/eureka/ with 2 occurrences
* http://default-host1:8678/eureka/ with 2 occurrences
* http://default-host2:8678/eureka/ with 2 occurrences
* http://default-host3:8678/eureka/ with 2 occurrences
* http://foo with 5 occurrences
* http://foo/ with 2 occurrences
* http://foo/%20bar with 1 occurrences
* http://foo/%20bar?hello=1+2 with 2 occurrences
* http://foo:7001/ with 1 occurrences
* http://foo:7777/ with 1 occurrences
* http://host/doStuff with 1 occurrences
* http://host:7777/Management/health with 1 occurrences
* http://host:7777/Management/info with 1 occurrences
* http://host:7777/Server/Management/health with 1 occurrences
* http://host:7777/Server/Management/info with 1 occurrences
* http://host:7777/Server/health with 1 occurrences
* http://host:7777/Server/info with 1 occurrences
* http://host:7777/health with 1 occurrences
* http://host:7777/info with 1 occurrences
* http://host:8888/Management/health with 3 occurrences
* http://host:8888/Management/info with 3 occurrences
* http://host:8888/health with 2 occurrences
* http://host:8888/info with 2 occurrences
* http://localhost with 133 occurrences
* http://localhost/ with 2 occurrences
* http://localhost/info with 1 occurrences
* http://localhost/ping with 2 occurrences
* http://localhost/status with 1 occurrences
* http://localhost:%d/lazy/sample with 1 occurrences
* http://localhost:%d/service/redirectedUri with 1 occurrences
* http://localhost:5678/configserver with 1 occurrences
* http://localhost:5678/customers with 1 occurrences
* http://localhost:5678/hosts/ with 1 occurrences
* http://localhost:7777/local with 4 occurrences
* http://localhost:8000/health.json with 1 occurrences
* http://localhost:8000/src/test/resources/health.json with 1 occurrences
* http://localhost:8080 with 2 occurrences
* http://localhost:8081 with 3 occurrences
* http://localhost:8383/turbine.stream?cluster=RACES with 1 occurrences
* http://localhost:8383/turbine.stream?cluster=WEB with 1 occurrences
* http://localhost:8678/eureka/ with 1 occurrences
* http://localhost:8761 with 2 occurrences
* http://localhost:8761/eureka/ with 5 occurrences
* http://localhost:9000 with 2 occurrences
* http://mhhost2:0/foo/health with 2 occurrences
* http://mhhost2:0/foo/info with 2 occurrences
* http://myhost2:9000 with 1 occurrences
* http://myhost:8080 with 1 occurrences
* http://myhost:8989 with 1 occurrences
* http://myhost:9000 with 1 occurrences
* http://myservice with 1 occurrences
* http://peer1/eureka/ with 1 occurrences
* http://peer1/eureka/,http://peer2/eureka/,http://peer3/eureka/ with 1 occurrences
* http://peer2/eureka/ with 1 occurrences
* http://region1-zone-host:8678/eureka/ with 2 occurrences
* http://region2-zone-host:8678/eureka/ with 2 occurrences
* http://region4-zone-host:8678/eureka/ with 2 occurrences
* http://simple/ with 1 occurrences
* http://simple/emptypost with 1 occurrences
* http://simple/header with 1 occurrences
* http://simple/path/ with 2 occurrences
* http://simple/post with 1 occurrences
* http://simple/request?param= with 1 occurrences
* http://simple_bad with 1 occurrences
* http://test1.com with 1 occurrences
* http://test1.com,http://test2.com with 1 occurrences
* http://test1.com,http://user2:pwd2@test2.com with 1 occurrences
* http://test2.com with 1 occurrences
* http://test3.com,http://test4.com with 1 occurrences
* http://test3.com,http://user4:pwd4@test4.com with 1 occurrences
* http://test:test@localhost:8761 with 1 occurrences
* http://test@localhost:8761 with 1 occurrences
* http://testService with 1 occurrences
* http://user:password@localhost:8761/eureka with 1 occurrences
* http://user:password@localhost:8761/eureka/ with 1 occurrences
2019-03-26 03:43:44 -05:00
Ryan Baxter 743f6079a1 Downgrading contract version 2019-03-25 19:53:04 -04:00
Ryan Baxter fb9f72d17b Updating dependencies 2019-03-25 16:25:14 -04:00
Spring Operator bb56c8a98c URL Cleanup (#3452)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 414 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-25 09:32:57 -04:00
Spring Operator c1771dce56 URL Cleanup (#3451)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 414 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 20:29:33 -04:00
Spring Operator 88b71f05fa URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://conor.cc (200) with 4 occurrences could not be migrated:
   ([https](https://conor.cc) result SSLProtocolException).
* [ ] http://richclarkdesign.com (200) with 1 occurrences could not be migrated:
   ([https](https://richclarkdesign.com) result SSLHandshakeException).
* [ ] http://tinysort.sjeiti.com/ (200) with 1 occurrences could not be migrated:
   ([https](https://tinysort.sjeiti.com/) result SSLException).
* [ ] http://unknown-origin.com (200) with 1 occurrences could not be migrated:
   ([https](https://unknown-origin.com) result AnnotatedConnectException).
* [ ] http://www.sjeiti.com/ (301) with 1 occurrences could not be migrated:
   ([https](https://www.sjeiti.com/) result SSLException).
* [ ] http://foo.com (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com) result SSLHandshakeException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://ejohn.org/ (301) with 1 occurrences migrated to:
  https://johnresig.com/ ([https](https://ejohn.org/) result ClosedChannelException).
* [ ] http://ejohn.org/blog/javascript-micro-templating/ (301) with 1 occurrences migrated to:
  https://johnresig.com/blog/javascript-micro-templating/ ([https](https://ejohn.org/blog/javascript-micro-templating/) result ClosedChannelException).
* [ ] http://example3.com/ (302) with 1 occurrences migrated to:
  https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com ([https](https://example3.com/) result ConnectTimeoutException).
* [ ] http://example3.com (302) with 2 occurrences migrated to:
  https://www.hugedomains.com/domain_profile.cfm?d=example3&e=com ([https](https://example3.com) result ConnectTimeoutException).
* [ ] http://192.168.13.90:9999/actuator/health (ConnectTimeoutException) with 1 occurrences migrated to:
  https://192.168.13.90:9999/actuator/health ([https](https://192.168.13.90:9999/actuator/health) result ConnectTimeoutException).
* [ ] http://192.168.13.90:9999/actuator/info (ConnectTimeoutException) with 1 occurrences migrated to:
  https://192.168.13.90:9999/actuator/info ([https](https://192.168.13.90:9999/actuator/info) result ConnectTimeoutException).
* [ ] http://www.w3.org/TR/html4/loose.dtd (ReadTimeoutException) with 1 occurrences migrated to:
  https://www.w3.org/TR/html4/loose.dtd ([https](https://www.w3.org/TR/html4/loose.dtd) result SSLException).
* [ ] http://%s:%s (UnknownHostException) with 1 occurrences migrated to:
  https://%s:%s ([https](https://%s:%s) result UnknownHostException).
* [ ] http://allowed-origin.com (UnknownHostException) with 2 occurrences migrated to:
  https://allowed-origin.com ([https](https://allowed-origin.com) result UnknownHostException).
* [ ] http://badClients/good (UnknownHostException) with 1 occurrences migrated to:
  https://badClients/good ([https](https://badClients/good) result UnknownHostException).
* [ ] http://badClients/null (UnknownHostException) with 1 occurrences migrated to:
  https://badClients/null ([https](https://badClients/null) result UnknownHostException).
* [ ] http://badClients/ping (UnknownHostException) with 1 occurrences migrated to:
  https://badClients/ping ([https](https://badClients/ping) result UnknownHostException).
* [ ] http://badClients/timeout (UnknownHostException) with 1 occurrences migrated to:
  https://badClients/timeout ([https](https://badClients/timeout) result UnknownHostException).
* [ ] http://bar (UnknownHostException) with 1 occurrences migrated to:
  https://bar ([https](https://bar) result UnknownHostException).
* [ ] http://compose.docker.io/ (UnknownHostException) with 2 occurrences migrated to:
  https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException).
* [ ] http://custom-example.com (UnknownHostException) with 1 occurrences migrated to:
  https://custom-example.com ([https](https://custom-example.com) result UnknownHostException).
* [ ] http://custom-example.com/ (UnknownHostException) with 1 occurrences migrated to:
  https://custom-example.com/ ([https](https://custom-example.com/) result UnknownHostException).
* [ ] http://defaul-host3:8678/eureka/,http://defaul-host4:8678/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://defaul-host3:8678/eureka/,http://defaul-host4:8678/eureka/ ([https](https://defaul-host3:8678/eureka/,https://defaul-host4:8678/eureka/) result UnknownHostException).
* [ ] http://defaul-host4:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://defaul-host4:8678/eureka/ ([https](https://defaul-host4:8678/eureka/) result UnknownHostException).
* [ ] http://defaul-host5:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://defaul-host5:8678/eureka/ ([https](https://defaul-host5:8678/eureka/) result UnknownHostException).
* [ ] http://defaul-host6:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://defaul-host6:8678/eureka/ ([https](https://defaul-host6:8678/eureka/) result UnknownHostException).
* [ ] http://default-host1:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://default-host1:8678/eureka/ ([https](https://default-host1:8678/eureka/) result UnknownHostException).
* [ ] http://default-host2:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://default-host2:8678/eureka/ ([https](https://default-host2:8678/eureka/) result UnknownHostException).
* [ ] http://default-host3:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://default-host3:8678/eureka/ ([https](https://default-host3:8678/eureka/) result UnknownHostException).
* [ ] http://earlymade.com (UnknownHostException) with 4 occurrences migrated to:
  https://earlymade.com ([https](https://earlymade.com) result UnknownHostException).
* [ ] http://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ ([https](https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/) result UnknownHostException).
* [ ] http://example.com,http://example2.com (UnknownHostException) with 2 occurrences migrated to:
  https://example.com,http://example2.com ([https](https://example.com,https://example2.com) result UnknownHostException).
* [ ] http://example1.com,http://example2.com (UnknownHostException) with 1 occurrences migrated to:
  https://example1.com,http://example2.com ([https](https://example1.com,https://example2.com) result UnknownHostException).
* [ ] http://first.example.com (UnknownHostException) with 1 occurrences migrated to:
  https://first.example.com ([https](https://first.example.com) result UnknownHostException).
* [ ] http://foo (UnknownHostException) with 5 occurrences migrated to:
  https://foo ([https](https://foo) result UnknownHostException).
* [ ] http://foo/ (UnknownHostException) with 2 occurrences migrated to:
  https://foo/ ([https](https://foo/) result UnknownHostException).
* [ ] http://foo/%20bar (UnknownHostException) with 1 occurrences migrated to:
  https://foo/%20bar ([https](https://foo/%20bar) result UnknownHostException).
* [ ] http://foo/%20bar?hello=1+2 (UnknownHostException) with 2 occurrences migrated to:
  https://foo/%20bar?hello=1+2 ([https](https://foo/%20bar?hello=1+2) result UnknownHostException).
* [ ] http://foo:7001/ (UnknownHostException) with 1 occurrences migrated to:
  https://foo:7001/ ([https](https://foo:7001/) result UnknownHostException).
* [ ] http://foo:7777/ (UnknownHostException) with 1 occurrences migrated to:
  https://foo:7777/ ([https](https://foo:7777/) result UnknownHostException).
* [ ] http://host/doStuff (UnknownHostException) with 1 occurrences migrated to:
  https://host/doStuff ([https](https://host/doStuff) result UnknownHostException).
* [ ] http://host:7777/Management/health (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/Management/health ([https](https://host:7777/Management/health) result UnknownHostException).
* [ ] http://host:7777/Management/info (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/Management/info ([https](https://host:7777/Management/info) result UnknownHostException).
* [ ] http://host:7777/Server/Management/health (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/Server/Management/health ([https](https://host:7777/Server/Management/health) result UnknownHostException).
* [ ] http://host:7777/Server/Management/info (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/Server/Management/info ([https](https://host:7777/Server/Management/info) result UnknownHostException).
* [ ] http://host:7777/Server/health (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/Server/health ([https](https://host:7777/Server/health) result UnknownHostException).
* [ ] http://host:7777/Server/info (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/Server/info ([https](https://host:7777/Server/info) result UnknownHostException).
* [ ] http://host:7777/health (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/health ([https](https://host:7777/health) result UnknownHostException).
* [ ] http://host:7777/info (UnknownHostException) with 1 occurrences migrated to:
  https://host:7777/info ([https](https://host:7777/info) result UnknownHostException).
* [ ] http://host:8888/Management/health (UnknownHostException) with 3 occurrences migrated to:
  https://host:8888/Management/health ([https](https://host:8888/Management/health) result UnknownHostException).
* [ ] http://host:8888/Management/info (UnknownHostException) with 3 occurrences migrated to:
  https://host:8888/Management/info ([https](https://host:8888/Management/info) result UnknownHostException).
* [ ] http://host:8888/health (UnknownHostException) with 2 occurrences migrated to:
  https://host:8888/health ([https](https://host:8888/health) result UnknownHostException).
* [ ] http://host:8888/info (UnknownHostException) with 2 occurrences migrated to:
  https://host:8888/info ([https](https://host:8888/info) result UnknownHostException).
* [ ] http://hostname:port/turbine/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://hostname:port/turbine/turbine.stream ([https](https://hostname:port/turbine/turbine.stream) result UnknownHostException).
* [ ] http://hystrix-app:port/actuator/hystrix.stream (UnknownHostException) with 1 occurrences migrated to:
  https://hystrix-app:port/actuator/hystrix.stream ([https](https://hystrix-app:port/actuator/hystrix.stream) result UnknownHostException).
* [ ] http://legacy.example.com (UnknownHostException) with 1 occurrences migrated to:
  https://legacy.example.com ([https](https://legacy.example.com) result UnknownHostException).
* [ ] http://mhhost2:0/foo/health (UnknownHostException) with 2 occurrences migrated to:
  https://mhhost2:0/foo/health ([https](https://mhhost2:0/foo/health) result UnknownHostException).
* [ ] http://mhhost2:0/foo/info (UnknownHostException) with 2 occurrences migrated to:
  https://mhhost2:0/foo/info ([https](https://mhhost2:0/foo/info) result UnknownHostException).
* [ ] http://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME ([https](https://my.turbine.server:8080/turbine.stream?cluster=CLUSTERNAME) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream ([https](https://my.turbine.sever:8989/turbine.stream) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=customers (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=customers ([https](https://my.turbine.sever:8989/turbine.stream?cluster=customers) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=default (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=default ([https](https://my.turbine.sever:8989/turbine.stream?cluster=default) result UnknownHostException).
* [ ] http://my.turbine.sever:8989/turbine.stream?cluster=products (UnknownHostException) with 1 occurrences migrated to:
  https://my.turbine.sever:8989/turbine.stream?cluster=products ([https](https://my.turbine.sever:8989/turbine.stream?cluster=products) result UnknownHostException).
* [ ] http://myhost2:9000 (UnknownHostException) with 1 occurrences migrated to:
  https://myhost2:9000 ([https](https://myhost2:9000) result UnknownHostException).
* [ ] http://myhost:8080 (UnknownHostException) with 1 occurrences migrated to:
  https://myhost:8080 ([https](https://myhost:8080) result UnknownHostException).
* [ ] http://myhost:8989 (UnknownHostException) with 1 occurrences migrated to:
  https://myhost:8989 ([https](https://myhost:8989) result UnknownHostException).
* [ ] http://myhost:9000 (UnknownHostException) with 1 occurrences migrated to:
  https://myhost:9000 ([https](https://myhost:9000) result UnknownHostException).
* [ ] http://myservice (UnknownHostException) with 1 occurrences migrated to:
  https://myservice ([https](https://myservice) result UnknownHostException).
* [ ] http://peer1/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://peer1/eureka/ ([https](https://peer1/eureka/) result UnknownHostException).
* [ ] http://peer1/eureka/,http://peer2/eureka/,http://peer3/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://peer1/eureka/,http://peer2/eureka/,http://peer3/eureka/ ([https](https://peer1/eureka/,https://peer2/eureka/,https://peer3/eureka/) result UnknownHostException).
* [ ] http://peer2/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://peer2/eureka/ ([https](https://peer2/eureka/) result UnknownHostException).
* [ ] http://region1-zone-host:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://region1-zone-host:8678/eureka/ ([https](https://region1-zone-host:8678/eureka/) result UnknownHostException).
* [ ] http://region2-zone-host:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://region2-zone-host:8678/eureka/ ([https](https://region2-zone-host:8678/eureka/) result UnknownHostException).
* [ ] http://region4-zone-host:8678/eureka/ (UnknownHostException) with 2 occurrences migrated to:
  https://region4-zone-host:8678/eureka/ ([https](https://region4-zone-host:8678/eureka/) result UnknownHostException).
* [ ] http://sidecar.local.spring.io:5678/configserver/default-master.yml (UnknownHostException) with 1 occurrences migrated to:
  https://sidecar.local.spring.io:5678/configserver/default-master.yml ([https](https://sidecar.local.spring.io:5678/configserver/default-master.yml) result UnknownHostException).
* [ ] http://simple/ (UnknownHostException) with 1 occurrences migrated to:
  https://simple/ ([https](https://simple/) result UnknownHostException).
* [ ] http://simple/emptypost (UnknownHostException) with 1 occurrences migrated to:
  https://simple/emptypost ([https](https://simple/emptypost) result UnknownHostException).
* [ ] http://simple/header (UnknownHostException) with 1 occurrences migrated to:
  https://simple/header ([https](https://simple/header) result UnknownHostException).
* [ ] http://simple/path/ (UnknownHostException) with 2 occurrences migrated to:
  https://simple/path/ ([https](https://simple/path/) result UnknownHostException).
* [ ] http://simple/post (UnknownHostException) with 1 occurrences migrated to:
  https://simple/post ([https](https://simple/post) result UnknownHostException).
* [ ] http://simple/request?param= (UnknownHostException) with 1 occurrences migrated to:
  https://simple/request?param= ([https](https://simple/request?param=) result UnknownHostException).
* [ ] http://simple_bad (UnknownHostException) with 1 occurrences migrated to:
  https://simple_bad ([https](https://simple_bad) result UnknownHostException).
* [ ] http://turbine-hostname:port/turbine.stream (UnknownHostException) with 1 occurrences migrated to:
  https://turbine-hostname:port/turbine.stream ([https](https://turbine-hostname:port/turbine.stream) result UnknownHostException).
* [ ] http://turbine-hostname:port/turbine.stream?cluster= (UnknownHostException) with 1 occurrences migrated to:
  https://turbine-hostname:port/turbine.stream?cluster= ([https](https://turbine-hostname:port/turbine.stream?cluster=) result UnknownHostException).
* [ ] http://user2:pwd2@test2.com (UnknownHostException) with 1 occurrences migrated to:
  https://user2:pwd2@test2.com ([https](https://user2:pwd2@test2.com) result UnknownHostException).
* [ ] http://user:foo@example.com:80/eureka (UnknownHostException) with 1 occurrences migrated to:
  https://user:foo@example.com:80/eureka ([https](https://user:foo@example.com:80/eureka) result UnknownHostException).
* [ ] http://user:password@localhost:8761/eureka (UnknownHostException) with 1 occurrences migrated to:
  https://user:password@localhost:8761/eureka ([https](https://user:password@localhost:8761/eureka) result UnknownHostException).
* [ ] http://user:password@localhost:8761/eureka/ (UnknownHostException) with 1 occurrences migrated to:
  https://user:password@localhost:8761/eureka/ ([https](https://user:password@localhost:8761/eureka/) result UnknownHostException).
* [ ] http://user:pwd@test1.com (UnknownHostException) with 1 occurrences migrated to:
  https://user:pwd@test1.com ([https](https://user:pwd@test1.com) result UnknownHostException).
* [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://asciidoctor.org with 1 occurrences migrated to:
  https://asciidoctor.org ([https](https://asciidoctor.org) result 200).
* [ ] http://example.com with 15 occurrences migrated to:
  https://example.com ([https](https://example.com) result 200).
* [ ] http://example.com/ with 5 occurrences migrated to:
  https://example.com/ ([https](https://example.com/) result 200).
* [ ] http://example.com/users_service with 1 occurrences migrated to:
  https://example.com/users_service ([https](https://example.com/users_service) result 200).
* [ ] http://github.com/ with 1 occurrences migrated to:
  https://github.com/ ([https](https://github.com/) result 200).
* [ ] http://hello.com with 3 occurrences migrated to:
  https://hello.com ([https](https://hello.com) result 200).
* [ ] http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html with 1 occurrences migrated to:
  https://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html ([https](https://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html) result 200).
* [ ] http://martinfowler.com/bliki/CircuitBreaker.html with 1 occurrences migrated to:
  https://martinfowler.com/bliki/CircuitBreaker.html ([https](https://martinfowler.com/bliki/CircuitBreaker.html) result 200).
* [ ] http://projects.spring.io/spring-cloud/ with 6 occurrences migrated to:
  https://projects.spring.io/spring-cloud/ ([https](https://projects.spring.io/spring-cloud/) result 200).
* [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 3 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* [ ] http://www.gnu.org/licenses/gpl.html with 1 occurrences migrated to:
  https://www.gnu.org/licenses/gpl.html ([https](https://www.gnu.org/licenses/gpl.html) result 200).
* [ ] http://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27 with 1 occurrences migrated to:
  https://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27 ([https](https://www.slideshare.net/MikeyCohen1/edge-architecture-ieee-international-conference-on-cloud-engineering-32240146/27) result 200).
* [ ] http://commons.apache.org/proper/commons-configuration with 1 occurrences migrated to:
  https://commons.apache.org/proper/commons-configuration ([https](https://commons.apache.org/proper/commons-configuration) result 301).
* [ ] http://creativecommons.org/licenses/MIT/ with 4 occurrences migrated to:
  https://creativecommons.org/licenses/MIT/ ([https](https://creativecommons.org/licenses/MIT/) result 301).
* [ ] http://plugins.jetbrains.com/plugin/6546 with 3 occurrences migrated to:
  https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301).
* [ ] http://raw.github.com/ with 1 occurrences migrated to:
  https://raw.github.com/ ([https](https://raw.github.com/) result 301).
* [ ] http://service.com with 3 occurrences migrated to:
  https://service.com ([https](https://service.com) result 301).
* [ ] http://www.opensource.org/licenses/mit-license.php with 1 occurrences migrated to:
  https://www.opensource.org/licenses/mit-license.php ([https](https://www.opensource.org/licenses/mit-license.php) result 301).
* [ ] http://eclipse.org with 2 occurrences migrated to:
  https://eclipse.org ([https](https://eclipse.org) result 302).
* [ ] http://eclipse.org/m2e/ with 4 occurrences migrated to:
  https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302).
* [ ] http://example2.com/ with 1 occurrences migrated to:
  https://example2.com/ ([https](https://example2.com/) result 302).
* [ ] http://simplegrid.info with 4 occurrences migrated to:
  https://simplegrid.info ([https](https://simplegrid.info) result 302).
* [ ] http://simplegrid.info/ with 1 occurrences migrated to:
  https://simplegrid.info/ ([https](https://simplegrid.info/) result 302).
* [ ] http://www.springsource.com/developer/sts with 2 occurrences migrated to:
  https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302).

# Ignored
These URLs were intentionally ignored.

* http://localhost with 135 occurrences
* http://localhost/ with 2 occurrences
* http://localhost/info with 1 occurrences
* http://localhost/ping with 2 occurrences
* http://localhost/status with 1 occurrences
* http://localhost:%d/lazy/sample with 1 occurrences
* http://localhost:%d/service/redirectedUri with 1 occurrences
* http://localhost:5678/configserver with 1 occurrences
* http://localhost:5678/customers with 1 occurrences
* http://localhost:5678/hosts/ with 1 occurrences
* http://localhost:7777/local with 4 occurrences
* http://localhost:8000/health.json with 1 occurrences
* http://localhost:8000/src/test/resources/health.json with 1 occurrences
* http://localhost:8080 with 2 occurrences
* http://localhost:8081 with 3 occurrences
* http://localhost:8383/turbine.stream?cluster=RACES with 1 occurrences
* http://localhost:8383/turbine.stream?cluster=WEB with 1 occurrences
* http://localhost:8678/eureka/ with 1 occurrences
* http://localhost:8761 with 2 occurrences
* http://localhost:8761/eureka/ with 5 occurrences
* http://localhost:9000 with 2 occurrences
* http://test1.com with 1 occurrences
* http://test1.com,http://test2.com with 1 occurrences
* http://test1.com,http://user2:pwd2@test2.com with 1 occurrences
* http://test2.com with 1 occurrences
* http://test3.com,http://test4.com with 1 occurrences
* http://test3.com,http://user4:pwd4@test4.com with 1 occurrences
* http://test:test@localhost:8761 with 1 occurrences
* http://test@localhost:8761 with 1 occurrences
* http://testService with 1 occurrences
2019-03-20 15:47:00 -05:00
Craig Andrews 52e4f5ea59 Set traceRequestBody to false by default (#3439)
traceRequestBody requires the body to be buffered which reduces performance and can be problematic, such as when used in combination with `zuul.use-filter=true` and `zuul.servlet-path=/` See https://github.com/spring-cloud/spring-cloud-netflix/issues/3418

traceRequestBody should only be set when logging the request body is actually necessary.
2019-03-19 14:51:42 -04:00
Spring Operator 21e7cca37f URL Cleanup (#3427)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success 
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 25 occurrences migrated to:  
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch with 1 occurrences migrated to:  
  https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch ([https](https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch) result 200).
* http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin with 1 occurrences migrated to:  
  https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin ([https](https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 with 2 occurrences migrated to:  
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 50 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 25 occurrences
2019-03-16 11:58:09 -04:00
Spring Operator 77b8965e29 URL Cleanup (#3411)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success 
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch migrated to:  
  https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch ([https](https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch) result 200).
* http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin migrated to:  
  https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin ([https](https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 migrated to:  
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0
* http://maven.apache.org/xsd/maven-4.0.0.xsd
* http://www.w3.org/2001/XMLSchema-instance
2019-03-11 18:58:19 -04:00
Ryan Baxter 0791a02223 Ignore failing test 2019-03-07 16:17:51 -05:00
Ryan Baxter 8fdc6f0898 Fix health check handler so it is compatible with boot 2.2.0 2019-03-07 16:17:26 -05:00
Marcin Grzejszczak 3d5484e410 Hoxton 2019-03-07 18:12:01 +01:00
Marcin Grzejszczak d289dabfff HTTP to HTTPS 2019-03-07 13:52:09 +01:00
buildmaster 9f766ff4cd Bumping versions to 2.1.2.BUILD-SNAPSHOT after release 2019-03-05 17:29:50 +00:00
buildmaster ed46ed8ca8 Going back to snapshots 2019-03-05 17:29:50 +00:00
buildmaster 87001cd4fe Update SNAPSHOT to 2.1.1.RELEASE 2019-03-05 16:35:33 +00:00
Ryan Baxter 88d4de73c2 Fix potential NPE when extracting data from query params. Fixes #3405 2019-03-04 19:51:16 -05:00
Ryan Baxter 435e94c3f5 Change property name. Fixes #3393 2019-02-27 20:15:25 -05:00
buildmaster 54128d620c Bumping versions to 2.0.4.BUILD-SNAPSHOT after release 2019-02-22 15:45:51 +00:00
buildmaster 08f8ff9ab6 Going back to snapshots 2019-02-22 15:45:51 +00:00
buildmaster b654016e73 Update SNAPSHOT to 2.0.3.RELEASE 2019-02-22 15:38:58 +00:00
Ryan Baxter 53ede01f5e Merge remote-tracking branch 'origin/2.0.x' 2019-02-22 07:49:29 -05:00
Ryan Baxter f55c95b5f3 Fix encoding when retryring requests (#3398) 2019-02-22 07:36:33 -05:00
Olga Maciaszek-Sharma 62363587e0 Merge branch '2.0.x'
# Conflicts:
#	docs/README.adoc
#	pom.xml
#	spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.java
#	spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClientConfiguration.java
#	spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/ribbon/eureka/ConditionalOnRibbonAndEurekaEnabled.java
#	spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfigurationTests.java
2019-02-17 18:48:50 +01:00
Olga Maciaszek-Sharma b6f32d1044 Merge branch '2.0.x'
# Conflicts:
#	docs/README.adoc
#	pom.xml
#	spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.java
#	spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClientConfiguration.java
#	spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/ribbon/eureka/ConditionalOnRibbonAndEurekaEnabled.java
#	spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfigurationTests.java
2019-02-17 18:47:28 +01:00
Olga Maciaszek-Sharma 80af1ddcf5 Make spring.cloud.discovery.enabled work as eureka.client.enabled (#3390)
* Make spring.cloud.discovery.enabled work as eureka.client.enabled

* Switch to using `ConditionalOnDiscoveryEnabled`. Add info in docs.
2019-02-17 17:37:42 +01:00
Spencer Gibb 2b241232da Updates concurrency-limits to v0.1.12 2019-02-15 16:43:48 -05:00
Spencer Gibb 5824f38184 Ignores test 2019-02-15 16:43:28 -05:00
buildmaster 921d1dbae5 Bumping versions 2019-02-14 17:43:06 +00:00
Spencer Gibb b0f43cef69 Updates eureka server java 11 dependencies.
fixes gh-3391
2019-02-14 12:40:42 -05:00
Ryan Baxter 1cf6375ae6 Merge remote-tracking branch 'origin/2.0.x' 2019-02-13 15:52:22 -06:00
周立 8a01660f6b fix SidecarController's broken link. (#3381)
fix SidecarController's broken link.
2019-02-13 15:51:10 -06:00
Olga Maciaszek-Sharma 8c4d6a55a7 Set failsOnError to true. (#3386) 2019-02-12 13:37:39 +01:00
davids-backbase c8e9ad92a9 Use server.servlet.context-path instead of server.context-path for prefix to health check and info URLs (#3382) 2019-02-08 11:40:27 -05:00
Olga Maciaszek-Sharma 805818941c Fix and enforce checkstyle (#3380)
* Checkstyle improvements.

* Checkstyle improvements.

* Checkstyle improvements.

* Finish checkstyle cleanup. Turn failOnError on.

* Fix incorrect final class
2019-02-07 22:16:44 +01:00
Ryan Baxter b0335afd69 Merge remote-tracking branch 'origin/2.0.x' 2019-02-04 10:00:29 -05:00
Pan Li ebfc626538 Fix defect of hystrix stream queue configuration (#3374)
* Support 2 config format send-rate and sendRate.
* If both given, send-rate will be ignore.
Fixes #3359
2019-02-04 09:59:56 -05:00
Dmitrii Priporov 33b84b15e1 Issue-3305. Way to set securePortEnabled option for sidecar (#3356)
* added securePortEnabled option for sidecar
Fixes #3305
2019-02-01 12:23:16 -05:00
Spencer Gibb 273626208b Update to Netflix/concurrency-limits v0.1.10
fixes gh-3369
2019-01-31 13:58:03 -05:00
buildmaster 1026bee78d Bumping versions 2019-01-25 13:17:06 +00:00
buildmaster 20e04bf8e6 Bumping versions to 2.1.1.BUILD-SNAPSHOT after release 2019-01-22 18:20:04 +00:00
buildmaster 589bf3868d Going back to snapshots 2019-01-22 18:20:03 +00:00
buildmaster 50be967c05 Update SNAPSHOT to 2.1.0.RELEASE 2019-01-22 18:10:57 +00:00
Spencer Gibb 5ecd0842ce Merge branch '2.0.x' 2019-01-18 15:56:34 -05:00
Spencer Gibb 567ebda132 Adds ability to get keep alive time from a string.
fixes gh-3038
2019-01-18 15:49:43 -05:00
Spencer Gibb f524c3bb2a Updates stubrunner to 2.0.2.RELEASE 2019-01-18 15:49:43 -05:00
Spencer Gibb 38b8182259 Bumps spring cloud build to 2.1.2.BUILD-SNAPSHOT 2019-01-12 13:03:55 -05:00
Spencer Gibb e460b94b90 Moves Maintenance Mode section to file and includes it in readme 2019-01-07 15:50:15 -05:00
Ryan Baxter 7c6be558f9 Merge remote-tracking branch 'origin/2.0.x' 2019-01-07 10:22:51 -05:00
Ryan Baxter 67f472771e Decode query params in RequestContentDataExtractor (#3321)
* Decode query params in RequestContentDataExtractor.  Fixes #3300
2019-01-07 10:21:15 -05:00
buildmaster 4f316bd4b4 Bumping versions 2019-01-03 17:01:13 +00:00
buildmaster cdaf03ce09 Going back to snapshots 2018-12-20 21:09:55 +00:00
buildmaster 74f769d8dd Update SNAPSHOT to 2.1.0.RC3 2018-12-20 21:06:15 +00:00
Ryan Baxter b3e4ced142 Merge remote-tracking branch 'origin/2.0.x' 2018-12-19 15:15:42 -05:00
Ryan Baxter 66a67bb353 Code replaced by micrometer. Fixes #3326 2018-12-19 15:14:38 -05:00
Ryan Baxter e219783d40 Add documentation for maintenance mode modules 2018-12-19 11:43:50 -05:00
Ryan Baxter ed56c5c1f2 Merge remote-tracking branch 'origin/2.0.x' 2018-12-18 19:36:43 -05:00
Zhanwei Wang 55884acd85 Fix compatible issue with spring boot 2.0 (#3323) 2018-12-18 19:35:28 -05:00
Ryan Baxter 3659a9206a Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2018-12-17 11:26:18 -05:00
Ryan Baxter 91ce95babe Merge remote-tracking branch 'origin/2.0.x' 2018-12-17 11:26:03 -05:00
Ryan Baxter 153bf0ea63 Merge remote-tracking branch 'origin/1.4.x' into 2.0.x 2018-12-17 11:10:43 -05:00
Ryan Baxter 4ab9897b3b Merge remote-tracking branch 'origin/1.3.x' into 1.4.x 2018-12-17 10:09:28 -05:00
ivansjg 2fffb2606e Inner map metrics with same name are being overwritten on actuator me… (#3317)
* Inner map metrics with same name are being overwritten on actuator metrics endpoint

* Add Hystrix Inner map metrics tests
2018-12-17 10:08:19 -05:00
buildmaster 0bab3451b5 Going back to snapshots 2018-12-11 21:49:06 +00:00
buildmaster d25103ebdb Update SNAPSHOT to 2.1.0.RC2 2018-12-11 21:46:16 +00:00
buildmaster af99c1b403 Going back to snapshots 2018-12-11 16:35:06 +00:00
buildmaster 5eb8ceadf2 Update SNAPSHOT to 2.1.0.RC1 2018-12-11 16:32:01 +00:00
Ryan Baxter 7bca5019f6 Fixing merge issue. 2018-12-10 19:33:19 -05:00
Spencer Gibb 129e4618ea Merge branch '2.0.x' 2018-12-10 15:41:21 -05:00
Craig Andrews 89ed8219cb Conditionally use ZuulServletFilter instead of ZuulServlet
Using the filter instead of the servlet allow unhandled/ignored requests to pass through Zuul to be handled by something else, as opposed to the servlet which cannot do so.

See https://github.com/spring-cloud/spring-cloud-netflix/issues/2887
2018-12-10 15:40:06 -05:00
Spencer Gibb 703b4ce577 Merge branch 'candrews-patch-1' 2018-12-10 15:38:12 -05:00
Craig Andrews 74eee18701 Conditionally use ZuulServletFilter instead of ZuulServlet
Using the filter instead of the servlet allow unhandled/ignored requests to pass through Zuul to be handled by something else, as opposed to the servlet which cannot do so.

See https://github.com/spring-cloud/spring-cloud-netflix/issues/2887
2018-12-10 15:37:51 -05:00
Spencer Gibb 25aca6b548 Handles null dispatcherServletPath
fixes gh-3259
2018-12-10 13:22:47 -05:00
Spencer Gibb 0ad43e1018 Fixes formatting 2018-12-10 13:13:20 -05:00
Ryan Baxter ec92f48c76 Fixing image name 2018-12-10 12:23:00 -05:00
Ryan Baxter cfdaf345e3 Add documentation about JAXB dependencies when using JDK 11. Fixes #3244 2018-12-10 12:18:04 -05:00
Eric Bussieres b0e4250a4b Fix typo in documentation (#3312) 2018-12-09 00:45:23 -05:00
Ryan Baxter 3892a3a711 back to jdk 8 2018-12-07 12:35:22 -05:00
Ryan Baxter 438f7360c7 using jdk 11 2018-12-07 12:29:35 -05:00
bhattankit a1f7bab91a Added option to not decode URL. Fixes gh-2178 (#3306)
* Added a way for consumers to override the default behavior or decoding and re-encoding URL using zuul.decodeUrl property.
* Fixed gh-2178
2018-12-06 21:22:53 +01:00
ailin zhou 60bb89293c Submit PR #3276 against the 2.0.x branch (#3297)
* An enhancement when multiple HystrixConcurrencyStrategy detected. Fixes #3256

* replace exception with wran log
2018-12-04 09:19:28 +01:00
Tim Ysewyn 3ad07748b2 Added the instance id to the EurekaServiceInstance, EurekaRegistration and RibbonLoadBalancerClient (#3215)
* Added the instance id to the `EurekaServiceInstance`, `EurekaRegistration` and `RibbonLoadBalancerClient`

* Fixed failing test
2018-11-29 07:38:39 -05:00
Spencer Gibb 1540329624 Avoid early references to DiscoveryClient.
Along with similar changes in
https://github.com/spring-cloud/spring-cloud-commons/issues/451
this allows the port to be resolved before registering with eureka.

Fixes gh-3294
2018-11-28 15:07:12 -05:00
Stephan Windmüller 151fad898b Document workaround for conflicting Thymeleaf dependency (#3291)
Fixes gh-3290
2018-11-26 16:19:42 -05:00
Spencer Gibb ffc2dc804c Merge branch '2.0.x' 2018-11-20 16:52:25 -05:00
Kristine Jetzke aa757592b6 Upgrade Hystrix to 1.5.18 (#3288)
Hystrix 1.5.11 was re-released as 1.5.18, s. Netflix/Hystrix#1891 and https://github.com/Netflix/Hystrix/releases/tag/v1.5.18

This PR replaces #3281
2018-11-20 16:50:13 -05:00
Spencer Gibb 78adf15eea Restores and deprecates removed properties in InstanceRegistryProperties
Happened in #3257.

fixes gh-3286
2018-11-20 11:27:19 -05:00
buildmaster 5264f3fa26 Going back to snapshots 2018-11-19 23:15:15 +00:00
buildmaster 5edbf114a6 Update SNAPSHOT to 2.1.0.M3 2018-11-19 23:12:21 +00:00
Ryan Baxter 63d07cc5fd Merge remote-tracking branch 'origin/2.0.x' 2018-11-19 16:16:23 -05:00
saga a09a55eea7 upgrade eureka version to latest (#3280) 2018-11-19 09:24:02 -05:00
buildmaster 9f5f246209 Going back to snapshots 2018-11-18 09:32:12 +00:00
buildmaster 71f9aa5c5b Update SNAPSHOT to 2.1.0.M2 2018-11-18 09:29:18 +00:00
Nastya Smirnova 90290757cb Add support for CORS requests (#3278) 2018-11-16 16:15:49 -05:00
Spencer Gibb 12f1476974 Upgrades to eureka 1.9.7
fixes gh-3275
2018-11-12 17:34:32 -05:00
saga f33895af6d upgrade ribbon version (#3271) 2018-11-12 12:09:02 -05:00
saga 195cd3e049 Upgrade eureka version (#3257)
* Upgrade eureka version

* Update the code
2018-11-07 14:20:18 -05:00
Ryan Baxter dfdc6c39e9 Merge remote-tracking branch 'origin/1.4.x' into 2.0.x 2018-10-30 19:39:03 -04:00
Spencer Gibb 00587bae01 Updates s-c-build to 2.0.5.BUILD-SNAPSHOT 2018-10-23 17:09:42 -04:00
buildmaster 504ff8e7d4 Bumping versions to 2.0.3.BUILD-SNAPSHOT after release 2018-10-23 18:03:02 +00:00
buildmaster 1510258e2b Going back to snapshots 2018-10-23 18:03:01 +00:00
buildmaster 59a4e430a0 Update SNAPSHOT to 2.0.2.RELEASE 2018-10-23 17:54:55 +00:00
Ryan Baxter 70008f7717 Fix documentation about backoff policies. 2018-10-23 09:12:53 -04:00
Olga Maciaszek-Sharma 6859b7a835 Merge pull request #3242 from spring-cloud/deprecate-core
Deprecate spring-cloud-netflix-core and move functionality over to spring-cloud-netflix-hystrix
2018-10-22 11:15:28 +02:00
Ryan Baxter 1897c958d1 Check ssl certificate property inside the bean creation method so that when disabled we still create a RestTemplate bean. Fixes #3239 (#3241) 2018-10-19 13:58:01 -04:00
Olga Maciaszek-Sharma b5cf29437f Add license. 2018-10-19 16:56:10 +02:00
Olga Maciaszek-Sharma 427a9721c2 Remove unnecessary configuration metadata. 2018-10-19 16:48:51 +02:00
Olga Maciaszek-Sharma 463f4d2e24 Deprecate spring-cloud-netflix-core module, move functionality over to
spring-cloud-netflix-hystrix. Fixes gh-3216
2018-10-19 16:45:19 +02:00
Ryan Baxter 0c3fbc34f6 Do Not Use AIM Proxy In EurekaClient (#3240)
* By not using the proxy in the EurekaClient we avoid the problem of trying to fetch the bean during shutdown.  Fixes #3174
2018-10-19 10:42:25 -04:00
buildmaster 01ac98df8f Bumping versions to 1.4.7.BUILD-SNAPSHOT after release 2018-10-15 20:55:16 +00:00
buildmaster 3a62567ec8 Going back to snapshots 2018-10-15 20:55:15 +00:00
buildmaster 3f0a43f913 Update SNAPSHOT to Edgware.SR5 2018-10-15 20:44:32 +00:00
Fabri Di Napoli 53e7464a6e Sidecar: add accept-all-ssl-certificates property in order to be able to use https health checks with self-signed certificates (#3224)
* Add acceptAllSslCertificates in SidecarProperties
2018-10-15 11:02:09 -04:00
David Liu 9eb5e64cd0 Use the appname and id from in mem instanceInfo object instead of raw config (#3212) 2018-10-15 09:13:28 -04:00
Ryan Baxter edd24bc51b Only copy the requestentity in zuul if the request is retryable. Fixes #2903 (#3221) 2018-10-09 09:38:24 -04:00
Spencer Gibb a69c57ab4a Add workaround for zuul staticness 2018-10-05 20:30:15 -04:00
Spencer Gibb 027c150ef2 Add workaround for zuul staticness 2018-10-05 19:23:23 -04:00
Spencer Gibb 4ee2ff7199 Merge branch '2.0.x' 2018-10-05 17:38:59 -04:00
Spencer Gibb 8bfc0d514c Adds ConditionalOnClass for HealthIndicatorAutoConfiguration in HystrixAutoConfiguration
fixes gh-3161
2018-10-05 17:38:43 -04:00
Spencer Gibb 8ac4137f0d Merge branch '2.0.x' 2018-10-05 17:18:31 -04:00
Spencer Gibb e814cdabb6 Adds HystrixCommands.fallback(Function<Throwable, Publisher<T>>)
fixes gh-3210
2018-10-05 17:17:56 -04:00
Spencer Gibb a55470b3d4 Removes pinned jackson version 2018-10-05 15:11:20 -04:00
Spencer Gibb 259c18c978 Adds profile detection back 2018-10-05 14:52:18 -04:00
Spencer Gibb bdb56b7bd7 Updates concurrency limits to 0.1.6 2018-10-05 14:46:15 -04:00
Spencer Gibb b3ba26d5f0 Initialize fields for each test 2018-10-05 14:46:15 -04:00
Marcin Grzejszczak f8cbbe792c Made the build jdk11 compatible 2018-10-05 14:36:13 +02:00
Ryan Baxter 8125edd772 Removing test that does not belong in 2.0.x branch 2018-10-02 14:34:36 -04:00
Spencer Gibb bc4dfc6b5b Fixes broken test 2018-10-02 13:27:08 -04:00
Ryan Baxter a0041e1d63 Adding additional-spring-configuration-metadata for different modules 2018-10-02 10:05:13 -04:00
Ryan Baxter f53ff6d45f Merge remote-tracking branch 'origin/1.4.x' into 2.0.x 2018-10-02 09:48:02 -04:00
Ryan Baxter 482deb0485 Adds additional-spring-configuration-metadata. Fixes #3164 2018-10-02 09:43:06 -04:00
Marcin Grzejszczak abc5f7d9d5 Bumped Netflix to use Build 2.1.0 2018-10-02 11:59:26 +02:00
Dennis Effing 81579f522f Fix for #1251 (#3211)
Example uses the same value of eureka.client.serviceUrl.defaultZone for all peers. The eureka server knows who it is and doesn't attempt to replicate to itself [1], so this simplification will work.

[1]https://github.com/Netflix/eureka/blob/v1.4.10/eureka-core/src/main/java/com/netflix/eureka/registry/PeerAwareInstanceRegistryImpl.java#L616-L619

Cherry picked from commit 4b40a45
2018-09-26 16:22:40 -04:00
buildmaster bcf05e8d03 Going back to snapshots 2018-09-21 20:00:23 +00:00
buildmaster 6e067e8d33 Update SNAPSHOT to Greenwich.M1 2018-09-21 19:56:31 +00:00
durigon cd70fb5023 Refactor String#replaceAll (#3199)
If we repeatedly call String#replaceAll, we internally repeatedly call the regular expression pattern compilation every time as following:

```java
    public String replaceAll(String regex, String replacement) {
        return Pattern.compile(regex).matcher(this).replaceAll(replacement);
    }
```
The modifications are to keep the compiled pattern.
Therefore, compiling a relatively expensive regular expression pattern does not have to be done every time.
2018-09-19 20:40:39 -04:00
Spencer Gibb 458141774a Updates concurrency-limits.version to 0.1.4 2018-09-19 18:01:29 -04:00
Spencer Gibb a7ec36fa3a fixes broken test 2018-09-14 14:26:56 -04:00
Spencer Gibb ace1ef7ebe Implements MVC and Webflux concurrency limits. (#3165)
Creates a MVC HandlerInterceptor and Webflux WebFilter.

Also creates a MicrometerMetricRegistry.
2018-09-14 14:25:40 -04:00
Spencer Gibb afc62da1fe polish 2018-09-14 13:53:02 -04:00
kjc14f 3dbcf46d0e Added a whitespace in UI error message for consistent user experience (#3187) 2018-09-12 20:31:48 -04:00
Olga Maciaszek-Sharma 30a62d8fb9 Merge pull request #3181 from OlgaMaciaszek/gh-304-add-discovery-clients-order-support
Gh 304 add discovery clients order support
2018-09-10 18:24:12 +02:00
Olga Maciaszek-Sharma adcaa71b68 empty commit to retrigger build 2018-09-10 18:05:36 +02:00
Olga Maciaszek-Sharma ca1b770c0b Reorder imports with Spring JavaFormatter Idea Plugin. 2018-09-10 09:32:49 +02:00
Spencer Gibb bb800f657e Updates contract version to 2.0.1.RELEASE 2018-09-07 12:45:28 -04:00
Olga Maciaszek-Sharma a256e3b8c1 Add equals, hashcode and toString entries for order. 2018-09-07 14:23:50 +02:00
Olga Maciaszek-Sharma 296ee76e72 Switch to passing order under eureka client properties. 2018-09-07 11:30:00 +02:00
Olga Maciaszek-Sharma c347facba3 Merge remote-tracking branch 'upstream/master' into gh-304-add-discovery-clients-order-support 2018-09-06 10:15:12 +02:00
Ryan Baxter 6e8ef02a14 Allow the host header to be included if addHostHeader is true. Fixes #3171 (#3177) 2018-09-05 20:39:45 -04:00
chenkunyun 9287f446dd Adds warning log if route contains bad regex
Fixes gh-2956
2018-09-05 09:47:54 -04:00
andersenleo 3ef01f79db Add 'hint' parameter to overloaded methods in RibbonLoadBalancerClient (#3012)
Fixes gh-3009
2018-09-05 09:19:05 -04:00
Spencer Gibb 0f7c64325e Merge branch 'ebjwc-gh-3122' 2018-09-05 09:07:09 -04:00
Tomasz Juchniewicz 6cb1ec0fa1 Allow to disable compression in Apache HttpClient
Fixes gh-3122
2018-09-05 09:06:54 -04:00
Ryan Baxter dd19bc5ba3 Fixing typo 2018-09-04 14:24:36 -04:00
Spencer Gibb 3bde761e32 Adds @AutoConfigureBefore(BindingServiceConfiguration.class) back.
This is now a requirement for doing @EnableBinding on autoconfiguration.
2018-08-24 11:56:57 -04:00
Spencer Gibb 1759febe5d Removes @AutoConfigureBefore(BindingServiceConfiguration.class)
https://github.com/spring-cloud/spring-cloud-stream/issues/1450 was fixed
2018-08-22 10:52:50 -04:00
Spencer Gibb 07cfc17797 Temporarily fixes stream bug.
https://github.com/spring-cloud/spring-cloud-stream/issues/1450
2018-08-21 14:43:23 -04:00
Spencer Gibb 01171fb1b0 Fixes binary incompatibility with assertj versions. 2018-08-21 14:42:48 -04:00
Spencer Gibb 12583fd0c2 Moves away from @EventListener to ApplicationListeners 2018-08-21 11:51:58 -04:00
Ryan Baxter 46719c0c31 Fix invalid URI error when Feign request URI does not end in / (#3136)
* Fix invalid URI error when Feign request URI does not end in /
2018-08-13 14:08:55 -04:00
Spencer Gibb c8c4dbd050 Removes spring.main.allow-bean-definition-overriding=true 2018-08-08 15:11:10 -04:00
Spencer Gibb 2b496ca8af Updates to unignore stream tests with temporary property set 2018-08-07 17:14:59 -04:00
Ryan Baxter d98b3ce3d6 Remove commented out lines 2018-08-06 10:27:46 -04:00
Ryan Baxter f19c7fbbe2 Exclude Netty dependencies. Fixes #3119 2018-08-06 10:25:36 -04:00
Spencer Gibb 6e799423d5 Changes for boot 2.1.0 compatibility 2018-08-02 15:15:39 -04:00
Spencer Gibb 3f15569518 Updates to build 2.1.0 2018-08-01 19:12:40 -04:00
buildmaster 4aec32fde0 Bumping versions to 2.0.2.BUILD-SNAPSHOT after release 2018-07-31 18:56:56 +00:00
buildmaster 5c062ef01a Going back to snapshots 2018-07-31 18:56:55 +00:00
buildmaster d67584629d Update SNAPSHOT to 2.0.1.RELEASE 2018-07-31 18:51:46 +00:00
Ryan Baxter c4fcbdd516 Updating dependencies version 2018-07-31 09:45:01 -04:00
Ryan Baxter 4e30fa0448 Merge 1.4.x into master 2018-07-31 09:28:07 -04:00
Ryan Baxter fd20f81885 Make sure management path is set correctly when not using metadata provider. Fixes #3098 (#3100) 2018-07-30 13:48:46 -04:00
Ryan Baxter cf0d54450a Inject OK Http client bean instead of using variable. Fixes #43 in spring cloud openfeign. 2018-07-24 09:42:58 -04:00
Marcin Grzejszczak 2728a73959 Fail at the end 2018-07-20 15:50:28 +02:00
Marcin Grzejszczak d41b113574 Changed build to 2.0.3.BS 2018-07-20 15:45:20 +02:00
Marcin Grzejszczak 84799a5ec0 Added compile only mode 2018-07-20 14:48:21 +02:00
Dave Syer d153f26a06 Use a class that actually exists in @ConditionalOnMissingClass
Fixes #3089
2018-07-20 10:14:11 +01:00
Patrick Way 82fcb82d92 fixes #3053 (#3079)
* fixes 3053 Use RibbonStatsRecorder for updating ServerStats upon sucessful requests
2018-07-19 20:03:46 -04:00
Ryan Baxter 5f66a0bdb1 Fixing tests 2018-07-19 19:58:36 -04:00
Ryan Baxter 6690688098 Fixes incorrect management context path property in Eureka config. Fixes #3088. 2018-07-19 16:05:05 -04:00
John Huang 6d60391e0c Fix #3082, trim the urls in eureka.client.service-url.defaultZone (#3084) 2018-07-18 09:56:51 -04:00
trickert76 6a2d5da5fe A small fix to avoid overriding a metapmap configpath that is … (#3074)
Avoid overriding a metapmap configpath
2018-07-16 15:51:31 -04:00
Ryan Baxter eb87e49e46 change "management.metrics.hystrix.enabled" to "management.metrics.binders.hystrix.enabled". Fixes 3078. 2018-07-16 15:45:31 -04:00
Ryan Baxter d699b1d2c0 Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2018-07-16 15:44:40 -04:00
Ryan Baxter ba03f218e6 Updating Spring Cloud Contract to 2.0.0.RELEASE 2018-07-16 15:44:22 -04:00
Marcelo Diniz 1bca9371dc Do not strip content-encoding header, fixes gh-3059 (#3062) 2018-07-16 15:42:46 -04:00
Bertrand Renuart cb0a1d6d83 Invoke super.onCacheRefreshed() before custom logic (#2604) 2018-07-12 07:43:51 -04:00
Ryan Baxter 42449ee34e Check EurkaClient proxy before casting to DiscoveryClient. Fixes #3058 (#3070) 2018-07-11 16:48:00 -04:00
Dmitrii Priporov 26331d1a2c Return HTTP status code 504 for Hystrix timeout in Zuul proxy (issue 2965) (#3060)
* Fixes gh-2965
2018-07-10 15:05:01 -04:00
Dmitrii Priporov cef5b26425 Don't removed form body param if query param has same name (#3048)
* Fixes gh-2815
2018-07-10 14:17:55 -04:00
AddoZhang 965fbf847b Filter out service without instances from health status (#3068)
* #3063 filter out service without instances from health status

* #3063 use not empty condition
2018-07-10 14:03:17 -04:00
Ryan Baxter f91a1d2d5c Create a ZuulException to be passed to ZuulRuntimeException. Fixes #3033 (#3067) 2018-07-09 19:36:51 -04:00
André Schreck 90c78d4c47 Fixed stream url on index page (#3037) 2018-07-02 20:09:16 -04:00
Dmitrii Priporov 510ebe09d6 Conditionally add headers. (#3047)
* Fixes gh-3036
2018-07-02 19:38:29 -04:00
Spencer Gibb 7f5dbfdf30 Make HystrixMetricsBinder conditional on class
fixes gh-3051
2018-07-02 13:51:46 -04:00
Spencer Gibb 1e41dde42c bump versions 2018-07-02 13:51:06 -04:00
arkin 7630acffc6 Fixes Ribbon Apache Client Configuration Effectively Ignoring PoolKeepAliveTime (#3039)
* Fixes Ribbon Apache Client Configuration Effectively Ignoring PoolKeepAliveTime
2018-06-29 15:49:46 -04:00
buildmaster f8f5a88ec6 Bumping versions to 1.4.6.BUILD-SNAPSHOT after release 2018-06-29 15:45:55 +00:00
buildmaster d84b32fc92 Going back to snapshots 2018-06-29 15:45:54 +00:00
buildmaster 6eff7e25a3 Update SNAPSHOT to 1.4.5.RELEASE 2018-06-29 15:16:42 +00:00
Ryan Baxter a57c719649 Disable servo by default. (#3041) 2018-06-29 09:30:57 -04:00
Ryan Baxter 13c2500d0e Merge remote-tracking branch 'origin/1.4.x' 2018-06-27 15:55:08 -04:00
Taras Danylchuk c181163a75 fixes https://github.com/spring-cloud/spring-cloud-netflix/issues/2972 (#3018)
root cause:
cached bean trying to re-register
resolution summary:
get re-created bean from context to re-register
2018-06-27 11:46:34 -04:00
Ryan Baxter 8af3ae8af8 Use management metadata in sidecar. Fixes 2859. (#3028) 2018-06-26 10:36:46 -04:00
Spencer Gibb 02a0cacd34 Changes backend to back end.
reverts #3024
2018-06-26 10:33:15 -04:00
Taras Danylchuk 2b3235e6c9 bump eureka version (#3027)
fixes gh-2490
2018-06-26 07:18:33 -04:00
Anvy Zhang 0bc8ae07a2 Optimize the expression of backend (#3024) 2018-06-25 14:12:25 -04:00
Ryan Baxter ab7b0fb3a8 Clarify health and status url context path docs. Fixes #2804. 2018-06-25 09:30:48 -04:00
Ryan Baxter 7b75fe934e Return 404 upstream when using Eureka and RestTemplate. Fixes #2861 (#3023) 2018-06-25 09:05:28 -04:00
Yongsung Yoon 8c7116b2d8 Add support cluster query param in TurbineStream (#3001) 2018-06-21 12:39:41 -04:00
buildmaster 80e6f99862 Bumping versions to 2.0.1.BUILD-SNAPSHOT after release 2018-06-18 19:31:49 +00:00
buildmaster 188e80c2b2 Going back to snapshots 2018-06-18 19:31:48 +00:00
buildmaster 04a5676403 Update SNAPSHOT to 2.0.0.RELEASE 2018-06-18 19:21:09 +00:00
Spencer Gibb 2df81038f9 Adds .jdk8 file back 2018-06-15 14:32:06 -04:00
Ryan Baxter 381a097045 Does not set accept-encoding header when zuul proxies request if already present. Fixes #2998 (#3011) 2018-06-15 14:16:23 -04:00
Spencer Gibb c5df6ad58f Auto-configures HystrixMetricsBinder
fixes gh-3007
2018-06-13 18:12:45 -04:00
Ryan Baxter 6cb0257630 Merge remote-tracking branch 'origin/1.4.x' 2018-06-11 09:28:01 -04:00
Ryan Baxter 0970a3ef62 Adding boot autoconfigure processor 2018-06-11 05:21:27 -04:00
Ryan Baxter 50b53c4221 Merge remote-tracking branch 'origin/1.4.x' 2018-06-07 20:03:38 -04:00
Spencer Gibb bb446cb579 Removes atlas starter and docs
fixes gh-2997
2018-06-07 11:57:55 -04:00
Ryan Baxter d590ccb7ad Remove ignores. Fixes #2538 2018-06-06 19:32:48 -04:00
Ryan Baxter d90a61f176 Adding documentation for security Eureka Server (#2992)
* Adding documentation for security Eureka Server.
2018-06-06 10:08:27 -04:00
Ryan Baxter 444584ce19 Update /hystrix.stream docs for Boot 2.0. Fixes #2785 2018-06-05 11:06:29 -04:00
Ryan Baxter ee87cab922 Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2018-06-01 17:06:16 -04:00
Ryan Baxter 273d75b9fd Move to using WebServerInitializedEvent that works for both servlet and reactive apps. Fixes #2948 2018-06-01 17:05:58 -04:00
Spencer Gibb f79954ccdd Updates to build 2.0.2 2018-06-01 15:48:54 -04:00
Ryan Baxter 6497279b75 Updates to Eureka 1.9.2. Fixes #2941. 2018-06-01 15:41:17 -04:00
Ryan Baxter 98f939da12 Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2018-06-01 15:40:24 -04:00
Ryan Baxter 1e7b026f6d Moving hystrix contract to sc-build 2.0.2 BS 2018-06-01 15:40:10 -04:00
Spencer Gibb a8e7baacb8 Avoid creating ZuulException as it has a static reference to increment metrics.
fixes gh-2912
2018-05-31 15:55:13 -04:00
Spencer Gibb c3eedabb04 Unignores test
fixes gh-2316
2018-05-31 13:25:16 -04:00
Ryan Baxter e179e6f417 Updating sc-build version 2018-05-31 07:49:43 -04:00
Ryan Baxter 84084fc36a Upgrading Zuul to 1.3.1. Closes #2974 2018-05-30 15:09:00 -04:00
Ryan Baxter d95a01b9b5 Compatibility with Java 1.7 when cherry picking 50924f296f 2018-05-30 15:08:38 -04:00
Spencer Gibb b9bfd4fbb2 Moves from archaius to boot properties.
This fixes problems in testing while maintaining backwards compatibility.

Allows upgrade of zuul to 1.3.1
2018-05-30 14:52:17 -04:00
Ryan Baxter f14d94fe3e Revert "Updating Zuul version."
This reverts commit 61a920e0a5.
2018-05-30 12:53:02 -04:00
Ryan Baxter 61a920e0a5 Updating Zuul version. 2018-05-30 10:04:34 -04:00
Ryan Baxter 0239f10621 Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2018-05-29 20:30:00 -04:00
Ryan Baxter 4c4accea28 Fixes test to be compatible with changes in config 2018-05-29 20:29:14 -04:00
Jawher Moussa 0c4a46bea3 Fix Zuul's RequestContext.getOriginResponseHeaders not being populated (#2980)
Fixes #2979
2018-05-29 20:05:33 -04:00
Ryan Baxter 038106de17 Fixing typo in hystrix dashboard starter
Closes #2975
2018-05-29 13:43:17 -04:00
buildmaster 2ff40924a2 Going back to snapshots 2018-05-24 21:12:58 +00:00
buildmaster 0b81716c56 Update SNAPSHOT to 2.0.0.RC2 2018-05-24 21:09:47 +00:00
Ryan Baxter 8a58341982 Document Zuul metrics. Closes #2913 (#2943) 2018-05-24 10:01:33 -04:00
Ryan Baxter 5007d0e8f2 Add configuration for clusters endpoint. Closes #2929. (#2966) 2018-05-24 10:01:11 -04:00
Ryan Baxter 6734e1cad9 Remove the optional flag from webflux and reactive streams. Update docs for turbine stream. Closes #2955. 2018-05-23 15:04:08 -04:00
Fahim Farook 2a13553544 Fixes failing maven eclipse:eclipse goal. (#2953) 2018-05-23 09:55:44 -04:00
Alykoff 4e5a3f4f80 Add ConditionalOnMissingBean for beans (#2957)
Added `@ConditionalOnMissingBean` for `PreDecorationFilter`, `RibbonRoutingFilter` beans in `org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration` class.
2018-05-23 09:51:06 -04:00
Ryan Baxter dcebcdb6fe Merge remote-tracking branch 'origin/1.4.x' 2018-05-22 20:13:00 -04:00
Ryan Baxter 56772eeb6c Converts Map to JSON. Fixes json format errors with Hystrix Dashboard. (#2950) 2018-05-22 15:56:40 -04:00
ScienJus 82b51b7a36 Fixed: remove misplaced StringEncoder setting when dealing with protobuf (#2453)
* Fixed: remove misplaced StringEncoder setting place when dealing with protobuf

* test SpringEncoder when protobuf is not in classpath
2018-05-18 11:46:49 -04:00
OlgaMaciaszek 0245ba753e Rename class. 2018-05-18 16:35:13 +02:00
OlgaMaciaszek 9e9cf7964e Adjust changes to existing convention. 2018-05-18 15:48:28 +02:00
OlgaMaciaszek 9c071517b7 Make CompositeDiscoveryClient use ordered DiscoveryClient instances.
Fixes gh-304.
2018-05-18 14:09:21 +02:00
Ryan Baxter fe3f0209da Update Hystrix Tubrbine Payload To Be A Byte Array (#2937)
* Update the payload to be a byte array.  Closes #2858
2018-05-17 19:22:30 -04:00
Ryan Baxter 6c71f9bba8 Adding Atlas starter back to dependencies pom. Closes#2914. 2018-05-15 19:54:41 -04:00
Ryan Baxter b3802c0e85 Use management.server.servlet.context-path in docs. Closes #2911 2018-05-14 19:50:08 -04:00
Mário Buratto d62c788cd7 Fixed content length handling issues. (#2894) (#2920)
* Fixed content length handling issues. (#2894)

* Added test setup and cleanup for RequestContext. (#2894)
2018-05-14 19:36:58 -04:00
saga 21ff95e97b Repair inconsistency (#2932)
Fix #2910
2018-05-14 19:30:24 -04:00
Vikash Tiwari d5f7148511 Fix typo in docs (#2916) 2018-05-14 17:08:45 -04:00
Spencer Gibb 1704c16c38 Updates the turbine stream documentation to note the need for webflux. 2018-05-10 15:21:11 +02:00
Spencer Gibb 26c9f97223 Removes unused TurbinePortApplicationListener. 2018-05-10 15:15:29 +02:00
Spencer Gibb 97eea5bd87 Removes unused netty server bits. 2018-05-10 15:12:00 +02:00
Spencer Gibb 271f73f7f9 Updates turbine-stream to use webflux
Rather than custom netty server.

Harmonizes spring cloud contract versions to 1.2.4.RELEASE

fixes gh-2319
2018-05-10 09:05:53 -04:00
Ryan Baxter 4e155f4c3b Use condition on type string instead of class
Avoid problems if OKHTTP is not on the classpath.  Fixes #2797
2018-05-02 15:48:37 -04:00
Spencer Gibb 2e12d9b473 Adds commons-configuration as a compile dependency. 2018-04-27 13:55:02 -04:00
Ryan Baxter 889785c4ec Add apache http client to zuul deps. (#2889) 2018-04-27 13:21:14 -04:00
Nastya Smirnova 60407e4170 [Turbine] Turbine controller (#2223) 2018-04-25 16:32:43 -04:00
Spencer Gibb 127b2a80d2 Updates eureka to 1.9.0 and servo to 0.12.21 2018-04-25 15:15:16 -04:00
Spencer Gibb 87ffb81a65 correctly test ip-address settings 2018-04-25 13:19:34 -04:00
Spencer Gibb 4836e1e951 remove deprecated constructors 2018-04-25 13:19:34 -04:00
Spencer Gibb 0cfbac1b43 fix property reference 2018-04-25 13:19:34 -04:00
buildmaster 7bc46324c2 Going back to snapshots 2018-04-20 20:00:52 +00:00
buildmaster 10d3e1422c Update SNAPSHOT to 2.0.0.RC1 2018-04-20 19:57:42 +00:00
Spencer Gibb 843344a9df Merge branch 'dependencies-pom-cleanup' 2018-04-18 17:06:47 -04:00
Spencer Gibb 76158af131 Adds connectionRequestTimeoutMillis to zuul.host
fixes gh-2851
2018-04-18 17:05:51 -04:00
Spencer Gibb 0a8f594bd5 Uses precomputed information in RibbonServer if available.
fixes gh-2860
2018-04-18 16:06:36 -04:00
Ryan Baxter 520d12631b Fix bean names. Fixes #2844 2018-04-17 13:28:18 -04:00
Ryan Baxter d8582f7814 Changing Cloudfoundry to Cloud Foundry 2018-04-17 12:32:59 -04:00
Spencer Gibb 73fbec166d Cleans up dependencies pom. Removes uneeded deps and moves others to root pom.
fixes gh-2854
2018-04-16 16:08:01 -04:00
Bertrand Renuart 24209635c4 Handle GZip response from downstream with an empty body. (#2838)
* Handle GZip response from downstream with an empty body.
2018-04-12 17:01:06 -04:00
Spencer Gibb 196abf2a24 Merge branch 'brenuart-gh2807' 2018-04-10 21:28:10 -04:00
Bertrand Renuart b2d27a1d7b Refactor HandlerMapping refresh into a single listener
fixes gh-2807
2018-04-10 21:27:42 -04:00
Bertrand Renuart 406e112aaa Always forward Content-Length header from origin when set (#2833)
* Always forward Content-Length from origin when set unless response is compressed and client does not support it

Fix for #2832

* Add test cases to assert behaviour with regards to the Content-Length header
2018-04-10 16:02:03 -04:00
David Liu 2118d5b4dd sanitize the metadata map to remove empty values when building the eureka InstanceInfo (#2826) 2018-04-10 14:18:43 -04:00
Ryan Baxter 65c13bba83 Update Eureka dependency. Fixes #2756 2018-04-10 10:22:54 -04:00
CaiJiahe b6522e4dc0 fix doc typo (#2827) 2018-04-09 23:56:54 -04:00
Spencer Gibb 31606d0dc8 fixes unintended change to test. 2018-04-04 16:55:53 -04:00
Spencer Gibb 33511fd105 Adds sidecar test for prefer-ip-address 2018-04-04 16:38:03 -04:00
Spencer Gibb 0c7be074f5 Fixes get applications with regions.
Polishes tests.
2018-04-04 11:59:08 -04:00
buildmaster 3ebda28fed Bumping versions to 1.4.5.BUILD-SNAPSHOT after release 2018-03-26 21:33:48 +00:00
buildmaster 3a0ff1f94d Going back to snapshots 2018-03-26 21:33:47 +00:00
buildmaster 50a02e3ba4 Update SNAPSHOT to 1.4.4.RELEASE 2018-03-26 20:57:46 +00:00
buildmaster ab87e735ad Going back to snapshots 2018-03-22 21:13:47 +00:00
buildmaster 6e6d1ef264 Update SNAPSHOT to 2.0.0.M8 2018-03-22 21:10:49 +00:00
Ryan Baxter bf99c6236e Update to latest Eureka version. Fixes #2792 2018-03-22 09:25:57 -04:00
Ryan Baxter ac95844ab3 Update to latest Eureka release. Fixes #2228. 2018-03-21 13:51:52 -04:00
Ryan Baxter c55caf4290 Merge remote-tracking branch 'origin/1.4.x' 2018-03-19 15:58:48 -04:00
Ryan Baxter 722a626e55 Merge remote-tracking branch 'origin/1.3.x' into 1.4.x 2018-03-19 15:58:24 -04:00
Ryan Baxter 90a514d935 Remove old circle config 2018-03-19 15:56:57 -04:00
Ryan Baxter ded5251daf Merge remote-tracking branch 'origin/1.4.x' 2018-03-19 15:21:02 -04:00
Spencer Gibb 9b1d3b36fd Uses default /actuator prefix for hystrix.stream
fixes gh-2784
2018-03-19 15:10:17 -04:00
Ryan Baxter b5a2291ec6 Fixing yaml config formatting 2018-03-19 14:47:14 -04:00
Ryan Baxter d2d2dede3f Merge remote-tracking branch 'origin/1.3.x' into 1.4.x 2018-03-19 14:46:19 -04:00
Ryan Baxter 3a5e12b895 Adding circle 2.0 config 2018-03-19 14:29:39 -04:00
Spencer Gibb 3ce65f69c1 Adds missing spring-boot-configuration-processor
fixes gh-2782
2018-03-19 13:25:47 -04:00
Spencer Gibb 3e8899c43e makes eureka-client optionally dependent on ribbon 2018-03-19 13:25:17 -04:00
Spencer Gibb 49fc92849c remove unused import 2018-03-19 13:24:43 -04:00
Ryan Baxter 4ace667c53 Sets default actuator prefix in Boot 2.0. Fixes #2777 (#2781) 2018-03-14 14:43:08 -04:00
Ryan Baxter 894a462e4c Merge remote-tracking branch 'origin/1.4.x' 2018-03-14 09:42:23 -04:00
Ryan Baxter dadd86056e Fixes #2779 2018-03-14 09:38:03 -04:00
Ryan Baxter 07f455caf8 Merge remote-tracking branch 'origin/1.4.x' 2018-03-14 09:15:05 -04:00
Ryan Baxter dd4b967fbf Fix NPE when empty body during retry (#2775) 2018-03-13 16:31:37 -04:00
Ryan Baxter 274b68baaa Merge remote-tracking branch 'origin/1.4.x' 2018-03-13 09:34:20 -04:00
darkius b99faba3cd Fix management context path in URL (#2702) (#2769) 2018-03-13 09:23:46 -04:00
Ryan Baxter a533bc0649 Merge branch 'master' of github.com:spring-cloud/spring-cloud-netflix 2018-03-13 09:07:21 -04:00
Ryan Baxter eeb89e6e14 Merge remote-tracking branch 'origin/1.4.x' 2018-03-12 17:16:51 -04:00
Ryan Baxter 6dec4afef8 Refactor Spring Retry based on changes in commons (#2771) 2018-03-12 16:56:30 -04:00
Ryan Baxter 57a6693de7 Bumping ribbon version. Fixes #2752 2018-03-12 15:41:32 -04:00
Jay Bryant 100d158ae5 Editing (#2749) 2018-03-02 12:07:42 -05:00
Spencer Gibb 3fcc3668f0 Un-ignore test now that reactor-netty has fixed the issue.
see https://github.com/reactor/reactor-netty/issues/292
2018-02-28 13:49:24 -05:00
buildmaster 9f1dee5c74 Going back to snapshots 2018-02-26 21:22:30 +00:00
buildmaster 6066df8ae4 Update SNAPSHOT to 2.0.0.M7 2018-02-26 21:19:28 +00:00
Ryan Baxter a8b92a2211 Merge branch '1.4.x' of github.com:spring-cloud/spring-cloud-netflix into 1.4.x 2018-02-23 15:32:57 -05:00
Ryan Baxter 7e433bf901 Fixes #2740. 2018-02-23 15:32:33 -05:00
Patrick Way 16155ed852 Fix npe when no servers available (#2727)
* Retryable Clients should validate the service server and throw an exception if necessary

* fixing spelling error

* RetryableRibbonLoadBalancingClient should throw a ClientException which can be handled by the RibbonRoutingFilter

* moving service instance validation and service instance chooser to the AbstractLoadBalancingClient

* Updating RetryCallback within RetryableRibbonLoadBalancingHttpClient to handel Exception
2018-02-23 09:44:32 -05:00
Ryan Baxter 257349e6ed Remove last bits of Feign 2018-02-22 20:36:19 -05:00
Ryan Baxter 6b031d66bc Removing Feign documentation from docs 2018-02-22 20:22:40 -05:00
Ryan Baxter 11feffb1f6 Merge remote-tracking branch 'origin/master' into remove-feign 2018-02-22 14:05:58 -05:00
Ryan Baxter 87de937fdd Merge remote-tracking branch 'origin/1.4.x' 2018-02-22 14:03:23 -05:00
Spencer Gibb 1080a1dc83 Ignore broken test so snapshots publish again. 2018-02-22 13:26:00 -05:00
Ryan Baxter c84d20cdbe Reenabling ignored test 2018-02-22 09:39:29 -05:00
Ryan Baxter 276b2ada0c Ignoring potential test problem 2018-02-21 20:35:50 -05:00
Ryan Baxter 2c4ae35127 Making application classes not public 2018-02-21 20:27:18 -05:00
Ryan Baxter 021dc55898 making sure ssl is disabled 2018-02-21 20:13:26 -05:00
Ryan Baxter b199167eb2 Removing Feign 2018-02-21 20:10:11 -05:00
Spencer Gibb c1e86507d8 Ignore broken test so snapshots publish again. 2018-02-21 01:56:38 -05:00
Ryan Baxter 08bcf2463f Revert "increasing retries"
This reverts commit 6062f6ff1e.
2018-02-20 16:14:38 -05:00
Ryan Baxter 6062f6ff1e increasing retries 2018-02-20 16:08:26 -05:00
Ryan Baxter 8691a731d5 Merge remote-tracking branch 'origin/1.4.x' 2018-02-20 15:21:01 -05:00
Ryan Baxter c35796af7e Use disable ssl validation property. Fixes #2729 (#2733) 2018-02-20 15:19:57 -05:00
Eko Kurniawan Khannedy 61bbca23ff add encoder, decoder and contract to feign properties, so we can override the default value with properties (#2687) 2018-02-20 14:31:03 -05:00
Ryan Baxter a082146715 Merge remote-tracking branch 'origin/1.4.x' 2018-02-20 14:16:42 -05:00
Ryan Baxter 6eb497770b Merge branch '1.3.x' into 1.4.x 2018-02-19 20:48:56 -05:00
Ryan Baxter 03851157cf Merge remote-tracking branch 'origin/1.4.x' 2018-02-19 20:47:23 -05:00
Ryan Baxter ba17eb6a31 Feign compression configuration fixes (#2717)
* feign compression configuration fixes.  Fixes #2462
2018-02-19 07:39:53 -05:00
Spencer Gibb a19163ddb3 update to new web endpoint property 2018-02-12 12:24:48 -05:00
Spencer Gibb 6d67f1beaa Use boot version variable 2018-02-12 11:56:09 -05:00
Spencer Gibb 947e21f9b2 remove reference to finchley 2018-02-12 11:50:35 -05:00
Spencer Gibb afd4154ee7 remove servo docs 2018-02-12 11:47:04 -05:00
Spencer Gibb 68f6ee540c remove brixton references 2018-02-12 11:44:28 -05:00
Spencer Gibb 31c974c461 remove brixton references 2018-02-12 11:42:26 -05:00
Spencer Gibb d4e7fdef7e remove brixton references 2018-02-12 11:41:06 -05:00
Spencer Gibb e30fa91769 Fix change in property type errors 2018-02-10 10:01:50 -05:00
Spencer Gibb ef056583c8 Fix compile errors 2018-02-10 09:38:32 -05:00
buildmaster c8be808eba Going back to snapshots 2018-02-09 22:40:46 +00:00
buildmaster 5bde00223d Update SNAPSHOT to 2.0.0.M6 2018-02-09 22:38:01 +00:00
Spencer Gibb 9646f76f82 Fix unresolved references 2018-02-09 17:28:17 -05:00
Spencer Gibb e1333c96b0 Merge remote-tracking branch 'origin/master' 2018-02-08 18:59:14 -05:00
Spencer Gibb ac6b8b8592 Update to latest boot conventions 2018-02-08 18:59:07 -05:00
buildmaster 70ea5ed597 Bumping versions to 1.4.4.BUILD-SNAPSHOT after release 2018-02-08 15:59:23 +00:00
buildmaster dd9e3b60db Going back to snapshots 2018-02-08 15:59:22 +00:00
buildmaster 6b023df258 Update SNAPSHOT to 1.4.3.RELEASE 2018-02-08 15:44:15 +00:00
Ryan Baxter d70c12e2a4 Configuring firewall to allow matrix parameters 2018-02-07 19:57:36 -05:00
Ryan Baxter 8f0c15e966 using snapshot 2018-02-07 16:37:32 -05:00
Ryan Baxter fdf88bfdd7 Using snapshot 2018-02-07 16:36:49 -05:00
Ryan Baxter 24e31f997c using build snapshot 2018-02-07 16:36:00 -05:00
Ryan Baxter c53a4a0ce9 Using release 2018-02-07 16:16:35 -05:00
Ryan Baxter 33aae30c92 Using build release 2018-02-07 16:16:01 -05:00
Ryan Baxter d76e1ffc8f Using build release 2018-02-07 16:15:09 -05:00
Ryan Baxter 2d11fb414d Fixing links 2018-02-07 14:43:15 -05:00
Ryan Baxter e6943b8f78 Return content of last request when retrying failed requests (#2685) 2018-02-07 14:17:34 -05:00
zaygrzx d31d4424f6 Minor changes (#2712)
* Remove invalid import

* Remove invalid import
2018-02-06 07:47:39 -05:00
Spencer Gibb bb26a270dc Webflux Hystrix Feature shouldn't be dependant on Servlet. 2018-02-05 21:36:48 -05:00
Ryan Baxter ba87fef3b2 Set secure health check url. Fixes #2673 (#2710) 2018-02-05 13:23:06 -05:00
Andreas Evers 4c181c9671 Small fix for wrong routes details endpoint (#2706) 2018-02-05 07:49:40 -05:00
Igor Suhorukov 076df77563 Optimize thread safe code and replace the synchronized class "StringBuffer" by an unsynchronized one "StringBuilder". (#2704) 2018-02-04 20:09:09 -05:00
Ryan Baxter 07411bba40 Fix compilation errors due to changes in commons 2018-02-02 07:47:57 -05:00
Igor Suhorukov 24dfd4ae76 fix issue with assertion in HystrixStreamTests, polish diamond operator and follow class field naming convention (#2703)
* fix assertion check

* polish: replace the type specification in this constructor call with the diamond operator ("<>"),
make EUREKA_PACKAGES final to avoid issue "static non-final field names should comply with a naming convention"
2018-02-01 19:15:51 -05:00
Ryan Baxter a9aca1b8ed Client is registered in the LoadBalancerContext. Fixes #2699. 2018-01-30 15:34:45 -05:00
Spencer Gibb b2ebfc0ecb Updates to new ServletEndpoint and ControllerEndpoint 2018-01-29 18:56:11 -05:00
Spencer Gibb eb0681f9c2 Get dynamic instanceinfo in ServiceRegistry.getStatus()
See https://github.com/spring-cloud/spring-cloud-commons/issues/310
2018-01-29 17:48:35 -05:00
Spencer Gibb 041b493a25 polish 2018-01-26 17:09:16 -05:00
Spencer Gibb a81eb771e5 Updates for new HttpTraceRepository 2018-01-26 16:21:58 -05:00
Ryan Baxter acf427974b Filter name change in boot 2.0 2018-01-26 11:47:25 -05:00
Ryan Baxter c3475f194e Fix failing unit test 2018-01-26 10:20:46 -05:00
Marcin Grzejszczak 6975781a0b Edgware branch for e2e 2018-01-25 21:28:36 +01:00
Marcin Grzejszczak 665fe67aa6 Edgware branch for e2e 2018-01-25 21:28:07 +01:00
Taylor Wicksell 5b149c7ff2 do not rely on constructor injection in EurekaClientAutoConfiguration (#2670) 2018-01-25 10:55:48 -05:00
Patrick Way 35477d9c06 Allowing RibbonLoadbalancedRetryPolicy to update ServerStats for circuit tripping exceptions (#2483)
* Allowing RibbonLoadbalancedRetryPolicy to update ServerStats for circuit tripping exceptions
2018-01-25 10:15:55 -05:00
saga 576baf6fff Improve Zuul Hystrix Timeouts (#2645) 2018-01-25 07:45:35 -05:00
saga f7e5b7f726 Minor changes (#2681) 2018-01-25 07:35:53 -05:00
Spencer Gibb ca80c57797 Adds newline to turbine stream
See gh-2637
2018-01-24 15:44:06 -05:00
Ryan Baxter 7d2a4b155d Bumping commons and config versions 2018-01-23 16:05:13 -05:00
Spencer Gibb 29ad943f0a Use scheme in load balancing if provided. 2018-01-23 00:44:28 -05:00
Ryan Baxter d4e7f25e3b Merge remote-tracking branch 'origin/1.4.x' 2018-01-22 13:54:09 -05:00
Spencer Gibb e0ad44f2f1 Updates to new location of SecurityAutoConfiguration 2018-01-22 13:38:09 -05:00
saga ff68e0f66e Prevent RibbonRoutingFilter throws exceptions when Http status codes are non-standard(Against the 1.4.x branches) (#2671)
* This PR fixes #2639 and against the 1.4 branches
2018-01-22 11:27:15 -05:00
Dave Syer 08b8034eca Remove commons-logging as explicit dependency
Hopefully spring boot logging provides enough of the API for
Archaius to work (I think that's the only reason it was there).
Causes issues with logging switching to JUL at odd times (like
on context closed events).
2018-01-20 09:36:55 +00:00
Ryan Baxter d3385f8cd6 Merge remote-tracking branch 'origin/1.4.x' 2018-01-19 15:46:04 -05:00
Ryan Baxter d51112e6af Pass the right request to getSecureRequest. Fixes #2667. (#2669) 2018-01-19 15:27:15 -05:00
Ryan Baxter 6bfb7c6d6e Merge remote-tracking branch 'origin/1.4.x' 2018-01-19 12:37:07 -05:00
Ryan Baxter 3c9792545b Merge remote-tracking branch 'origin/1.4.x' 2018-01-18 20:03:43 -05:00
Ryan Baxter 1c79bd2646 Flip disable ssl flag for SimpleHostRoutingFilter. Fixes #2503. 2018-01-18 14:01:41 -05:00
Ryan Baxter 6bb5830220 Remove deprecated ZuulFallbackProvider in favor of FallbackProvider. Add route parameter to fallbackResponse. Fixes #2655 (#2664) 2018-01-18 13:40:43 -05:00
Biju Kunjummen 7b7cf7e5e8 Uses ApplicationContextRunner, removes main method in tests (#2626) 2018-01-17 18:30:01 -05:00
Ryan Baxter c79ac8ba19 Remove / from prefix if present.
Fixes #2625
2018-01-17 18:16:18 -05:00
Toshiaki Maki 89cb8d1d9c Add commandProperties in HystrixCommands (#2656) 2018-01-17 15:09:24 -05:00
reillylm 06672462ab fix zuul intro typo (#2658) 2018-01-17 14:37:35 -05:00
Spencer Gibb 6fd4f44125 Fix updates from micrometer 2018-01-17 12:28:01 -05:00
Spencer Gibb f7172dd0c5 Polish 2018-01-17 12:13:27 -05:00
Spencer Gibb 1c51c9fa5e Updates test to account for new application context id rules from boot 2 2018-01-17 11:45:56 -05:00
Ryan Baxter a399cca7ce Use disableSslProperty when creating Feign http cients. Fixes 2652. (#2654) 2018-01-16 20:10:50 -05:00
Spencer Gibb 736317e684 Fix test 2018-01-16 16:43:08 -05:00
buildmaster 3c0c054d62 Bumping versions to 1.4.3.BUILD-SNAPSHOT after release 2018-01-16 12:56:05 +00:00
buildmaster 3a07faf23a Going back to snapshots 2018-01-16 12:56:04 +00:00
buildmaster 0bfa706a39 Update SNAPSHOT to 1.4.2.RELEASE 2018-01-16 12:43:02 +00:00
Ryan Baxter 837267fb0a Bumping version to next release 2018-01-12 14:37:33 -05:00
Spencer Gibb 6a3c509768 Supports /hystrix.stream for webflux
fixes gh-2629
2018-01-11 16:02:07 -05:00
saga 31b4646882 remove extra aware interface (#2636) 2018-01-11 15:51:24 -05:00
Ryan Baxter 16a5b00738 Add core dependency back to Hystrix starter or else starter wont include Hystrix implementation. 2018-01-11 14:17:15 -05:00
Ryan Baxter 8d18dfbc3d Set hystrix timeout for Zuul routes based on whether the hystrix command timeout, default timeout, or ribbon timeouts are set. Fixes #2606 (#2633) 2018-01-11 10:05:02 -05:00
Guillaume Berche e4870c94f2 Refine Feign manual client doc (#2627) 2018-01-11 07:51:26 -05:00
saga 241468ab7a Remove redundant default parameter (#2635) 2018-01-11 07:47:54 -05:00
saga 94d7d2574b Minor changes (#2632)
* Remove invalid import

* Remove invalid line
2018-01-10 10:51:47 -05:00
Spencer Gibb dd978169da Use new RibbonProperties consistently. 2018-01-09 17:11:01 -05:00
Spencer Gibb ca81bdf71e Ribbon utilities 2018-01-09 15:15:08 -05:00
Ryan Baxter 84f56ec3b2 Move Ribbon to its own module (#2548)
* Move Ribbon to its own module. Fixes #2299
2018-01-09 08:25:40 -05:00
Igor Kryvenko 208117bdd3 hotfix/add-log-ribbon (#2619)
* Add logging to RibbonLoadBalancerRetryPolicy
2018-01-09 00:55:35 -05:00
Ryan Baxter d2155dc561 Only strip the prefix if it actually part of the path. Fixes #2377 (#2624) 2018-01-08 14:42:33 -05:00
Spencer Gibb db66e1c3d4 polish 2018-01-08 13:14:25 -05:00
saga 113b49e283 Remove useless import (#2622) 2018-01-08 07:35:53 -05:00
Igor Kryvenko b48189790c Fixes gh - 2594 (#2611) 2018-01-04 11:08:37 -05:00
saga 882219f962 spring-retry listener features (#2609) 2018-01-04 09:42:26 -05:00
Ryan Baxter 8dfcdbed76 Adding repos to sc-netflix-hystrix-contract pom 2018-01-04 07:49:06 -05:00
Ryan Baxter 8017995ba3 Moving sc-build to 1.3.8.BUILD-SNAPSHOT 2018-01-03 19:42:03 -05:00
Ryan Baxter ca399ffd0b Moving dependencies to snapshots 2018-01-03 16:28:41 -05:00
Ryan Baxter bf67680f4b Fix management port property to align with Boot 2.0 2018-01-03 16:11:12 -05:00
Ryan Baxter b24a0524ed Merge remote-tracking branch 'origin/1.4.x' 2018-01-03 14:43:14 -05:00
Ryan Baxter a4c995a394 Disable following redirects in SimpleHostRoutingFilter. Fixes #2578. (#2608) 2018-01-03 14:19:39 -05:00
Bertrand Renuart fb0d53a796 Invoke super.onCacheRefreshed() before custom logic (#2604) 2018-01-02 20:10:06 -05:00
Nastya Smirnova 9deab33dc1 fixes #2524 (#2574)
set proper status and health eureka urls if prefer ip address is set
2018-01-02 15:42:59 -05:00
Toshiaki Maki 29adaf26e9 Use verifyError (#2602) 2018-01-02 14:25:26 -05:00
saga b3acc1390c Add check to prevent StackOverflowError (#2580) 2018-01-02 14:24:54 -05:00
Riz Joj 3abc89b9e7 EurekaHealthCheckHandler: Added protected getter to obtain CompositeHealthIndicator (#2583)
* Adding protected getter to obtain CompositeHealthIndicator. This allows subclasses to obtain this indicator's health details map which is useful for error reporting.
2018-01-02 14:13:43 -05:00
周立 04560724d3 fix wrong sentence. (#2582)
* fix wrong sentence.
2018-01-02 14:06:34 -05:00
Spencer Gibb 81aadc3e05 Add test dependency for spring-security-rsa
fixes no class def found error
2018-01-01 16:48:02 -05:00
buildmaster 7c20c274d7 Bumping versions to 1.3.7.BUILD-SNAPSHOT after release 2017-12-21 21:34:12 +00:00
buildmaster 7339021684 Going back to snapshots 2017-12-21 21:34:11 +00:00
Silas Mahler 0859350715 Fix typo in Turbine example url (#2568) 2017-12-20 17:59:09 -05:00
Spencer Gibb 4165fe221b Allow overriding of initialize() 2017-12-20 14:55:03 -05:00
Ryan Baxter d76454b1ec Adding issue and contributing templates 2017-12-20 14:37:35 -05:00
Spencer Gibb 50924f296f Moves from archaius to boot properties.
This fixes problems in testing while maintaining backwards compatibility.

Allows upgrade of zuul to 1.3.1
2017-12-20 14:31:36 -05:00
Spencer Gibb 0a689b5008 polish 2017-12-20 14:30:25 -05:00
Spencer Gibb ac1ac4d5b1 Reinstates upgrade to zuul 1.3.1 2017-12-20 14:29:55 -05:00
Ryan Baxter 53ffb11a21 Revert "Update zuul-core to 1.3.1 version (#2547)"
This reverts commit 348d1c5b8a.
2017-12-19 19:35:46 -05:00
Nastya Smirnova 348d1c5b8a Update zuul-core to 1.3.1 version (#2547) 2017-12-19 16:21:10 -05:00
saga 434fb6e9fa Refactor the getScanner method of the FeignClientsRegistrar class (#2559) 2017-12-19 15:46:04 -05:00
Kerwin Bryant 90094b6b9a public FeignLoadBalancer.RibbonRequest and FeignLoadBalancer.RibbonResponse to the user to customize their needs (#2536) 2017-12-19 14:43:39 -05:00
Tim Ysewyn 4f2f4f6a60 Added util method to upgrade the connection to a secure one. (#2551)
* Added util method to upgrade the connection to a secure one.

- Adds support for websocket URIs
- Fixes bug where a non-secure scheme other than http would be changed to https
- Deprecated `updateToHttpsIfNeeded` in favor of `updateToSecureConnectionIfNeeded`

* Expect http when no scheme was set

* Skip update to secure connection when the uri is empty
2017-12-19 14:08:00 -05:00
周立 1210db9a15 Change spring-cloud-starter-hystrix-netflix-dashboard to spring-cloud-starter-netflix-hystrix-dashboard (#2560)
Change spring-cloud-starter-hystrix-netflix-dashboard to spring-cloud-starter-netflix-hystrix-dashboard
2017-12-18 09:06:55 -05:00
周立 94358489ef Change spring-cloud-starter-hystrix-dashboard to spring-cloud-starter-netflix-hystrix-dashboard (#2561)
Change spring-cloud-starter-hystrix-dashboard to spring-cloud-starter-netflix-hystrix-dashboard
2017-12-18 09:05:30 -05:00
Tomasz Juchniewicz 06398da4df Allow multiple values in @RequestMapping(produces|consumes) for Spring MVC endpoints. (#2523)
Fixes gh-808.
2017-12-15 14:43:43 -05:00
Craig Rueda 504720e366 InputStream should always be closed after reading contents from upstreams (#2501)
* InputStream should always be closed after reading contents from upstreams
2017-12-15 14:07:34 -05:00
Ryan Baxter 3d7892c2e6 Merge remote-tracking branch 'origin/1.4.x' 2017-12-12 12:58:03 -05:00
Spencer Gibb 170739e662 Fix compile error, ignore broken tests 2017-12-11 21:38:44 -08:00
Ryan Baxter 07de257371 Merge remote-tracking branch 'origin/1.3.x' into 1.4.x 2017-12-08 17:19:57 -08:00
Fahim Farook 6e2238f231 Update Eureka Server's service-urls upon EnvironmentChangeEvent. (#2455)
Fixes gh-2421
2017-12-08 15:07:05 -08:00
saga f640ffd251 SimpleHostRoutingFilter should pull InputStream from RequestContext
Fixes #2513
2017-12-08 14:45:57 -08:00
saga 05cd507d9a Adjust the code format (#2507)
* Adjust the code format
2017-12-03 22:30:18 -05:00
Ryan Baxter 3e90724505 Switched branch in docs and merged changes forward 2017-12-03 15:22:24 -08:00
Ryan Baxter efb91874f8 Correcting image links. Fixes #2487 2017-12-03 15:06:48 -08:00
buildmaster 4e8d58869e Going back to snapshots 2017-12-02 02:57:45 +00:00
buildmaster 32efd30dc0 Update SNAPSHOT to 2.0.0.M5 2017-12-02 02:54:51 +00:00
Spencer Gibb eec4c8cf85 remove empty files 2017-12-01 21:46:27 -05:00
Daniel Lavoie ebdcca4fa8 Hystrix Dashboard Cannot display anything for Turbine Stream (#2484)
Closes #2475
2017-12-01 16:38:15 -05:00
Daniel Qian d38f390b95 fix documentation typo (#2488) 2017-12-01 16:30:46 -05:00
Spencer Gibb e3cdb76373 Revert "fix zuul filters package url in Edgware (#2493)" (#2495)
This reverts commit d5e3cad80e.
2017-11-30 21:26:21 -05:00
周立 d5e3cad80e fix zuul filters package url in Edgware (#2493)
fix zuul filters package url in Edgware
2017-11-30 21:23:08 -05:00
周立 2287e0caf2 fix zuul filters package url in Edgware (#2489)
fix zuul filters package url in Edgware
2017-11-30 10:48:35 -05:00
Spencer Gibb b8a357b685 Upgrade wiremock to 1.2.0.RELEASE 2017-11-28 14:45:11 -05:00
Spencer Gibb ff5bf153bf Merge branch '1.4.x'
# Conflicts:
#	docs/pom.xml
2017-11-28 12:39:24 -05:00
Spencer Gibb dde7ff4c45 Update docs branches 2017-11-28 12:38:23 -05:00
Spencer Gibb 1cf1f435a6 Update eureka to 1.8.6
fixes gh-2456
2017-11-28 12:25:02 -05:00
Spencer Gibb 4e40cad235 Polish test 2017-11-28 11:25:49 -05:00
saga 14c1d461b7 Improve the document (#2474)
Replace @Configuration, @ComponentScan, @EnableAutoConfiguration with @springbootapplication.
2017-11-28 06:30:41 -05:00
Spencer Gibb 07c4604c9b Polish test 2017-11-28 01:16:34 -05:00
Spencer Gibb ef755f3ad3 Merge branch 'master' into 2.0.x 2017-11-27 22:52:09 -05:00
Spencer Gibb e19ecf71da Updates for boot 2.0 compatibility 2017-11-27 14:31:19 -05:00
Spencer Gibb 7c62bd8871 Updates for boot 2.0 compatibility 2017-11-27 13:44:59 -05:00
saga 6c52269dc5 Associated with this PR # 2466 (#2470)
Use StringBuffer for String concatenation
2017-11-27 07:55:39 -05:00
saga 736a3e4610 Format indent adjustment (#2468)
Format indent adjustment
2017-11-26 07:32:33 -05:00
Spencer Gibb ae34b77371 Updates for boot 2.0 compatibility 2017-11-22 12:30:54 -05:00
Spencer Gibb 946a46f2b1 Merge branch 'master' into 2.0.x 2017-11-21 19:27:49 -05:00
Spencer Gibb 1e87b50998 Update releaser build to build docs 2017-11-21 18:37:48 -05:00
Spencer Gibb f59a228daf Pass system properties to releaser build command 2017-11-21 17:48:01 -05:00
Ryan Baxter db3a412c8a Fixing command to run maven 2017-11-20 16:10:55 -05:00
Ryan Baxter 202f96876e Bumping versions to 1.4.1.BUILD-SNAPSHOT after release 2017-11-20 16:03:53 -05:00
Ryan Baxter 2489d5e234 Going back to snapshots 2017-11-20 16:03:52 -05:00
Ryan Baxter 64ad2ba20c Update SNAPSHOT to 1.4.0.RELEASE 2017-11-20 15:54:27 -05:00
Yongsung Yoon 60c4e1b007 Add support loadBalancerKey in RibbonRoutingFilter of Zuul for Canary test (#2439)
* Add support loadBalancerKey in RibbonRoutingFilter

* Add documentation about how to provide a loadBalancerKey to Ribbon

* Add integrationtest for RibbonRoutingFilter's loadBalancerKey support
2017-11-20 06:28:23 -05:00
Ryan Baxter 6e3b4fdd7b Adds backoff policies when retrying requests (#2436)
* Adds backoff policies when retrying requests.  Fixes #2195

* fixing final variable
2017-11-16 20:11:55 -05:00
buildmaster d7b40e1052 Going back to snapshots 2017-11-15 01:45:33 +00:00
buildmaster 8e412f08bc Update SNAPSHOT to 2.0.0.M4 2017-11-15 01:43:03 +00:00
Nastya Smirnova 62a8f72b98 Incorrect statusPageUrl and healthCheckUrl are reported to Eureka if management.context-path is not set (#2145) 2017-11-14 12:54:12 -05:00
Spencer Gibb aaec6c4ca1 polish 2017-11-13 15:17:58 -05:00
Ryan Baxter 89441ac126 Added zuul timeout documentation. Fixes #2201 2017-11-10 15:54:05 -05:00
Ryan Baxter 9a6dad11bc Fixing test failures 2017-11-08 16:08:07 -05:00
Ryan Baxter d9f7842aec Fix HystrixClientFallbackFactory implementation in docs. Fixes #2428 2017-11-08 11:00:51 -05:00
Ryan Baxter 65762b1dce Remove deprecated RetryableStatusCodeException. Fixes #2003 (#2427) 2017-11-07 17:26:17 -05:00
Nastya Smirnova ba24811356 Report jmx and management ports to Eureka metadata map (#1830)
Follows: https://github.com/spring-cloud/spring-cloud-netflix/pull/1317
2017-11-07 13:42:23 -05:00
agseijas 573d52119a Adds feign-* missing managed dependencies (#2417)
Probably we could import a bom from feign.
2017-11-07 10:56:10 -05:00
Ryan Baxter 3cafacc3e9 Fixes #2415 2017-11-06 15:43:20 -05:00
Spencer Gibb f511c267ce Fix circular reference during object creation. 2017-11-06 08:37:59 +02:00
Spencer Gibb 799fbf43d1 polish 2017-11-06 08:26:33 +02:00
Spencer Gibb c4b075b1c8 Removes log4j-to-slf4j exclusion 2017-11-01 17:13:10 -04:00
Spencer Gibb 8112ddfec2 Temporarily excludes log4j-to-slf4j 2017-11-01 16:28:06 -04:00
Spencer Gibb 5a1708185a Fix removal of getLocalServiceInstance() 2017-10-30 18:25:22 -04:00
Spencer Gibb 35e2af7711 Merge branch 'master' into 2.0.x 2017-10-30 18:20:45 -04:00
Spencer Gibb a805b53d86 Merge branch 'daniellavoie-no-eureka-fix' 2017-10-30 18:10:15 -04:00
Daniel Lavoie c0c59320a5 Regression fix for hystrix stream without eureka registration 2017-10-30 18:10:11 -04:00
Spencer Gibb 388ec98087 Updates for changes to boot 2 2017-10-30 17:45:40 -04:00
Spencer Gibb 271bfcfb31 Fix tests 2017-10-27 18:43:31 -04:00
Spencer Gibb 2be1fb5123 Fix test 2017-10-27 17:36:38 -04:00
Spencer Gibb 70b0c06349 Fix zuul tests 2017-10-27 17:13:32 -04:00
Spencer Gibb bd7d8c944c Going back to snapshots 2017-10-27 16:39:34 -04:00
Spencer Gibb 355adf8369 Update SNAPSHOT to 2.0.0.M3 2017-10-27 16:37:39 -04:00
Spencer Gibb c9ce7af0f2 Add repositories 2017-10-27 16:26:38 -04:00
Spencer Gibb 086aa43055 Trying to fix tests 2017-10-27 16:16:21 -04:00
Spencer Gibb 103bd6475f Trying to fix tests 2017-10-27 16:03:38 -04:00
Spencer Gibb 5cc94532a7 remote routes defined in file 2017-10-27 15:44:23 -04:00
Spencer Gibb e07ed0bd9c Attempt to debug test in jenkins 2017-10-27 15:29:37 -04:00
Spencer Gibb 391add0945 Attempt to debug test in jenkins 2017-10-27 15:15:53 -04:00
Spencer Gibb cf576055f6 rename potential conflicting ribbon contexts 2017-10-27 14:17:01 -04:00
Spencer Gibb 0d84e72d76 points build.sh at correct mvnw location 2017-10-27 12:26:28 -04:00
Spencer Gibb 4932eef1c9 Adds toObservable function to HystrixCommands.
Lets user have full control over how the Observable is created with
sane defaults for eager/non-eager cases.
2017-10-24 14:46:41 -04:00
Spencer Gibb c6a00c1a71 Move to proper reactor testing 2017-10-24 14:22:31 -04:00
Stephane Maldini a67a077906 fix overflow issue with hystrix timeout operator (#2391)
- The fix adds a necessary buffer between the rx-rs adapter and
the timeout operator introduced in AbstractCommand. Unfortunately,
the hystrix operator does not comply with RS backpressure requirements.
It will always request an unbounded demand to a source regardless of
the command consumer demand. With this commit we protect RS adapter and
downstream flow from overflow. Ideally a rework of the operator should
be planned.
2017-10-24 14:01:44 -04:00
JagmohanSharma 798a4bb2b9 https://github.com/spring-cloud/spring-cloud-netflix/issues/2387 (#2388)
In order to fix issue with TPS in hystrix-dashboard threadpool section, removing average calculation for propertyValue_metricsRollingStatisticalWindowInMilliseconds. This was done for hystrixCommand.js previously but not for hystrixThreadpool.js.
2017-10-24 13:18:34 -04:00
Spencer Gibb eb07e2b058 remove java version property 2017-10-23 22:15:37 -04:00
Spencer Gibb a878472a73 Updates to boot 2.0.0 endpoint and properties. 2017-10-23 21:47:37 -04:00
Spencer Gibb ef508b4223 Merge branch 'master' into 2.0.x 2017-10-23 21:22:20 -04:00
Spencer Gibb df7f31098c Going back to snapshots 2017-10-23 17:44:26 -04:00
Spencer Gibb fa9524f9c9 Update SNAPSHOT to 1.4.0.RC1 2017-10-23 17:39:56 -04:00
Spencer Gibb 1368f059bb Change contract property name 2017-10-23 17:16:32 -04:00
Spencer Gibb 8701060355 Add workaround for locally failing test. 2017-10-23 17:05:30 -04:00
Spencer Gibb ee067ed3f2 Merge branch 'raiRaiyan-gh-2303' 2017-10-23 14:43:38 -04:00
Raiyan b57dedb74a - Eureka client auto configures the secure port when secure port is enabled
- The eureka instance auto registration also changes the secure port when the server port is random (0)

Fixes gh-2303
2017-10-23 14:43:20 -04:00
Spencer Gibb d7c13adac0 Merge branch 'tiny-dancer-patch-1' 2017-10-23 14:19:13 -04:00
mg bd2473a7bf Update spring-cloud-netflix.adoc
Update documentation to reflect https://github.com/spring-cloud/spring-cloud-netflix/issues/1048
2017-10-23 14:18:40 -04:00
Gregor Zurowski de16cb71f1 Add new filters actuator endpoint (#2244)
* Add new Zuul filters endpoint and refactor routes endpoint
* Refactor FiltersEndpoint
- Extend from AbstractEndpoint and simplify code
- Move tests classes into package endpoint
- Remove usage of Lombok
* Conditionally enable Zuul routes and filters endpoints
* Provide FilterRegistry to FiltersEndpoint via constructor
2017-10-23 14:08:00 -04:00
Spencer Gibb 4995844f04 Upgrade to eureka 1.8.4
fixes gh-2386
2017-10-21 17:45:12 -04:00
Nastya Smirnova ffc431753b Create TurbineClustersProvider
Extract separate class TurbineClustersProvider to be able to provide custom solution for retrieving configured clusters (#2219)
2017-10-20 21:46:29 -04:00
Spencer Gibb 67f887d870 Update HystrixCommands to use a builder.
Otherwise there would be an explosion of overloaded methods.
2017-10-19 15:52:04 -04:00
Spencer Gibb 5a337fd6c1 Move test to correct package 2017-10-19 14:27:58 -04:00
Spencer Gibb b71ecc1c24 Remove deprecated DiscoveryClient.getLocalServiceInstance() 2017-10-18 11:49:43 -04:00
Spencer Gibb 71bd19d5df Merge branch 'master' into 2.0.x
# Conflicts:
#	spring-cloud-netflix-hystrix-stream/src/test/java/org/springframework/cloud/netflix/hystrix/stream/HystrixStreamTests.java
#	spring-cloud-netflix-zuul/src/main/java/org/springframework/cloud/netflix/zuul/ZuulProxyAutoConfiguration.java
2017-10-18 11:36:41 -04:00
Spencer Gibb 28de82e63c Use updated Registration rather than getLocalServiceInstance()
See https://github.com/spring-cloud/spring-cloud-commons/issues/265
2017-10-18 11:34:38 -04:00
Spencer Gibb b4709f5db5 Update to hystrix-contract.
Updates to 2.0.0
2017-10-17 15:07:07 -04:00
Spencer Gibb b0dccc0f81 Merge branch 'master' into 2.0.x
# Conflicts:
#	spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/metrics/DefaultMetricsTagProvider.java
#	spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/rx/DeferredResultSubscriber.java
#	spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/rx/ResponseBodyEmitterSubscriber.java
#	spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/rx/RxResponse.java
#	spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/support/RibbonCommandContextTest.java
#	spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/ObservableReturnValueHandlerTests.java
#	spring-cloud-netflix-dependencies/pom.xml
2017-10-17 14:10:22 -04:00
Spencer Gibb 6c65266f05 Formatting spaces->tabs 2017-10-17 13:37:28 -04:00
Spencer Gibb 6ffe2f1af2 Downgrade archaius to 0.7.4 for java 7 compatibility.
see https://github.com/Netflix/archaius/pull/522
2017-10-17 13:12:26 -04:00
Dave Syer 5f26d02433 Merge branch 'master' into 2.0.x 2017-10-17 10:47:46 +01:00
Dave Syer 68ce0cf25f Merge branch 'feature/eureka-stubs' 2017-10-17 10:47:35 +01:00
Dave Syer 0b638884f7 Fix merge in Turbine Stream tests 2017-10-17 10:46:08 +01:00
Dave Syer b704dc50c3 Add restassured dependency manually 2017-10-17 10:22:15 +01:00
Dave Syer 62b6d6def2 Fix hystrix tests broken by 2.0 migration 2017-10-17 10:19:20 +01:00
Dave Syer 8d886eedfe Merge branch 'feature/eureka-stubs' into 2.0.x 2017-10-16 21:35:02 +01:00
Spencer Gibb 7cff8ddbd3 Add missing jackson serialization for instanceinfo.
Port information was missing from data sent to eureka.

fixes gh-2372
2017-10-16 16:23:51 -04:00
Dave Syer 9d1eed6a82 Add script to build contract utils 2017-10-16 16:54:35 +01:00
Dave Syer eeadc829b9 Parameterize contract version 2017-10-13 15:17:46 +01:00
Dave Syer efe040549c Move contract helper out of the reactor build 2017-10-13 15:17:46 +01:00
Dave Syer 5bc9e65cdd Add tests for server metadata 2017-10-13 15:17:46 +01:00
Dave Syer d6a604051f Split tests up into individual methods 2017-10-13 15:17:46 +01:00
Dave Syer 51a03b30f2 Consolidate stub tests into one place 2017-10-13 15:17:46 +01:00
Dave Syer 561f3b2fbf Add wiremock verification 2017-10-13 15:17:46 +01:00
Dave Syer 3a7af2c8fe Generate some stubs, yay! 2017-10-13 15:17:46 +01:00
Dave Syer 26c7c362d2 Add property to tests, parameterizing stubs 2017-10-13 15:17:46 +01:00
Dave Syer 0642ea52c9 Remove unused stubs file 2017-10-13 15:17:46 +01:00
Dave Syer 957e33207e Stabilise some tests 2017-10-13 15:17:46 +01:00
Dave Syer a39fe345b5 Remove deprecated annotation 2017-10-13 15:17:46 +01:00
Dave Syer 40e72ddb8c Tweak assertions a bit 2017-10-13 15:17:46 +01:00
Dave Syer 195c3fd75d Extract utility class into shared library for contract tests 2017-10-13 15:17:46 +01:00
Dave Syer c626bccad3 Add rest template to extract SSE events and assert them
The message has to be sent after the endpoint starts up, which only
happens after the first request is accepted, so we put that logic
in the response extractor.
2017-10-13 15:17:46 +01:00
Dave Syer e295188075 Add tests for body of message 2017-10-13 15:17:46 +01:00
Dave Syer 7804e1bd59 Add Spring Cloud Contract for hystrix stream 2017-10-13 15:17:46 +01:00
Spencer Gibb 2870007392 Adds HystrixCommands helper object. 2017-10-11 23:18:06 -04:00
Spencer Gibb fc9d442599 No longer require spring-boot-starter-web in eureka-client starter.
See gh-2359
2017-10-11 23:17:47 -04:00
Spencer Gibb f4321dd3d6 Add dependency management for rxjava-reactive-streams
Allows for bridging webflux when using hystrix commands.

fixes gh-2355
2017-10-10 12:25:39 -04:00
Spencer Gibb d76416f03c Merge branch 'master' into 2.0.x 2017-10-04 19:35:34 -04:00
Spencer Gibb 6b6889b8b4 Fixes refresh scope bean type. 2017-10-04 19:32:57 -04:00
Spencer Gibb 070e4b5c50 Move to zuul.test package. 2017-10-04 19:16:30 -04:00
Fahim Farook f809c119bd Allow init params to be set on ProxyStreamServlet. (#2335)
* Allow init params to be set on ProxyStreamServlet.

Fixes gh-2301

* Added unit test for #gh-2301
2017-10-03 13:43:17 -04:00
Alex Sartan 7f97a61ed5 Fix minor grammar issue in Zuul doc (#2336) 2017-10-01 13:25:32 -04:00
Spencer Gibb 94e8c5196c Fix hystrix stream servlet name. 2017-10-01 11:47:17 -04:00
Spencer Gibb 39b1c0fe0d Update routes endpoint to new endpoint infrastructure.
fixes gh-2318
2017-09-29 16:30:46 -04:00
Spencer Gibb 6f2fc1deae Update to BindingServiceProperties 2017-09-29 15:43:09 -04:00
Spencer Gibb a2d8f0639c Move zuul to its own module. (#2332)
fixes gh-2298
2017-09-29 15:35:57 -04:00
Spencer Gibb 91808bb042 Add support for feign OptionalDecoder
fixes gh-1982
2017-09-28 22:18:52 -04:00
Ryan Baxter 25337dd440 Move Archaius to its own module (#2308)
* Move Archaius to its own module.  

Fixes gh-2300\
2017-09-28 21:28:40 -04:00
Spencer Gibb ec25771453 Upgrade Eureka to v1.8.2
fixes gh-2216
2017-09-28 20:16:02 -04:00
Spencer Gibb c544f4aef6 Move zuul metrics to micrometer.
fixes gh-2317
2017-09-28 18:20:11 -04:00
Spencer Gibb 0ce21c4b15 Fix SpringMvcContractTests
fixes gh-2312
2017-09-28 17:38:39 -04:00
Spencer Gibb ce4d560dc1 Fix RibbonClientHttpRequestFactoryTests
fixes gh-2314
2017-09-28 17:25:47 -04:00
Spencer Gibb 87e98edd61 Move test security uname/pswd to constants. 2017-09-28 17:05:01 -04:00
Spencer Gibb 61513287ce Migrate /hystrix.stream to management context.
fixes gh-2309i
2017-09-28 16:50:13 -04:00
Ryan Baxter 8011b66e53 Merge branch '2.0.x' of github.com:spring-cloud/spring-cloud-netflix into 2.0.x 2017-09-28 15:26:54 -04:00
Ryan Baxter ea8a62ab8e Removing @Ignore 2017-09-28 15:26:25 -04:00
Spencer Gibb 5358b5ba10 polish 2017-09-28 15:13:23 -04:00
Ryan Baxter 1f7f5f90dc Remove @Ignore commented out 2017-09-28 14:48:29 -04:00
Ryan Baxter 14fc7f1ae0 Removing @Ignore 2017-09-28 14:45:29 -04:00
Ryan Baxter c58ae8be21 Removing @Ignore 2017-09-28 14:22:01 -04:00
Spencer Gibb c568ded7c9 remove TODO since servlet 3.0 support is still needed. 2017-09-27 16:13:38 -04:00
Spencer Gibb 0717767297 Fix or ignore tests 2017-09-26 15:24:09 -04:00
Spencer Gibb 10fc74c0ec Fix or ignore tests 2017-09-26 15:24:01 -04:00
Spencer Gibb c9e7d81e8e Fix security in mock eureka server application 2017-09-26 14:00:59 -04:00
Spencer Gibb 312a1d70f7 comment out broken tests 2017-09-25 23:45:57 -04:00
Spencer Gibb d1bc20ac33 Fix spring security tests. 2017-09-25 23:26:42 -04:00
Spencer Gibb 031355790f Remove rx package and classes.
These things are now much better dealt with in Spring MVC and WebFlux
2017-09-25 17:23:02 -04:00
Spencer Gibb 49fdcae8c2 Compile fixes for boot 2 2017-09-25 17:20:58 -04:00
Spencer Gibb 56395596e5 Remove spring-boot metrics information 2017-09-25 17:20:28 -04:00
Spencer Gibb c511440ed9 Remove deprecated starters
fixes gh-1946, gh-2220, gh-2221, gh-2222
2017-09-25 17:19:34 -04:00
Spencer Gibb 8f4ff0e166 Remove spring-boot metrics information 2017-09-25 17:19:08 -04:00
Spencer Gibb 6775e76e5f Remove deprecated starters
fixes gh-1946, gh-2220, gh-2221, gh-2222
2017-09-25 17:17:26 -04:00
Ryan Baxter b9a479607c Merge remote-tracking branch 'origin/master' into 2.0.x 2017-09-25 14:18:49 -04:00
Andre Dörnbrack 05a3db3cc0 Fix zuul post retry (#2209)
Modfied RibbonCommandContext to make request entity resettable. fixes gh-892
2017-09-25 13:59:31 -04:00
Ryan Baxter 145b7ce69a Remove @EnableDiscoveryClient and @EnableEurekaClient (#2242)
* Remove @EnableDiscoveryClient and @EnableEurekaClient as there are now optional.  Fixes #2241.
2017-09-25 13:18:04 -04:00
Ryan Baxter c6fa162728 Merge pull request #2293 from mattjbray/fix-requestmapping-headers
SpringMvcContract: Ignore RequestMapping headers with no value.
2017-09-22 21:15:53 +01:00
Matt Bray 527dc2cc48 SpringMvcContract: Ignore RequestMapping headers with no value.
According to:

https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestMapping.html#headers--

the `headers` field can take several formats:

1. Require the header with a concrete value: `"My-Header=myValue"`
2. Require the header with any value: `"My-Header"`
3. Require the header is absent: `"!My-Header"`
4. Require the header with a negated value : `"My-Header!=myValue"`

This fixes `parseHeaders` for cases 2-4 (which previously threw a `StringIndexOutOfBoundsException`).

Fixes gh-1778.
2017-09-22 18:01:04 +01:00
Dave Syer 7672ee3666 Fix hystrix command keys in tests to be unique 2017-09-21 12:13:19 +01:00
Dave Syer 7ca4f33dcf Remove System.err from test 2017-09-21 11:30:07 +01:00
Spencer Gibb 5cfe0f077f Fix compile errors 2017-09-12 17:38:07 -06:00
spccold baa50c136a simplify org.springframework.cloud.netflix.zuul.filters.ProxyRequestH… (#1965)
* simplify org.springframework.cloud.netflix.zuul.filters.ProxyRequestHelper#setResponse

* Update ProxyRequestHelper.java
2017-09-11 17:32:16 -04:00
Ryan Baxter fa9a8bbf95 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-09-08 14:15:26 -04:00
Ryan Baxter 24d0bedf7d Merge pull request #2255 from DominikMostek/fallback_cause
Fallback cause is propagated to fallback provider
2017-09-08 14:12:52 -04:00
Ryan Baxter 8aeca9c2a8 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-09-08 14:10:58 -04:00
Ryan Baxter 38b8786ede Merge pull request #2261 from ryanjbaxter/timeout-values
Adjust Ribbon connect and read timeout values
2017-09-08 14:08:46 -04:00
Ryan Baxter 146513aeb0 Set Ribbon connect and read timeout values to equal the Hystrix timeout. Fixes #1827. 2017-09-08 10:19:01 -04:00
Ryan Baxter 81c6ece801 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-09-07 12:59:58 -04:00
Dominik Mostek 4dc5088fb2 Updated documentation with new FallbackProvider 2017-09-07 12:55:33 +02:00
Dominik Mostek 4c53fd2bf6 Fallback cause is propagated to fallback provider
Cause can now be propagated to fallback provider in order to respond accordingly to a exception type.
New interface is introduced in order not to break any existing falback providers.
2017-09-07 12:23:37 +02:00
Jin Zhang 885425e2a3 format 'pom.xml' code style (#2257) 2017-09-06 22:26:20 -04:00
Ryan Baxter b74c77b74f Merge pull request #2256 from ryanjbaxter/update-rxjava-version
Update rxjava version
2017-09-06 20:21:12 -04:00
Ryan Baxter 1bc8e8fd3a Update rxjava version. Fixes #2248. 2017-09-06 16:02:04 -04:00
Gregor Zurowski 6dbdb1d8ed Remove commons-lang builders (#2243)
This commit removes usages of commons-lang builders for equals,
hashCode and toString methods.

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-08-31 19:26:53 -04:00
Tom Cawley ea5585e381 Dynamic filtering on Zuul SimpleRouteLocator.getRoutes()
* Introduce getRoutesMap() so subclasses can have read/write access to configured/discovered routes.
2017-08-31 19:20:33 -04:00
Ryan Baxter ace95a3355 Merge pull request #2240 from gzurowski/remove-lombok-from-docs
Remove Lombok from documentation
2017-08-31 16:47:25 -04:00
Spencer Gibb 019615f376 remove commons.lang.builder 2017-08-31 14:45:48 -06:00
Ryan Baxter a8d40afd58 Merge pull request #2239 from gzurowski/remove-lombok-from-netflix-core
Remove Lombok from spring-cloud-netflix-core module
2017-08-31 16:22:50 -04:00
Marcin Grzejszczak 1e0e078c17 Merge branch 'master' into 2.0.x 2017-08-31 15:01:56 +02:00
Marcin Grzejszczak ebe3800c75 Merge branch '1.3.x' 2017-08-31 15:01:12 +02:00
Gregor Zurowski d9738a7ee5 Remove Lombok from documentation
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-08-31 12:15:35 +02:00
Gregor Zurowski d778b938e7 Remove Lombok from spring-cloud-netflix-core module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-08-31 12:01:03 +02:00
Marcin Grzejszczak e7b91c0a85 Merge branch 'master' into 2.0.x 2017-08-29 16:02:26 +02:00
Marcin Grzejszczak 5e9fa908b4 Merge branch '1.3.x' 2017-08-29 15:59:39 +02:00
Marcin Grzejszczak 9d2964ee7d Merge branch 'master' into 2.0.x 2017-08-29 15:07:14 +02:00
Marcin Grzejszczak 4a8913f7ea Migrated to new docs; fixes #2237 2017-08-29 15:04:32 +02:00
Ryan Baxter 8fbd73af1e Going back to snapshots 2017-08-24 17:54:53 -04:00
Ryan Baxter 1be2b2c295 Update SNAPSHOT to 1.4.0.M1 2017-08-24 17:49:28 -04:00
Ryan Baxter 02778fd670 fixing links in docs 2017-08-24 17:07:42 -04:00
Ryan Baxter 985f014f40 bumping sc-build version 2017-08-24 16:44:46 -04:00
Nastya Smirnova 2a63d07146 Extract getApplications method in CommonsInstanceDiscovery
This allows the ability to override behavior of retrieving configured applications
2017-08-21 13:49:42 -04:00
Ryan Baxter ded32cd66a Merge remote-tracking branch 'origin/master' into 2.0.x 2017-08-18 13:23:04 -04:00
Ryan Baxter c8d024c25f Merge pull request #2213 from ryanjbaxter/deprecation-warnings-for-starters
Adds deprecation warning to starters
2017-08-18 13:21:25 -04:00
Ryan Baxter b519ad8d18 Adds deprecation warning to starters. Fixes #2148. 2017-08-18 12:30:45 -04:00
Spencer Gibb 5a9d24044f Going back to snapshots 2017-08-17 16:02:06 -06:00
Spencer Gibb b853da673c Update SNAPSHOT to 2.0.0.M2 2017-08-17 15:53:24 -06:00
Ryan Baxter d56b5abde2 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-08-17 14:48:24 -04:00
Ryan Baxter 24cbbb9a11 Merging 1.3.x into master 2017-08-17 14:47:45 -04:00
Spencer Gibb 1e1ade3cbd Merge branch 'master' into 2.0.x 2017-08-16 03:30:47 -06:00
Spencer Gibb 1840647458 Move EurekaClient.close() to EurekaRegistration.close().
This moves the lifecycle of the eureka client of of EurekaServiceRegistry.

fixes gh-2099
2017-08-16 00:53:40 -06:00
Spencer Gibb 7471dcd3bf Merge branch 'master' into 2.0.x 2017-08-10 14:06:42 -06:00
Spencer Gibb c3114e65bf Merge branch '1.3.x' 2017-08-10 13:59:46 -06:00
Spencer Gibb 96fb8d280e Merge branch 'master' into 2.0.x 2017-08-04 14:59:08 -06:00
Spencer Gibb e4e29e1316 Move tests out of default and base package 2017-08-04 14:37:28 -06:00
Biju Kunjummen 63f975ad43 Sync up matching of ignored paths and route paths (#2163)
Signed-off-by: João Salavessa <joao.salavessa@sky.uk>
2017-08-04 15:41:58 -04:00
Olivier Bourgain a01fc5b758 Fix check then act issue (#2160) 2017-08-04 15:40:10 -04:00
Ryan Baxter a3953fba65 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-08-04 11:00:46 -04:00
Ryan Baxter 481e31220b Merge remote-tracking branch 'origin/1.3.x' 2017-08-04 10:57:41 -04:00
Ryan Baxter 488075de9b Merge remote-tracking branch 'origin/master' into 2.0.x 2017-08-03 13:18:07 -04:00
Ryan Baxter 8fb89b25d9 Merge pull request #2080 from ryanjbaxter/http-client-centralization
Centralizing HTTP client creation and configuration
2017-08-03 13:02:09 -04:00
Ryan Baxter bd7e75f4b3 Merge remote-tracking branch 'Upstream/master' into http-client-centralization 2017-08-01 16:46:07 -04:00
Ryan Baxter a358764b9a Merge remote-tracking branch 'origin/master' into 2.0.x 2017-07-31 20:53:26 -04:00
Ryan Baxter b3d61a6de7 Removing duplicate install goal 2017-07-31 20:22:45 -04:00
Dave Syer 0bfd86880b Merge branch 'master' into 2.0.x 2017-07-26 12:14:25 +01:00
Dave Syer e5b14e4177 Fix all the start poms to be jars again
They are all deprecated but that's no reason to break them.
2017-07-26 12:13:25 +01:00
Spencer Gibb e9f0112e28 Merge branch 'master' into 2.0.x 2017-07-25 08:58:57 -06:00
Spencer Gibb 0de86d3faf fix hashCode 2017-07-25 08:58:39 -06:00
Gregor Zurowski aa2159b7e5 Remove Lombok from spring-cloud-netflix-eureka-client module (#2131) 2017-07-24 19:07:18 -04:00
Spencer Gibb 894cfc2acd Merge branch 'master' into 2.0.x 2017-07-24 16:22:01 -06:00
Biju Kunjummen 1c30c24639 Replace o.s.b.a.PropertyPlaceholderAuto* with o.s.b.a.context.PropertyPlaceholderAuto* (#2155) 2017-07-24 18:11:20 -04:00
Spencer Gibb 7e37e0dac0 Add commons-logging as a dependency of archaius 2017-07-24 16:07:04 -06:00
Spencer Gibb cd177ab0b1 Merge branch 'master' into 2.0.x 2017-07-24 14:48:15 -06:00
Spencer Gibb cd2ed8eeee Restore turbine stream dependencies. 2017-07-24 14:37:31 -06:00
Spencer Gibb c7a084aa25 Fix versions of new starters 2017-07-21 14:46:35 -06:00
Spencer Gibb 6952d1ab48 Merge branch 'master' into 2.0.x 2017-07-21 14:23:55 -06:00
Spencer Gibb 112a3e27a6 Fix versions of new starters 2017-07-21 14:21:44 -06:00
Daniel Lavoie bbac5a730f Rename starters to include -netflix- (#1886)
Fixes gh-665
2017-07-21 15:59:32 -04:00
Daniel Lavoie 348c96bf13 Optionally remove Jersey dependencies from Eureka Client (#1850)
Fixes gh-1849
2017-07-21 15:55:57 -04:00
Biju Kunjummen fd783734ac Add docs for default ribbon client configuration (#2142)
fixes #1741
2017-07-21 11:45:01 -04:00
Biju Kunjummen fc4f375a65 Restore ignored test - works cleanly for a full build (#2146) 2017-07-21 11:41:10 -04:00
Spencer Gibb 57ecd0ec10 Merge branch 'master' into 2.0.x 2017-07-20 10:16:47 -06:00
Spencer Gibb 37129671b6 Merge branch '1.3.x' 2017-07-20 10:06:32 -06:00
Spencer Gibb 3c409d3bc1 Merge branch 'master' into 2.0.x 2017-07-19 12:18:59 -06:00
Spencer Gibb 1cf509c365 Merge branch '1.3.x' 2017-07-19 12:12:01 -06:00
Spencer Gibb 12c7ae1e05 Merge branch 'master' into 2.0.x 2017-07-18 12:42:59 -06:00
Spencer Gibb 31d19fd51a Remove commons.lang.builder refs 2017-07-18 11:05:05 -06:00
Spencer Gibb 74540e9f4d Merge branch '1.3.x' 2017-07-18 10:57:41 -06:00
Tummala Dhanvi (c0mrad3) 859a79ad35 Document prefer hostname #2084 (#2092) 2017-07-18 12:39:43 -04:00
Ryan Baxter 130dfb6358 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-07-14 13:46:20 -04:00
Ryan Baxter 6ab27328cc Merge pull request #2128 from gzurowski/remove-lombok-from-eureka-server
Remove Lombok from spring-cloud-netflix-eureka-server module
2017-07-14 13:44:12 -04:00
Gregor Zurowski 72c31ca524 Polish code
- Remove formatter markers
- Use StringBuilder in toString method

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-14 16:26:04 +02:00
Gregor Zurowski 4d69941593 Remove Lombok from spring-cloud-netflix-eureka-server module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-14 11:49:33 +02:00
Ryan Baxter 91f22b502f Merge remote-tracking branch 'origin/master' into 2.0.x 2017-07-13 09:56:40 -04:00
Ryan Baxter 0d19a55ddd Merge pull request #2120 from gzurowski/remove-lombok-log-from-eureka-client
Remove Lombok logging from spring-cloud-netflix-eureka-client module
2017-07-13 09:36:02 -04:00
Ryan Baxter ceef16f0c8 Merge pull request #2121 from gzurowski/remove-lombok-log-from-eureka-server
Remove Lombok logging from spring-cloud-netflix-eureka-server module
2017-07-13 09:35:38 -04:00
Ryan Baxter 187f34dfee Merge pull request #2122 from gzurowski/remove-lombok-log-from-core
Remove Lombok logging from spring-cloud-netflix-core module
2017-07-13 09:35:09 -04:00
Ryan Baxter 96b1e40c0a Merge pull request #2123 from gzurowski/fix-maven-warnings
Fix Maven warnings about missing plugin versions
2017-07-13 09:34:09 -04:00
Gregor Zurowski 63d77a8b81 Fix Maven warnings about missing plugin versions
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-13 09:38:53 +02:00
Gregor Zurowski 8022342e81 Remove Lombok logging from spring-cloud-netflix-eureka-server module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-13 09:21:32 +02:00
Gregor Zurowski 6379e15ce1 Remove Lombok logging from spring-cloud-netflix-eureka-client module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-13 09:20:29 +02:00
Gregor Zurowski 5b075623ff Remove Lombok logging from spring-cloud-netflix-core module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-13 08:48:56 +02:00
Marco Schulte 46cbaa053c Fixed NPE if origin is unset (#2100) 2017-07-12 15:41:32 -04:00
Ryan Baxter 0a423fc433 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-07-12 11:14:27 -04:00
Ryan Baxter ffc33b4c69 Merge pull request #2105 from gzurowski/routes-endpoint-details
Provide more Zuul route details in the routes actuator endpoint
2017-07-12 10:47:49 -04:00
Ryan Baxter 1d3773ab5e Merge pull request #2111 from gzurowski/remove-lombok-from-turbine-stream
Remove Lombok from spring-cloud-netflix-turbine-stream module
2017-07-12 10:35:48 -04:00
Ryan Baxter a968b4bec8 Merge pull request #2112 from gzurowski/remove-lombok-from-turbine
Remove Lombok from spring-cloud-netflix-turbine module
2017-07-12 10:35:06 -04:00
Ryan Baxter 65902d11e4 Merge pull request #2113 from gzurowski/remove-lombok-from-sidecar
Remove Lombok from spring-cloud-netflix-sidecare module
2017-07-12 10:34:12 -04:00
Ryan Baxter 050dc31c97 Merge pull request #2114 from gzurowski/remove-lombok-from-hystrix-dashboard
Remove Lombok from spring-cloud-netflix-hystrix-dashboard module
2017-07-12 10:33:29 -04:00
Gregor Zurowski aae96faa76 Remove Lombok from spring-cloud-netflix-hystrix-dashboard module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-11 23:25:05 +02:00
Gregor Zurowski 0dea44acf4 Remove Lombok from spring-cloud-netflix-turbine module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-11 23:14:40 +02:00
Gregor Zurowski b158f6f2b7 Remove Lombok from spring-cloud-netflix-turbine-stream module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-11 23:00:18 +02:00
Ryan Baxter 11da3d4e3c Merge remote-tracking branch 'Upstream/master' into http-client-centralization 2017-07-11 16:48:19 -04:00
Gregor Zurowski 5f4fc247a4 Remove Lombok from spring-cloud-netflix-sidecare module
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-11 22:39:15 +02:00
Ryan Baxter 78ba3c5394 Cleanup and code review fixes. 2017-07-11 14:49:44 -04:00
Gregor Zurowski 781fa3ea0c Add documentation about the detailed output of the routes endpoint
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-11 15:56:13 +02:00
Gregor Zurowski a08b661af6 Remove usage of Lombok
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-11 10:38:51 +02:00
Spencer Gibb 068b236eba fix compilation error 2017-07-10 11:54:27 -06:00
Ryan Baxter 726fa3910d Merge remote-tracking branch 'origin/master' into 2.0.x 2017-07-10 13:34:37 -04:00
Ryan Baxter d0009ba05a Merge pull request #2087 from brenuart/gh1534
React on ContextClosedEvent only if from "our" context
2017-07-10 13:33:39 -04:00
Ryan Baxter e2a19ce086 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-07-10 11:49:57 -04:00
Ryan Baxter ab9b5ba3ec Merge pull request #2104 from gzurowski/use-filter-constants
Use filter constants where appropriate
2017-07-10 11:49:06 -04:00
Ryan Baxter 3b4ed6c0a4 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-07-10 11:42:06 -04:00
Ryan Baxter 70d39aae7b Merge pull request #2107 from yongsungyoon/fix-compile-error-on-ejc
Fix compilation problem on eclipse java compiler
2017-07-10 11:39:04 -04:00
Ryan Baxter 56ccc46f5f Added documentation 2017-07-09 15:26:24 -04:00
Ryan Baxter ff33905704 Updating property names 2017-07-09 14:21:10 -04:00
Ryan Baxter 69739420fa Takes advantage of new builder pattern. Also reverted elimination of properties for feign and ribbon. 2017-07-09 13:39:04 -04:00
Yongsung Yoon 2b593bc742 Fix compilation problem on eclipse java compiler 2017-07-10 00:36:07 +09:00
Gregor Zurowski eb1b7baf1c Provide more Zuul route details in the routes actuator endpoint
Add a parameter to control the level of details returned with the
routes actuator endpoint. If requested, return all available Zuul route
details including ID, prefix, sensitive headers, etc.

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-08 22:40:39 +02:00
Gregor Zurowski 05eef0e8f5 Use filter constants
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-07 22:16:11 +02:00
Eko Kurniawan Khannedy c2c634707e FeignClient Configuration Properties (#1942)
* add feign client properties

* configure feign builder from properties if exists

* change string config to class config and add unit test for feign client using configuration properties

* refactoring and add primary flag configuration

* add decode404 in feign client configuration properties

* change unit test properties decode404 to true

* remove lombok from FeignClientProperties and change primary attribute to default-to-properties

fixes gh-1931
2017-07-07 15:31:56 -04:00
Biju Kunjummen 0579b326be Support for re-writing Location Headers (#1863)
* Support for re-writing Location Headers

* Added additional constructor for Route, removed auto-configuration of LocationRewriteFilter

* Polished docs, more tests
2017-07-07 15:21:44 -04:00
Gregor Zurowski 70a26fec26 Use static import for constants (#2103)
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-07 14:35:49 -04:00
Ryan Baxter 02ec9bb98e Merge remote-tracking branch 'Upstream/master' into http-client-centralization 2017-07-07 10:54:08 -04:00
Ryan Baxter b2f608b884 OK HTTP Client changes 2017-07-07 10:10:53 -04:00
Gregor Zurowski a496dc8170 Use constant utility classes instead of constant interfaces (#2081)
Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
2017-07-06 12:01:26 -04:00
Bertrand Renuart 8ad15399d6 React on ContextClosedEvent only if originating from "our" context (not another like a child) 2017-07-03 15:52:01 +02:00
Yongsung Yoon 8e11514e7c Add options for RibbonCommand to use separate thread pools for hystrix (#2074)
* Add options for RibbonCommand to use separate thread pools for hystrix

* Remove lombok annotation and Add getter/setter for ZuulProperties$HystrixThreadPool

* Add doc about how to configure hystrix thread pools in Zuul Developer Guide

* Add testcases for HystrixThreadPoolKey of RibbonCommand

* Tiny change about if block in AbstractRibbonCommand
2017-06-30 20:03:52 -04:00
Spencer Gibb 89cb5573d9 bump commons to 1.3.0ˆ 2017-06-30 17:33:57 -06:00
Spencer Gibb 23ebd6ac08 Merge branch 'master' into 2.0.x 2017-06-30 17:12:10 -06:00
Spencer Gibb 5856d76e65 Merge branch '1.3.x' 2017-06-30 17:11:18 -06:00
Spencer Gibb 68f13c4985 Going back to snapshots 2017-06-28 10:40:29 -06:00
Spencer Gibb 3f4783dfab Update SNAPSHOT to 2.0.0.M1 2017-06-28 10:38:12 -06:00
Spencer Gibb 03df8cbf43 remove rxjava mvc documentation.
this is now handled by spring-framework
2017-06-28 10:32:02 -06:00
Ryan Baxter 572305d7c8 Fixing code formatting 2017-06-28 12:00:11 -04:00
Ryan Baxter 2aa93abc0f Centralizing HTTP client creation and configuration 2017-06-28 11:43:52 -04:00
Ryan Baxter 0be3d23369 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-06-20 13:27:13 -04:00
Ryan Baxter e2954d0117 Merge pull request #2059 from brandon-atkinson/gh-2042
Rename *Test.java -> *Tests.java. Fixes #2042
2017-06-20 10:49:11 -04:00
Brandon Atkinson 497b95ec64 Rename *Test.java -> *Tests.java. Fixes #2042 2017-06-19 20:41:54 -04:00
Ryan Baxter 02e7594de5 Bumping s-c-stream to Ditmars 2017-06-19 14:06:44 -04:00
Ryan Baxter 7efa68e853 Merge remote-tracking branch 'origin/1.3.x' 2017-06-19 14:05:29 -04:00
Ryan Baxter 619580afe5 Merge remote-tracking branch 'origin/master' into 2.0.x 2017-06-16 12:31:00 -04:00
Ryan Baxter 5c035768b0 Merge remote-tracking branch 'origin/1.3.x' 2017-06-16 11:51:09 -04:00
Ryan Baxter ccae4e4ce2 Bumping s-c-config version to 1.4.0 2017-06-14 16:40:48 -04:00
Dave Syer a7675470ab Merge branch 'master' into 2.0.x 2017-06-13 14:21:59 +01:00
Dave Syer d39a22945b Merge branch '1.3.x' 2017-06-13 13:58:08 +01:00
Dave Syer 63b2916993 Merge branch 'master' into 2.0.x 2017-06-12 16:16:54 +01:00
Dave Syer 310f558e9c Merge branch '1.3.x' 2017-06-12 16:15:44 +01:00
Dave Syer 1a0428da97 Merge branch '1.3.x' 2017-06-12 15:52:24 +01:00
Ryan Baxter 7f7cdccb6b Merge remote-tracking branch 'origin/master' into 2.0.x 2017-06-09 12:31:44 -04:00
Ryan Baxter f9424231a9 Merge pull request #2031 from doernbrackandre/fix_whitespaces_in_retryable_status_codes_list
fixes a problem with whitespaces in list of retryable status codes
2017-06-09 12:00:38 -04:00
Dave Syer d4ba70db5c Merge branch '1.3.x' 2017-06-09 13:31:17 +01:00
André Dörnbrack 02316d4ee0 Merge branch 'fix_whitespaces_in_retryable_status_codes_list' of github.com:doernbrackandre/spring-cloud-netflix into fix_whitespaces_in_retryable_status_codes_list 2017-06-09 13:39:44 +02:00
André Dörnbrack 4f148de74d code cleanup 2017-06-09 13:37:56 +02:00
André Dörnbrack 9f10d5207f fixes a problem with whitespaces in list of retryable status codes 2017-06-09 10:12:24 +02:00
Ryan Baxter 484bde10b3 Adding 404 to list of retryable status codes 2017-06-08 16:18:11 -04:00
Ryan Baxter 8281757da8 Add path to try and fix intermittent failures with RetryableZuulApplicationTests pass 2017-06-08 15:43:15 -04:00
Ryan Baxter 4e25e2eb81 Revert "Trying a plain RestTemplate in an attempt to fix intermittent test failures."
This reverts commit f552426304.
2017-06-08 15:34:57 -04:00
Ryan Baxter f552426304 Trying a plain RestTemplate in an attempt to fix intermittent test failures. 2017-06-08 15:16:03 -04:00
Spencer Gibb c046901d8f spring 5 updates 2017-06-08 12:32:52 -06:00
Spencer Gibb 3bfc90a8bb Merge branch 'master' into 2.0.x 2017-06-08 12:19:43 -06:00
Spencer Gibb 15295dd294 Merge remote-tracking branch 'origin/master' 2017-06-08 12:18:45 -06:00
Ryan Baxter 1405a1894b Closing response in Feign load balancer 2017-06-08 13:48:56 -04:00
Ryan Baxter a1c8cfe967 Close response when retry on certain status codes. Fixes #1970. 2017-06-08 13:48:56 -04:00
Spencer Gibb 582746587b Merge branch '1.3.x' 2017-06-08 11:35:45 -06:00
Spencer Gibb 13155ce64c Upgrade eureka to v1.7.0
fixes gh-2028
2017-06-07 13:14:07 -06:00
Jin Zhang c5d95ca805 SendErrorFilter: put response code into RequestContext, keep consistent with normal cases (#2004) 2017-06-07 12:06:35 -04:00
Spencer Gibb 52ee7c8700 Boot 2.0 compatibility fixes 2017-06-06 10:56:13 -06:00
Spencer Gibb cfb314198a merge fixes 2017-06-06 10:55:52 -06:00
Spencer Gibb 74ff65954f Merge branch 'master' into 2.0.x 2017-06-06 09:59:55 -06:00
Spencer Gibb 9e180b8ba7 Merge branch '1.3.x' 2017-06-05 16:41:57 -06:00
Ryan Baxter d914406c84 Merge pull request #2000 from rpahli/master
use only default https ports for https check
2017-06-01 20:08:10 -04:00
Biju Kunjummen 31a3ff61e8 GH-1916: Spring Boot Auto-configuration based Zuul Server and Proxy (#1951) 2017-06-01 15:12:42 -04:00
Spencer Gibb 3773047a06 Bump to version 1.4.0.BUILD-SNAPSHOT 2017-06-01 12:50:57 -06:00
Spencer Gibb 72b7ee2480 Merge remote-tracking branch 'origin/2.0.x' into 2.0.x 2017-06-01 12:35:05 -06:00
pahli a1d089038d make property injection optional 2017-05-31 23:55:17 +02:00
pahli 71c906b00b add private accessor 2017-05-31 22:33:10 +02:00
pahli 6d22a407cc use @ConfigurationProperties 2017-05-31 22:25:51 +02:00
pahli bdfbe3a87e make secure ports for DefaultServerIntrospector configurable 2017-05-31 22:09:35 +02:00
Ryan Baxter 18ec564249 Fixing typo 2017-05-31 14:36:12 -04:00
Spencer Gibb 92277a01ac Merge branch 'master' into 2.0.x 2017-05-31 11:39:19 -06:00
Rico Pahlisch ccf8f86c8d use only default https ports for https check
spring boot uses all high ports and there are some trouble if ports end with 443 (e.g. 24443, ...)
2017-05-31 12:04:09 +02:00
Spencer Gibb 73f3345638 Fix tests 2017-05-25 12:37:34 -06:00
Spencer Gibb 302f805295 Fix compilation issues 2017-05-25 10:49:29 -06:00
Spencer Gibb 7cfbcbd9e2 fix compile/test issues related to boot 2.0 changes 2017-05-16 19:43:01 -06:00
Ryan Baxter 8d1a82f9b4 Merged some commits and fixed compile issues 2017-05-12 12:21:47 -04:00
Dave Syer 16dc2f63f1 Merge master 2017-05-10 11:40:28 +01:00
Spencer Gibb e430b90cea Updates to compile 2017-04-06 21:54:06 -06:00
Spencer Gibb 08a1f07692 Merge branch 'master' into 2.0.x 2017-04-06 21:30:03 -06:00
Spencer Gibb 4b4bfbe1b1 Make compile for boot 2.0 2017-03-17 21:02:56 -06:00
770 changed files with 37225 additions and 28991 deletions
+41
View File
@@ -0,0 +1,41 @@
version: 2
jobs:
build:
docker:
- image: springcloud/pipeline-base
user: appuser
environment:
_JAVA_OPTIONS: "-Xms1024m -Xmx2048m"
TERM: dumb
branches:
ignore:
- gh-pages # list of branches to ignore
steps:
- checkout
- restore_cache:
key: sc-netflix-{{ .Branch }}
- run:
name: "Download dependencies"
command: |
cd spring-cloud-netflix-hystrix-contract && ../mvnw clean install && \
./mvnw -s .settings.xml -U --fail-never dependency:go-offline || true
- save_cache:
key: sc-netflix-{{ .Branch }}
paths:
- ~/.m2
- run:
name: "Running build"
command: ./mvnw -s .settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- run:
name: "Aggregate test results"
when: always
command: |
mkdir -p ~/junit/
find . -type f -regex ".*/target/.*-reports/.*" -exec cp {} ~/junit/ \;
bash <(curl -s https://codecov.io/bash)
- store_artifacts:
path: ~/junit/
destination: artifacts
- store_test_results:
path: ~/junit/
destination: testartifacts
+16
View File
@@ -0,0 +1,16 @@
root=true
[*.java]
indent_style = tab
indent_size = 4
continuation_indent_size = 8
[*.groovy]
indent_style = tab
indent_size = 4
continuation_indent_size = 8
[*.xml]
indent_style = tab
indent_size = 4
continuation_indent_size = 8
+45
View File
@@ -0,0 +1,45 @@
# Contributing
Spring Cloud is released under the non-restrictive Apache 2.0 license,
and follows a very standard Github development process, using Github
tracker for issues and merging pull requests into master. If you want
to contribute even something trivial please do not hesitate, but
follow the guidelines below.
## Sign the Contributor License Agreement
Before we accept a non-trivial patch or pull request we will need you to sign the
[Contributor License Agreement](https://cla.pivotal.io/sign/spring).
Signing the contributor's agreement does not grant anyone commit rights to the main
repository, but it does mean that we can accept your contributions, and you will get an
author credit if we do. Active contributors might be asked to join the core team, and
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/master/docs/src/main/asciidoc/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
None of these is essential for a pull request, but they will all help. They can also be
added after the original pull request but before a merge.
* Use the Spring Framework code format conventions. If you use Eclipse
you can import formatter settings using the
`eclipse-code-formatter.xml` file from the
[Spring Cloud Build](https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml) project. If using IntelliJ, you can use the
[Eclipse Code Formatter Plugin](https://plugins.jetbrains.com/plugin/6546) to import the same file.
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
`@author` tag identifying you, and preferably at least a paragraph on what the class is
for.
* Add the ASF license header comment to all new `.java` files (copy from existing files
in the project)
* Add yourself as an `@author` to the .java files that you modify substantially (more
than cosmetic changes).
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
* A few unit tests would help a lot as well -- someone has to do it.
* If no-one else is using your branch, please rebase it against the current master (or
other target branch in the main project).
* When writing a commit message please follow [these conventions](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
message (where XXXX is the issue number).
+20
View File
@@ -0,0 +1,20 @@
<!--
Thanks for raising a Spring Cloud issue. What sort of issue are you raising?
Question
Please ask questions about how to use something, or to understand why something isn't
working as you expect it to, on Stack Overflow using the spring-cloud tag.
Bug report
Please provide details of the problem, including the version of Spring Cloud that you
are using. If possible, please provide a test case or sample application that reproduces
the problem. This makes it much easier for us to diagnose the problem and to verify that
we have fixed it.
Enhancement
Please start by describing the problem that you are trying to solve. There may already
be a solution, or there may be a way to solve it that you hadn't considered.
-->
+17
View File
@@ -0,0 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: waiting-for-triage
assignees: ''
---
**Describe the bug**
Please provide details of the problem, including the version of Spring Cloud that you
are using.
**Sample**
If possible, please provide a test case or sample application that reproduces
the problem. This makes it much easier for us to diagnose the problem and to verify that
we have fixed it.
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+2
View File
@@ -18,3 +18,5 @@ _site/
.shelf
*.swp
*.swo
.vscode/
.flattened-pom.xml
+107
View File
@@ -0,0 +1,107 @@
/*
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 Regular → Executable
BIN
View File
Binary file not shown.
Vendored Regular → Executable
+1 -1
View File
@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
+5 -5
View File
@@ -21,7 +21,7 @@
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<url>https://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@@ -29,7 +29,7 @@
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@@ -37,7 +37,7 @@
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@@ -47,7 +47,7 @@
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<url>https://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@@ -55,7 +55,7 @@
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
+2 -2
View File
@@ -1,7 +1,7 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@@ -193,7 +193,7 @@
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
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,
+31 -42
View File
@@ -19,11 +19,34 @@ Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon).
* Service Discovery: an embedded Eureka server can be created with declarative Java configuration
* Circuit Breaker: Hystrix clients can be built with a simple annotation-driven method decorator
* Circuit Breaker: embedded Hystrix dashboard with declarative Java configuration
* Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
* Client Side Load Balancer: Ribbon
* External Configuration: a bridge from the Spring Environment to Archaius (enables native configuration of Netflix components using Spring Boot conventions)
* Router and Filter: automatic registration of Zuul filters, and a simple convention over configuration approach to reverse proxy creation
== Modules In Maintenance Mode
Placing a module in maintenance mode means that the Spring Cloud team will no longer be adding new features to the module.
We will fix blocker bugs and security issues, and we will also consider and review small pull requests from the community.
We intend to continue to support these modules for a period of at least a year from the general availability
of the Greenwich release train.
The following Spring Cloud Netflix modules and corresponding starters will be placed into maintenance mode:
* spring-cloud-netflix-archaius
* spring-cloud-netflix-hystrix-contract
* spring-cloud-netflix-hystrix-dashboard
* spring-cloud-netflix-hystrix-stream
* spring-cloud-netflix-hystrix
* spring-cloud-netflix-ribbon
* spring-cloud-netflix-turbine-stream
* spring-cloud-netflix-turbine
* spring-cloud-netflix-zuul
NOTE: This does not include the Eureka or concurrency-limits modules.
== Building
:jdkversion: 1.8
@@ -61,7 +84,7 @@ credentials and you already have those.
The projects that require middleware generally include a
`docker-compose.yml`, so consider using
http://compose.docker.io/[Docker Compose] to run the middeware servers
https://compose.docker.io/[Docker Compose] to run the middeware servers
in Docker containers. See the README in the
https://github.com/spring-cloud-samples/scripts[scripts demo
repository] for specific instructions about the common cases of mongo,
@@ -83,13 +106,13 @@ a modified file in the correct place. Just commit it and push the change.
=== Working with the code
If you don't have an IDE preference we would recommend that you use
http://www.springsource.com/developer/sts[Spring Tools Suite] or
http://eclipse.org[Eclipse] when working with the code. We use the
http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
https://www.springsource.com/developer/sts[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.
==== Importing into eclipse with m2eclipse
We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
marketplace".
@@ -116,40 +139,6 @@ from the `file` menu.
==== Adding Project Lombok Agent
Spring Cloud uses http://projectlombok.org/features/index.html[Project Lombok]
to generate getters and setters etc. Compiling from the command line this
shouldn't cause any problems, but in an IDE you need to add an agent
to the JVM. Full instructions can be found in the Lombok website. The
sign that you need to do this is a lot of compiler errors to do with
missing methods and fields, e.g.
[indent=0]
----
The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 120 Java Problem
The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 121 Java Problem
The method setNonSecurePort(int) is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 112 Java Problem
The type EurekaInstanceConfigBean.IdentifyingDataCenterInfo must implement the inherited abstract method DataCenterInfo.getName() EurekaInstanceConfigBean.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 131 Java Problem
The method getId() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 60 Java Problem
The method getLocation() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 55 Java Problem
----
==== Importing into Intellij
Spring Cloud projects use annotation processing, particularly Lombok, which requires configuration
or you will encounter compile problems. It also needs a specific version of maven and a profile
enabled. Intellij 14.1+ requires some configuration to ensure these are setup properly.
1. Click Preferences, Plugins. *Ensure Lombok is installed*
2. Click New, Project from Existing Sources, choose your spring-cloud project directory
3. Choose Maven, and select Environment Settings. *Ensure you are using Maven 3.3.3*
4. In the next screen, *Select the profile `spring`* click Next until Finish.
5. Click Preferences, "Build, Execution, Deployment", Compiler, Annotation Processors. *Click Enable Annotation Processing*
6. Click Build, Rebuild Project, and you are ready to go!
==== Importing into other IDEs
Maven is well supported by most Java IDEs. Refer to you vendor documentation.
== Contributing
Spring Cloud is released under the non-restrictive Apache 2.0 license,
@@ -180,7 +169,7 @@ added after the original pull request but before a merge.
`eclipse-code-formatter.xml` file from the
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
Cloud Build] project. If using IntelliJ, you can use the
http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
Plugin] to import the same file.
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
`@author` tag identifying you, and preferably at least a paragraph on what the class is
@@ -193,6 +182,6 @@ added after the original pull request but before a merge.
* A few unit tests would help a lot as well -- someone has to do it.
* If no-one else is using your branch, please rebase it against the current master (or
other target branch in the main project).
* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
message (where XXXX is the issue number).
+5
View File
@@ -0,0 +1,5 @@
# Security Policy
## Reporting a Vulnerability
To report security vulnerabilities, please go to https://pivotal.io/security.
+1 -1
View File
@@ -1,4 +1,4 @@
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
/* Remove the comments around the @import statement below when using this as a custom stylesheet */
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400";*/
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
-26
View File
@@ -1,26 +0,0 @@
general:
branches:
ignore:
- gh-pages # list of branches to ignore
machine:
java:
version: oraclejdk8
environment:
_JAVA_OPTIONS: "-Xms1024m -Xmx2048m"
dependencies:
override:
- ./mvnw -s .settings.xml -U --fail-never dependency:go-offline || true
test:
override:
- ./mvnw -s .settings.xml clean install org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
post:
- find . -type f -regex ".*/spring-cloud-*.*/target/*.*" | cpio -pdm $CIRCLE_ARTIFACTS
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/target/.*-reports/.*" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
- bash <(curl -s https://codecov.io/bash)
notify:
webhooks:
# A list of hook hashes, containing the url field
# gitter hook
- url: https://webhooks.gitter.im/e/22e6bb4eb945dd61ba54
+3
View File
@@ -0,0 +1,3 @@
releaser:
maven:
buildCommand: ./scripts/build.sh {{systemProps}}
+376
View File
@@ -0,0 +1,376 @@
////
DO NOT EDIT THIS FILE. IT WAS GENERATED.
Manual changes to this file will be lost when it is generated again.
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://circleci.com/gh/spring-cloud/spring-cloud-netflix/tree/master.svg?style=svg["CircleCI", link="https://circleci.com/gh/spring-cloud/spring-cloud-netflix/tree/master"]
image::https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/master/graph/badge.svg["Codecov", link="https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/master"]
image::https://api.codacy.com/project/badge/Grade/a6885a06921e4f72a0df0b7aabd6d118["Codacy code quality", link="https://www.codacy.com/app/Spring-Cloud/spring-cloud-netflix?utm_source=github.com&utm_medium=referral&utm_content=spring-cloud/spring-cloud-netflix&utm_campaign=Badge_Grade"]
: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), Circuit Breaker (Hystrix),
Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon).
== 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
* Circuit Breaker: Hystrix clients can be built with a simple annotation-driven method decorator
* Circuit Breaker: embedded Hystrix dashboard with declarative Java configuration
* Client Side Load Balancer: Ribbon
* External Configuration: a bridge from the Spring Environment to Archaius (enables native configuration of Netflix components using Spring Boot conventions)
* Router and Filter: automatic registration of Zuul filters, and a simple convention over configuration approach to reverse proxy creation
: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
== Modules In Maintenance Mode
Placing a module in maintenance mode means that the Spring Cloud team will no longer be adding new features to the module.
We will fix blocker bugs and security issues, and we will also consider and review small pull requests from the community.
We intend to continue to support these modules for a period of at least a year from the general availability
of the Greenwich release train.
The following Spring Cloud Netflix modules and corresponding starters will be placed into maintenance mode:
* spring-cloud-netflix-archaius
* spring-cloud-netflix-hystrix-contract
* spring-cloud-netflix-hystrix-dashboard
* spring-cloud-netflix-hystrix-stream
* spring-cloud-netflix-hystrix
* spring-cloud-netflix-ribbon
* spring-cloud-netflix-turbine-stream
* spring-cloud-netflix-turbine
* spring-cloud-netflix-zuul
NOTE: This does not include the Eureka or concurrency-limits modules.
== Building
:jdkversion: 1.8
=== Basic Compile and Test
To build the source you will need to install JDK {jdkversion}.
Spring Cloud uses Maven for most build-related activities, and you
should be able to get off the ground quite quickly by cloning the
project you are interested in and typing
----
$ ./mvnw install
----
NOTE: You can also install Maven (>=3.3.3) yourself and run the `mvn` command
in place of `./mvnw` in the examples below. If you do that you also
might need to add `-P spring` if your local Maven settings do not
contain repository declarations for spring pre-release artifacts.
NOTE: Be aware that you might need to increase the amount of memory
available to Maven by setting a `MAVEN_OPTS` environment variable with
a value like `-Xmx512m -XX:MaxPermSize=128m`. We try to cover this in
the `.mvn` configuration, so if you find you have to do it to make a
build succeed, please raise a ticket to get the settings added to
source control.
For hints on how to build the project look in `.travis.yml` if there
is one. There should be a "script" and maybe "install" command. Also
look at the "services" section to see if any services need to be
running locally (e.g. mongo or rabbit). Ignore the git-related bits
that you might find in "before_install" since they're related to setting git
credentials and you already have those.
The projects that require middleware generally include a
`docker-compose.yml`, so consider using
https://docs.docker.com/compose/[Docker Compose] to run the middeware servers
in Docker containers. See the README in the
https://github.com/spring-cloud-samples/scripts[scripts demo
repository] for specific instructions about the common cases of mongo,
rabbit and redis.
NOTE: If all else fails, build with the command from `.travis.yml` (usually
`./mvnw install`).
=== Documentation
The spring-cloud-build module has a "docs" profile, and if you switch
that on it will try to build asciidoc sources from
`src/main/asciidoc`. As part of that process it will look for a
`README.adoc` and process it by loading all the includes, but not
parsing or rendering it, just copying it to `${main.basedir}`
(defaults to `${basedir}`, i.e. the root of the project). If there are
any changes in the README it will then show up after a Maven build as
a modified file in the correct place. Just commit it and push the change.
=== 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://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.
==== Importing into eclipse with m2eclipse
We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
marketplace".
NOTE: Older versions of m2e do not support Maven 3.3, so once the
projects are imported into Eclipse you will also need to tell
m2eclipse to use the right profile for the projects. If you
see many different errors related to the POMs in the projects, check
that you have an up to date installation. If you can't upgrade m2e,
add the "spring" profile to your `settings.xml`. Alternatively you can
copy the repository settings from the "spring" profile of the parent
pom into your `settings.xml`.
==== Importing into eclipse without m2eclipse
If you prefer not to use m2eclipse you can generate eclipse project metadata using the
following command:
[indent=0]
----
$ ./mvnw eclipse:eclipse
----
The generated eclipse projects can be imported by selecting `import existing projects`
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
:spring-cloud-build-branch: master
Spring Cloud is released under the non-restrictive Apache 2.0 license,
and follows a very standard Github development process, using Github
tracker for issues and merging pull requests into master. If you want
to contribute even something trivial please do not hesitate, but
follow the guidelines below.
=== Sign the Contributor License Agreement
Before we accept a non-trivial patch or pull request we will need you to sign the
https://cla.pivotal.io/sign/spring[Contributor License Agreement].
Signing the contributor's agreement does not grant anyone commit rights to the main
repository, but it does mean that we can accept your contributions, and you will get an
author credit if we do. Active contributors might be asked to join the core team, and
given the ability to merge pull requests.
=== Code of Conduct
This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of
conduct]. By participating, you are expected to uphold this code. Please report
unacceptable behavior to spring-code-of-conduct@pivotal.io.
=== Code Conventions and Housekeeping
None of these is essential for a pull request, but they will all help. They can also be
added after the original pull request but before a merge.
* Use the Spring Framework code format conventions. If you use Eclipse
you can import formatter settings using the
`eclipse-code-formatter.xml` file from the
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
Cloud Build] project. If using IntelliJ, you can use the
https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
Plugin] to import the same file.
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
`@author` tag identifying you, and preferably at least a paragraph on what the class is
for.
* Add the ASF license header comment to all new `.java` files (copy from existing files
in the project)
* Add yourself as an `@author` to the .java files that you modify substantially (more
than cosmetic changes).
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
* A few unit tests would help a lot as well -- someone has to do it.
* If no-one else is using your branch, please rebase it against the current master (or
other target branch in the main project).
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
message (where XXXX is the issue number).
=== Checkstyle
Spring Cloud Build comes with a set of checkstyle rules. You can find them in the `spring-cloud-build-tools` module. The most notable files under the module are:
.spring-cloud-build-tools/
----
└── src
   ├── checkstyle
   │   └── checkstyle-suppressions.xml <3>
   └── main
   └── resources
   ├── checkstyle-header.txt <2>
   └── checkstyle.xml <1>
----
<1> Default Checkstyle rules
<2> File header setup
<3> Default suppression rules
==== Checkstyle configuration
Checkstyle rules are *disabled by default*. To add checkstyle to your project just define the following properties and plugins.
.pom.xml
----
<properties>
<maven-checkstyle-plugin.failsOnError>true</maven-checkstyle-plugin.failsOnError> <1>
<maven-checkstyle-plugin.failsOnViolation>true
</maven-checkstyle-plugin.failsOnViolation> <2>
<maven-checkstyle-plugin.includeTestSourceDirectory>true
</maven-checkstyle-plugin.includeTestSourceDirectory> <3>
</properties>
<build>
<plugins>
<plugin> <4>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
</plugin>
<plugin> <5>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
<reporting>
<plugins>
<plugin> <5>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</build>
----
<1> Fails the build upon Checkstyle errors
<2> Fails the build upon Checkstyle violations
<3> Checkstyle analyzes also the test sources
<4> Add the Spring Java Format plugin that will reformat your code to pass most of the Checkstyle formatting rules
<5> Add checkstyle plugin to your build and reporting phases
If you need to suppress some rules (e.g. line length needs to be longer), then it's enough for you to define a file under `${project.root}/src/checkstyle/checkstyle-suppressions.xml` with your suppressions. Example:
.projectRoot/src/checkstyle/checkstyle-suppresions.xml
----
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"https://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress files=".*ConfigServerApplication\.java" checks="HideUtilityClassConstructor"/>
<suppress files=".*ConfigClientWatch\.java" checks="LineLengthCheck"/>
</suppressions>
----
It's advisable to copy the `${spring-cloud-build.rootFolder}/.editorconfig` and `${spring-cloud-build.rootFolder}/.springformat` to your project. That way, some default formatting rules will be applied. You can do so by running this script:
```bash
$ curl https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/.editorconfig -o .editorconfig
$ touch .springformat
```
=== IDE setup
==== Intellij IDEA
In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin.
The following files can be found in the https://github.com/spring-cloud/spring-cloud-build/tree/master/spring-cloud-build-tools[Spring Cloud Build] project.
.spring-cloud-build-tools/
----
└── src
   ├── checkstyle
   │   └── checkstyle-suppressions.xml <3>
   └── main
   └── resources
   ├── checkstyle-header.txt <2>
   ├── checkstyle.xml <1>
   └── intellij
      ├── Intellij_Project_Defaults.xml <4>
      └── Intellij_Spring_Boot_Java_Conventions.xml <5>
----
<1> Default Checkstyle rules
<2> File header setup
<3> Default suppression rules
<4> Project defaults for Intellij that apply most of Checkstyle rules
<5> Project style conventions for Intellij that apply most of Checkstyle rules
.Code style
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-code-style.png[Code style]
Go to `File` -> `Settings` -> `Editor` -> `Code style`. There click on the icon next to the `Scheme` section. There, click on the `Import Scheme` value and pick the `Intellij IDEA code style XML` option. Import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Spring_Boot_Java_Conventions.xml` file.
.Inspection profiles
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-inspections.png[Code style]
Go to `File` -> `Settings` -> `Editor` -> `Inspections`. There click on the icon next to the `Profile` section. There, click on the `Import Profile` and import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Project_Defaults.xml` file.
.Checkstyle
To have Intellij work with Checkstyle, you have to install the `Checkstyle` plugin. It's advisable to also install the `Assertions2Assertj` to automatically convert the JUnit assertions
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-checkstyle.png[Checkstyle]
Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on the `+` icon in the `Configuration file` section. There, you'll have to define where the checkstyle rules should be picked from. In the image above, we've picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build's GitHub repository (e.g. for the `checkstyle.xml` : `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml`). We need to provide the following variables:
- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL.
- `checkstyle.suppressions.file` - default suppressions. Please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` URL.
- `checkstyle.additional.suppressions.file` - this variable corresponds to suppressions in your local project. E.g. you're working on `spring-cloud-contract`. Then point to the `project-root/src/checkstyle/checkstyle-suppressions.xml` folder. Example for `spring-cloud-contract` would be: `/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml`.
IMPORTANT: Remember to set the `Scan Scope` to `All sources` since we apply checkstyle rules for production and test sources.
+63 -22
View File
@@ -1,11 +1,11 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
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>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>1.3.6.RELEASE</version>
<version>2.2.2.RELEASE</version>
</parent>
<artifactId>spring-cloud-netflix-docs</artifactId>
<packaging>pom</packaging>
@@ -13,17 +13,57 @@
<description>Spring Cloud Docs</description>
<properties>
<docs.main>spring-cloud-netflix</docs.main>
<main.basedir>${basedir}/..</main.basedir>
<docs.whitelisted.branches>1.0.x,1.1.x,1.3.x,2.0.x</docs.whitelisted.branches>
<docs.whitelisted.branches>1.2.x,1.3.x,1.4.x</docs.whitelisted.branches>
<configprops.inclusionPattern>
.*.eureka.*|.*.hystrix.*|.*.ribbon.*|.*.sidecar.*|.*.turbine.*|.*.zuul.*|.*.archaius.*
</configprops.inclusionPattern>
</properties>
<build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-archaius</artifactId>
</dependency>
<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>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-turbine</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-turbine-stream</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
@@ -31,28 +71,29 @@
<id>docs</id>
<build>
<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>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<inherited>false</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>false</inherited>
</plugin>
</plugins>
</build>
+6 -2
View File
@@ -1,3 +1,5 @@
include::_attributes.adoc[]
image::https://circleci.com/gh/spring-cloud/spring-cloud-netflix/tree/master.svg?style=svg["CircleCI", link="https://circleci.com/gh/spring-cloud/spring-cloud-netflix/tree/master"]
image::https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/master/graph/badge.svg["Codecov", link="https://codecov.io/gh/spring-cloud/spring-cloud-netflix/branch/master"]
image::https://api.codacy.com/project/badge/Grade/a6885a06921e4f72a0df0b7aabd6d118["Codacy code quality", link="https://www.codacy.com/app/Spring-Cloud/spring-cloud-netflix?utm_source=github.com&utm_medium=referral&utm_content=spring-cloud/spring-cloud-netflix&utm_campaign=Badge_Grade"]
@@ -11,16 +13,18 @@ include::intro.adoc[]
* Service Discovery: an embedded Eureka server can be created with declarative Java configuration
* Circuit Breaker: Hystrix clients can be built with a simple annotation-driven method decorator
* Circuit Breaker: embedded Hystrix dashboard with declarative Java configuration
* Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
* Client Side Load Balancer: Ribbon
* External Configuration: a bridge from the Spring Environment to Archaius (enables native configuration of Netflix components using Spring Boot conventions)
* Router and Filter: automatic registration of Zuul filters, and a simple convention over configuration approach to reverse proxy creation
include::maintenance-mode.adoc[]
== Building
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/building-jdk8.adoc[]
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/building-lombok.adoc[]
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
+15
View File
@@ -0,0 +1,15 @@
: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
+27
View File
@@ -0,0 +1,27 @@
|===
|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 org.apache.http.client.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 |
|management.endpoint.hystrix.config | | Hystrix settings. These are traditionally set using servlet parameters. Refer to the documentation of Hystrix for more details.
|management.endpoint.hystrix.stream.enabled | true | Whether to enable the hystrix.stream endpoint.
|management.metrics.binders.hystrix.enabled | true | Enables creation of OK Http Client factory beans.
|ribbon.eureka.enabled | true | Enables the use of Eureka with Ribbon.
|spring.cloud.circuitbreaker.hystrix.enabled | true | Enables auto-configuration of the Hystrix Spring Cloud CircuitBreaker API implementation.
|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.ribbon.enabled | true | Causes `RibbonLoadBalancerClient` to be used by default.
|zuul.ribbon-isolation-strategy | |
|zuul.ribbon.eager-load.enabled | false | Enables eager loading of Ribbon clients on startup.
|===
+14
View File
@@ -0,0 +1,14 @@
:numbered!:
[appendix]
[[common-application-properties]]
== Common application properties
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.
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[]
+2 -2
View File
@@ -40,7 +40,7 @@ function check_if_anything_to_sync() {
function retrieve_current_branch() {
# Code getting the name of the current branch. For master we want to publish as we did until now
# http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
# https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
# If there is a branch already passed will reuse it - otherwise will try to find it
CURRENT_BRANCH=${BRANCH}
if [[ -z "${CURRENT_BRANCH}" ]] ; then
@@ -147,7 +147,7 @@ function copy_docs_for_current_version() {
COMMIT_CHANGES="yes"
else
echo -e "Current branch is [${CURRENT_BRANCH}]"
# http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin
# https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin
if [[ ",${WHITELISTED_BRANCHES_VALUE}," = *",${CURRENT_BRANCH},"* ]] ; then
mkdir -p ${ROOT_FOLDER}/${CURRENT_BRANCH}
echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder"
+1
View File
@@ -0,0 +1 @@
spring-cloud-netflix.adoc
+2
View File
@@ -1,3 +1,5 @@
include::_attributes.adoc[]
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
@@ -0,0 +1,24 @@
include::_attributes.adoc[]
== Modules In Maintenance Mode
Placing a module in maintenance mode means that the Spring Cloud team will no longer be adding new features to the module.
We will fix blocker bugs and security issues, and we will also consider and review small pull requests from the community.
We intend to continue to support these modules for a period of at least a year from the general availability
of the Greenwich release train.
The following Spring Cloud Netflix modules and corresponding starters will be placed into maintenance mode:
* spring-cloud-netflix-archaius
* spring-cloud-netflix-hystrix-contract
* spring-cloud-netflix-hystrix-dashboard
* spring-cloud-netflix-hystrix-stream
* spring-cloud-netflix-hystrix
* spring-cloud-netflix-ribbon
* spring-cloud-netflix-turbine-stream
* spring-cloud-netflix-turbine
* spring-cloud-netflix-zuul
NOTE: This does not include the Eureka or concurrency-limits modules.
+1
View File
@@ -0,0 +1 @@
include::_attributes.adoc[]
+43
View File
@@ -0,0 +1,43 @@
include::_attributes.adoc[]
Spring Cloud Netflix 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), Circuit Breaker (Hystrix), Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon)..
## Features
Spring Cloud Netflix 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
* Circuit Breaker: Hystrix clients can be built with a simple annotation-driven method decorator
* Circuit Breaker: embedded Hystrix dashboard with declarative Java configuration
* Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
* Client Side Load Balancer: Ribbon
* External Configuration: a bridge from the Spring Environment to Archaius (enables native configuration of Netflix components using Spring Boot conventions)
* Router and Filter: automatic registration of Zuul filters, and a simple convention over configuration approach to reverse proxy creation
## Getting Started
As long as Spring Cloud Netflix and Eureka Core are on the
classpath any Spring Boot application with `@EnableEurekaClient` will try to contact a Eureka
server on `http://localhost:8761` (the default value of
`eureka.client.serviceUrl.defaultZone`):
```java
@SpringBootApplication
@EnableEurekaClient
@RestController
public class Application {
@RequestMapping("/")
public String home() {
return "Hello World";
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
```
To run your own server use the `spring-cloud-starter-netflix-eureka-server` dependency and `@EnableEurekaServer`.
@@ -0,0 +1,70 @@
include::_attributes.adoc[]
=== Disabling Spring Cloud Circuit Breaker Hystrix
You can disable the auto-configuration by setting `spring.cloud.circuitbreaker.hystrix.enabled`
to `false`.
=== Configuring Hystrix Circuit Breakers
==== Default Configuration
To provide a default configuration for all of your circuit breakers create a `Customize` bean that is passed a
`HystrixCircuitBreakerFactory` or `ReactiveHystrixCircuitBreakerFactory`.
The `configureDefault` method can be used to provide a default configuration.
====
[source,java]
----
@Bean
public Customizer<HystrixCircuitBreakerFactory> defaultConfig() {
return factory -> factory.configureDefault(id -> HystrixCommand.Setter
.withGroupKey(HystrixCommandGroupKey.Factory.asKey(id))
.andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
.withExecutionTimeoutInMilliseconds(4000)));
}
----
====
===== Reactive Example
====
[source,java]
----
@Bean
public Customizer<ReactiveHystrixCircuitBreakerFactory> defaultConfig() {
return factory -> factory.configureDefault(id -> HystrixObservableCommand.Setter
.withGroupKey(HystrixCommandGroupKey.Factory.asKey(id))
.andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
.withExecutionTimeoutInMilliseconds(4000)));
}
----
====
==== Specific Circuit Breaker Configuration
Similarly to providing a default configuration, you can create a `Customize` bean this is passed a
`HystrixCircuitBreakerFactory`
====
[source,java]
----
@Bean
public Customizer<HystrixCircuitBreakerFactory> customizer() {
return factory -> factory.configure(builder -> builder.commandProperties(
HystrixCommandProperties.Setter().withExecutionTimeoutInMilliseconds(2000)), "foo", "bar");
}
----
====
===== Reactive Example
====
[source,java]
----
@Bean
public Customizer<ReactiveHystrixCircuitBreakerFactory> customizer() {
return factory -> factory.configure(builder -> builder.commandProperties(
HystrixCommandProperties.Setter().withExecutionTimeoutInMilliseconds(2000)), "foo", "bar");
}
----
====
+1019 -1286
View File
File diff suppressed because it is too large Load Diff
+313 -293
View File
@@ -1,295 +1,315 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Spring Cloud Java Conventions" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
<profiles version="13">
<profile kind="CodeFormatterProfile" name="Spring Cloud Java Conventions" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="9"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="9"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="9"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>
+33 -10
View File
@@ -10,9 +10,10 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -51,11 +52,11 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=default
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
@@ -102,7 +103,9 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -113,11 +116,14 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_e
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
@@ -127,6 +133,8 @@ org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
@@ -153,6 +161,7 @@ org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
@@ -184,7 +193,8 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=8
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
@@ -212,7 +222,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
@@ -379,11 +389,24 @@ org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_on_off_tags=true
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
File diff suppressed because one or more lines are too long
Vendored
+110 -57
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
#
# http://www.apache.org/licenses/LICENSE-2.0
# 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
@@ -54,38 +54,16 @@ case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
#
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
# for the new JDKs provided by Oracle.
#
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
fi
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
#
# Oracle JDKs
#
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi
if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
#
# Apple JDKs
#
export JAVA_HOME=`/usr/libexec/java_home`
fi
;;
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# 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`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
@@ -130,7 +108,7 @@ if $cygwin ; then
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Migwn, ensure paths are in UNIX format before anything is touched
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
@@ -184,27 +162,28 @@ fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# 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"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
local basedir=$(pwd)
local wdir=$(pwd)
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
wdir=$(cd "$wdir/.."; pwd)
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
@@ -216,13 +195,87 @@ concat_lines() {
fi
}
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
##########################################################################################
# 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
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
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 ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
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"
fi
wget "$jarUrl" -O "$wrapperJarPath"
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
curl -o "$wrapperJarPath" "$jarUrl"
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
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")
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")
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# 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
# 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"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
@@ -232,22 +285,22 @@ echo "The found version is [${VERSION}]"
if echo $VERSION | egrep -q 'M|RC'; then
echo Activating \"milestone\" profile for version=\"$VERSION\"
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone"
echo $MAVEN_CONFIG | grep -q milestone || MAVEN_CONFIG="$MAVEN_CONFIG -Pmilestone"
else
echo Deactivating \"milestone\" profile for version=\"$VERSION\"
echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//')
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_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pcentral"
echo $MAVEN_CONFIG | grep -q milestone || MAVEN_CONFIG="$MAVEN_CONFIG -Pcentral"
else
echo Deactivating \"central\" profile for version=\"$VERSION\"
echo $MAVEN_ARGS | grep -q central && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pcentral//')
echo $MAVEN_CONFIG | grep -q central && MAVEN_CONFIG=$(echo $MAVEN_CONFIG | sed -e 's/-Pcentral//')
fi
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@"
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
Vendored Regular → Executable
+161 -145
View File
@@ -1,145 +1,161 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@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 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
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@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_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
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
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"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
set MAVEN_CMD_LINE_ARGS=%*
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
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"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@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
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@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_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
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
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"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
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
)
@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%
) 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%
)
@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% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
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"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
+105 -43
View File
@@ -1,16 +1,16 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
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>1.3.6.RELEASE</version>
<version>2.2.2.RELEASE</version>
<packaging>pom</packaging>
<name>Spring Cloud Netflix</name>
<description>Spring Cloud Netflix</description>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>1.3.7.RELEASE</version>
<version>2.2.3.RELEASE</version>
<relativePath />
</parent>
<scm>
@@ -21,50 +21,70 @@
</scm>
<properties>
<bintray.package>netflix</bintray.package>
<main.basedir>${basedir}</main.basedir>
<netty.version>4.0.27.Final</netty.version>
<jackson.version>2.7.3</jackson.version>
<spring-cloud-commons.version>1.2.5.RELEASE</spring-cloud-commons.version>
<spring-cloud-config.version>1.3.4.RELEASE</spring-cloud-config.version>
<spring-cloud-stream.version>Chelsea.SR2</spring-cloud-stream.version>
<spring-cloud-commons.version>2.2.2.RELEASE</spring-cloud-commons.version>
<spring-cloud-config.version>2.2.2.RELEASE</spring-cloud-config.version>
<spring-cloud-stream.version>Horsham.SR3</spring-cloud-stream.version>
<!-- Has to be a stable version (not one that depends on this version of netflix): -->
<donotreplacespring-cloud-contract.version>2.2.1.RELEASE</donotreplacespring-cloud-contract.version>
<!-- Sonar -->
<surefire.plugin.version>2.19.1</surefire.plugin.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
<sonar.language>java</sonar.language>
<eureka-jersey.version>1.19.1</eureka-jersey.version>
<xstream.version>1.4.11.1</xstream.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>${maven-eclipse-plugin.version}</version>
<configuration>
<useProjectReferences>false</useProjectReferences>
<additionalConfig>
<file>
<name>.settings/org.eclipse.jdt.ui.prefs</name>
<location>${main.basedir}/eclipse/org.eclipse.jdt.ui.prefs</location>
<location>${maven.multiModuleProjectDirectory}/eclipse/org.eclipse.jdt.ui.prefs</location>
</file>
<file>
<name>.settings/org.eclipse.jdt.core.prefs</name>
<location>${main.basedir}/eclipse/org.eclipse.jdt.core.prefs</location>
<location>${maven.multiModuleProjectDirectory}/eclipse/org.eclipse.jdt.core.prefs</location>
</file>
</additionalConfig>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-hystrix-contract</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-dependencies</artifactId>
@@ -81,8 +101,7 @@
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
<type>test-jar</type>
<artifactId>spring-cloud-test-support</artifactId>
<scope>test</scope>
<version>${spring-cloud-commons.version}</version>
</dependency>
@@ -97,53 +116,96 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-dependencies</artifactId>
<version>${spring-cloud-stream.version}</version>
<type>pom</type>
<scope>import</scope>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>${netty.version}</version>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-dependencies</artifactId>
<version>${donotreplacespring-cloud-contract.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${netty.version}</version>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- archaius dependencies that are now runtime -->
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.8</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end archaius deps -->
<!-- Eureka core dep that is now optional -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>${eureka-jersey.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
<version>${jackson.version}</version>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>${eureka-jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${eureka-jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>${eureka-jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client4</artifactId>
<version>${eureka-jersey.version}</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>
<!-- end eureka deps -->
</dependencies>
</dependencyManagement>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<modules>
<module>spring-cloud-netflix-dependencies</module>
<module>spring-cloud-netflix-archaius</module>
<!-- Not part of the reactor build: build and deploy separately -->
<!--module>spring-cloud-netflix-hystrix-contract</module-->
<module>spring-cloud-netflix-core</module>
<module>spring-cloud-netflix-concurrency-limits</module>
<module>spring-cloud-netflix-hystrix-dashboard</module>
<module>spring-cloud-netflix-hystrix-amqp</module>
<module>spring-cloud-netflix-hystrix-stream</module>
<module>spring-cloud-netflix-eureka-client</module>
<module>spring-cloud-netflix-eureka-server</module>
<module>spring-cloud-netflix-spectator</module>
<module>spring-cloud-netflix-turbine</module>
<module>spring-cloud-netflix-turbine-stream</module>
<module>spring-cloud-netflix-sidecar</module>
<module>spring-cloud-starter-archaius</module>
<module>spring-cloud-starter-atlas</module>
<module>spring-cloud-starter-eureka</module>
<module>spring-cloud-starter-eureka-server</module>
<module>spring-cloud-starter-feign</module>
<module>spring-cloud-starter-hystrix</module>
<module>spring-cloud-starter-hystrix-dashboard</module>
<module>spring-cloud-starter-ribbon</module>
<module>spring-cloud-starter-spectator</module>
<module>spring-cloud-starter-turbine</module>
<module>spring-cloud-starter-turbine-amqp</module>
<module>spring-cloud-starter-turbine-stream</module>
<module>spring-cloud-starter-zuul</module>
<module>spring-cloud-netflix-zuul</module>
<module>spring-cloud-netflix-ribbon</module>
<module>spring-cloud-starter-netflix</module>
<module>spring-cloud-netflix-hystrix</module>
<module>docs</module>
</modules>
</modules>
<profiles>
<profile>
<id>spring</id>
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
(cd spring-cloud-netflix-hystrix-contract && ../mvnw clean install -B -Pdocs ${@})
./mvnw clean install -B -Pdocs ${@}
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
(cd spring-cloud-netflix-hystrix-contract && ../mvnw clean install -B -Pdocs -DskipTests)
./mvnw clean install -B -Pdocs -DskipTests -fae
+48
View File
@@ -0,0 +1,48 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>spring-cloud-netflix</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>2.2.2.RELEASE</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-netflix-archaius</artifactId>
<packaging>jar</packaging>
<name>Spring Cloud Netflix Archaius</name>
<description>Spring Cloud Netflix Archaius</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
@@ -1,11 +1,11 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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,
@@ -19,6 +19,7 @@ package org.springframework.cloud.netflix.archaius;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.PreDestroy;
@@ -30,24 +31,27 @@ import com.netflix.config.DeploymentContext;
import com.netflix.config.DynamicProperty;
import com.netflix.config.DynamicPropertyFactory;
import com.netflix.config.DynamicURLConfiguration;
import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.ConfigurationBuilder;
import org.apache.commons.configuration.EnvironmentConfiguration;
import org.apache.commons.configuration.SystemConfiguration;
import org.apache.commons.configuration.event.ConfigurationEvent;
import org.apache.commons.configuration.event.ConfigurationListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.condition.ConditionalOnEnabledEndpoint;
import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Environment;
@@ -60,18 +64,19 @@ import static com.netflix.config.ConfigurationManager.ENV_CONFIG_NAME;
import static com.netflix.config.ConfigurationManager.SYS_CONFIG_NAME;
import static com.netflix.config.ConfigurationManager.URL_CONFIG_NAME;
import lombok.extern.apachecommons.CommonsLog;
/**
* @author Spencer Gibb
* @author Liang Yong
*/
@Configuration
@Lazy(false)
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ ConcurrentCompositeConfiguration.class,
ConfigurationBuilder.class })
@CommonsLog
@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE)
public class ArchaiusAutoConfiguration {
private static final Log log = LogFactory.getLog(ArchaiusAutoConfiguration.class);
private static final AtomicBoolean initialized = new AtomicBoolean(false);
@Autowired
@@ -80,7 +85,7 @@ public class ArchaiusAutoConfiguration {
@Autowired(required = false)
private List<AbstractConfiguration> externalConfigurations = new ArrayList<>();
private DynamicURLConfiguration defaultURLConfig;
private static DynamicURLConfiguration defaultURLConfig;
@PreDestroy
public void close() {
@@ -96,52 +101,23 @@ public class ArchaiusAutoConfiguration {
}
@Bean
public ConfigurableEnvironmentConfiguration configurableEnvironmentConfiguration() {
public static ConfigurableEnvironmentConfiguration configurableEnvironmentConfiguration(
ConfigurableEnvironment env, ApplicationContext context) {
Map<String, AbstractConfiguration> abstractConfigurationMap = context
.getBeansOfType(AbstractConfiguration.class);
List<AbstractConfiguration> externalConfigurations = new ArrayList<>(
abstractConfigurationMap.values());
ConfigurableEnvironmentConfiguration envConfig = new ConfigurableEnvironmentConfiguration(
this.env);
configureArchaius(envConfig);
env);
configureArchaius(envConfig, env, externalConfigurations);
return envConfig;
}
@Configuration
@ConditionalOnClass(Endpoint.class)
@ConditionalOnEnabledEndpoint("archaius")
protected static class ArchaiusEndpointConfiguration {
@Bean
protected ArchaiusEndpoint archaiusEndpoint() {
return new ArchaiusEndpoint();
}
}
@Configuration
@ConditionalOnProperty(value = "archaius.propagate.environmentChangedEvent", matchIfMissing = true)
@ConditionalOnClass(EnvironmentChangeEvent.class)
protected static class PropagateEventsConfiguration
implements ApplicationListener<EnvironmentChangeEvent> {
@Autowired
private Environment env;
@Override
public void onApplicationEvent(EnvironmentChangeEvent event) {
AbstractConfiguration manager = ConfigurationManager.getConfigInstance();
for (String key : event.getKeys()) {
for (ConfigurationListener listener : manager
.getConfigurationListeners()) {
Object source = event.getSource();
// TODO: Handle add vs set vs delete?
int type = AbstractConfiguration.EVENT_SET_PROPERTY;
String value = this.env.getProperty(key);
boolean beforeUpdate = false;
listener.configurationChanged(new ConfigurationEvent(source, type,
key, value, beforeUpdate));
}
}
}
}
protected void configureArchaius(ConfigurableEnvironmentConfiguration envConfig) {
protected static void configureArchaius(
ConfigurableEnvironmentConfiguration envConfig, ConfigurableEnvironment env,
List<AbstractConfiguration> externalConfigurations) {
if (initialized.compareAndSet(false, true)) {
String appName = this.env.getProperty("spring.application.name");
String appName = env.getProperty("spring.application.name");
if (appName == null) {
appName = "application";
log.warn("No spring.application.name found, defaulting to 'application'");
@@ -152,8 +128,8 @@ public class ArchaiusAutoConfiguration {
// support to add other Configurations (Jdbc, DynamoDb, Zookeeper, jclouds,
// etc...)
if (this.externalConfigurations != null) {
for (AbstractConfiguration externalConfig : this.externalConfigurations) {
if (externalConfigurations != null) {
for (AbstractConfiguration externalConfig : externalConfigurations) {
config.addConfiguration(externalConfig);
}
}
@@ -192,7 +168,8 @@ public class ArchaiusAutoConfiguration {
}
}
private void addArchaiusConfiguration(ConcurrentCompositeConfiguration config) {
private static void addArchaiusConfiguration(
ConcurrentCompositeConfiguration config) {
if (ConfigurationManager.isConfigurationInstalled()) {
AbstractConfiguration installedConfiguration = ConfigurationManager
.getConfigInstance();
@@ -220,4 +197,45 @@ public class ArchaiusAutoConfiguration {
ReflectionUtils.setField(field, null, value);
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(Health.class)
protected static class ArchaiusEndpointConfiguration {
@Bean
@ConditionalOnAvailableEndpoint
protected ArchaiusEndpoint archaiusEndpoint() {
return new ArchaiusEndpoint();
}
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(value = "archaius.propagate.environmentChangedEvent",
matchIfMissing = true)
@ConditionalOnClass(EnvironmentChangeEvent.class)
protected static class PropagateEventsConfiguration
implements ApplicationListener<EnvironmentChangeEvent> {
@Autowired
private Environment env;
@Override
public void onApplicationEvent(EnvironmentChangeEvent event) {
AbstractConfiguration manager = ConfigurationManager.getConfigInstance();
for (String key : event.getKeys()) {
for (ConfigurationListener listener : manager
.getConfigurationListeners()) {
Object source = event.getSource();
// TODO: Handle add vs set vs delete?
int type = AbstractConfiguration.EVENT_SET_PROPERTY;
String value = this.env.getProperty(key);
boolean beforeUpdate = false;
listener.configurationChanged(new ConfigurationEvent(source, type,
key, value, beforeUpdate));
}
}
}
}
}
@@ -1,11 +1,11 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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,
@@ -16,24 +16,30 @@
package org.springframework.cloud.netflix.archaius;
import com.netflix.config.ConfigurationManager;
import org.apache.commons.configuration.AbstractConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import com.netflix.config.ConfigurationManager;
/**
* @author Dave Syer
*/
public class ArchaiusDelegatingProxyUtils {
public final class ArchaiusDelegatingProxyUtils {
private ArchaiusDelegatingProxyUtils() {
}
/**
* {@code ApplicationContext} class name.
*/
public static String APPLICATION_CONTEXT = ApplicationContext.class.getName();
public static <T> T getNamedInstance(Class<T> type, String name) {
ApplicationContext context = (ApplicationContext) ConfigurationManager
.getConfigInstance().getProperty(APPLICATION_CONTEXT);
return context != null && context.containsBean(name) ? context
.getBean(name, type) : null;
return context != null && context.containsBean(name) ? context.getBean(name, type)
: null;
}
public static <T> T getInstanceWithPrefix(Class<T> type, String prefix) {
@@ -1,11 +1,11 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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,
@@ -20,27 +20,27 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import com.netflix.config.ConcurrentCompositeConfiguration;
import com.netflix.config.ConfigurationManager;
import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.EnvironmentConfiguration;
import org.apache.commons.configuration.SystemConfiguration;
import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
import com.netflix.config.ConcurrentCompositeConfiguration;
import com.netflix.config.ConfigurationManager;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
/**
* An actuator endpoint that returns Archaius configuration.
*
* @author Dave Syer
*/
public class ArchaiusEndpoint extends AbstractEndpoint<Map<String, Object>> {
@Endpoint(id = "archaius")
public class ArchaiusEndpoint {
public ArchaiusEndpoint() {
super("archaius");
}
@Override
@ReadOperation
public Map<String, Object> invoke() {
Map<String, Object> map = new LinkedHashMap<String, Object>();
Map<String, Object> map = new LinkedHashMap<>();
AbstractConfiguration config = ConfigurationManager.getConfigInstance();
if (config instanceof ConcurrentCompositeConfiguration) {
ConcurrentCompositeConfiguration composite = (ConcurrentCompositeConfiguration) config;
@@ -1,11 +1,11 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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,
@@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.configuration.AbstractConfiguration;
import org.springframework.core.env.CompositePropertySource;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.EnumerablePropertySource;
@@ -31,6 +32,8 @@ import org.springframework.core.env.PropertySource;
import org.springframework.core.env.StandardEnvironment;
/**
* EnvironmentConfiguration wrapper class providing further configuration possibilities.
*
* @author Spencer Gibb
*/
public class ConfigurableEnvironmentConfiguration extends AbstractConfiguration {
@@ -64,7 +67,8 @@ public class ConfigurableEnvironmentConfiguration extends AbstractConfiguration
@Override
public Iterator<String> getKeys() {
List<String> result = new ArrayList<>();
for (Map.Entry<String, PropertySource<?>> entry : getPropertySources().entrySet()) {
for (Map.Entry<String, PropertySource<?>> entry : getPropertySources()
.entrySet()) {
PropertySource<?> source = entry.getValue();
if (source instanceof EnumerablePropertySource) {
EnumerablePropertySource<?> enumerable = (EnumerablePropertySource<?>) source;
@@ -78,8 +82,9 @@ public class ConfigurableEnvironmentConfiguration extends AbstractConfiguration
private Map<String, PropertySource<?>> getPropertySources() {
Map<String, PropertySource<?>> map = new LinkedHashMap<>();
MutablePropertySources sources = (this.environment != null ? this.environment
.getPropertySources() : new StandardEnvironment().getPropertySources());
MutablePropertySources sources = (this.environment != null
? this.environment.getPropertySources()
: new StandardEnvironment().getPropertySources());
for (PropertySource<?> source : sources) {
extract("", map, source);
}
@@ -0,0 +1,10 @@
{
"properties": [
{
"defaultValue": "true",
"name": "archaius.propagate.environmentChangedEvent",
"description": "Propagates EnvironmentChanged events to Archaius ConfigurationManager.",
"type": "java.lang.Boolean"
}
]
}
@@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.netflix.archaius.ArchaiusAutoConfiguration
@@ -1,11 +1,11 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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,
@@ -18,22 +18,18 @@ package org.springframework.cloud.netflix.archaius;
import java.util.Collections;
import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.event.ConfigurationEvent;
import org.apache.commons.configuration.event.ConfigurationListener;
import org.junit.After;
import org.junit.Test;
import com.netflix.config.ConfigurationManager;
import com.netflix.config.DynamicPropertyFactory;
import com.netflix.config.DynamicStringProperty;
import org.apache.commons.configuration.AbstractConfiguration;
import org.junit.After;
import org.junit.Test;
import org.springframework.boot.test.util.EnvironmentTestUtils;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Dave Syer
@@ -41,6 +37,7 @@ import static org.junit.Assert.assertNull;
public class ArchaiusAutoConfigurationTests {
private AnnotationConfigApplicationContext context;
private Object propertyValue;
@After
@@ -56,27 +53,23 @@ public class ArchaiusAutoConfigurationTests {
ArchaiusAutoConfiguration.class);
AbstractConfiguration config = this.context
.getBean(ConfigurableEnvironmentConfiguration.class);
assertNotNull(config.getString("java.io.tmpdir"));
assertThat(config.getString("java.io.tmpdir")).isNotNull();
}
@Test
public void environmentChangeEventPropagated() {
this.context = new AnnotationConfigApplicationContext(
ArchaiusAutoConfiguration.class);
ConfigurationManager.getConfigInstance().addConfigurationListener(
new ConfigurationListener() {
@Override
public void configurationChanged(ConfigurationEvent event) {
if (event.getPropertyName().equals("my.prop")) {
ArchaiusAutoConfigurationTests.this.propertyValue = event
.getPropertyValue();
}
}
});
EnvironmentTestUtils.addEnvironment(this.context, "my.prop=my.newval");
this.context.publishEvent(new EnvironmentChangeEvent(Collections
.singleton("my.prop")));
assertEquals("my.newval", this.propertyValue);
ConfigurationManager.getConfigInstance().addConfigurationListener(event -> {
if (event.getPropertyName().equals("my.prop")) {
ArchaiusAutoConfigurationTests.this.propertyValue = event
.getPropertyValue();
}
});
TestPropertyValues.of("my.prop=my.newval").applyTo(this.context);
this.context.publishEvent(
new EnvironmentChangeEvent(Collections.singleton("my.prop")));
assertThat(this.propertyValue).isEqualTo("my.newval");
}
@Test
@@ -88,9 +81,9 @@ public class ArchaiusAutoConfigurationTests {
DynamicStringProperty staticProperty = DynamicPropertyFactory.getInstance()
.getStringProperty("archaius.file.property", null);
assertNull(dbProperty.getValue());
assertNotNull(staticProperty.getValue());
assertEquals("Static config file property", staticProperty.getValue());
assertThat(dbProperty.getValue()).isNull();
assertThat(staticProperty.getValue()).isNotNull();
assertThat(staticProperty.getValue()).isEqualTo("Static config file property");
}
@Test
@@ -104,12 +97,12 @@ public class ArchaiusAutoConfigurationTests {
DynamicStringProperty staticProperty = DynamicPropertyFactory.getInstance()
.getStringProperty("archaius.file.property", null);
assertNotNull(dbProperty.getValue());
assertNotNull(secondDbProperty.getValue());
assertNotNull(staticProperty.getValue());
assertEquals("this is a db property", dbProperty.getValue());
assertEquals("this is another db property", secondDbProperty.getValue());
assertEquals("Static config file property", staticProperty.getValue());
assertThat(dbProperty.getValue()).isNotNull();
assertThat(secondDbProperty.getValue()).isNotNull();
assertThat(staticProperty.getValue()).isNotNull();
assertThat(dbProperty.getValue()).isEqualTo("this is a db property");
assertThat(secondDbProperty.getValue()).isEqualTo("this is another db property");
assertThat(staticProperty.getValue()).isEqualTo("Static config file property");
}
}
@@ -1,11 +1,11 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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,
@@ -18,14 +18,13 @@ package org.springframework.cloud.netflix.archaius;
import java.util.Map;
import org.junit.Test;
import org.springframework.core.env.StandardEnvironment;
import com.netflix.config.ConcurrentCompositeConfiguration;
import com.netflix.config.ConfigurationManager;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.springframework.core.env.StandardEnvironment;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Dave Syer
@@ -37,7 +36,7 @@ public class ArchaiusEndpointTests {
@Test
public void detectsPropertiesWhenSet() {
ConfigurationManager.getConfigInstance().setProperty("foo", "bar");
assertTrue(this.endpoint.invoke().containsKey("foo"));
assertThat(this.endpoint.invoke().containsKey("foo")).isTrue();
}
@Test
@@ -46,12 +45,12 @@ public class ArchaiusEndpointTests {
ConfigurationManager.getConfigInstance());
ConfigurableEnvironmentConfiguration config = new ConfigurableEnvironmentConfiguration(
new StandardEnvironment());
assertTrue(config.containsKey("user.dir"));
assertThat(config.containsKey("user.dir")).isTrue();
composite.addConfiguration(config);
ConfigurationManager.getConfigInstance().setProperty("foo", "bar");
Map<String, Object> map = this.endpoint.invoke();
assertTrue(map.containsKey("foo"));
assertFalse(map.containsKey("user.dir"));
assertThat(map.containsKey("foo")).isTrue();
assertThat(map.containsKey("user.dir")).isFalse();
}
}
@@ -0,0 +1,50 @@
/*
* Copyright 2013-2019 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.archaius;
import com.netflix.config.DynamicProperty;
import org.junit.jupiter.api.Test;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Liang Yong
*/
@SpringBootTest(classes = LazyLoadConfigurationTests.TestConfig.class,
properties = { "client.ribbon.listOfServers=foo.com,bar.com",
"spring.main.lazy-initialization=true" })
public class LazyLoadConfigurationTests {
@Test
public void enableLazyInitialization() {
DynamicProperty instance = DynamicProperty
.getInstance("client.ribbon.listOfServers");
assertThat(instance.getString()).isEqualTo("foo.com,bar.com");
}
@SpringBootConfiguration
@EnableAutoConfiguration
static class TestConfig {
}
}
@@ -1,11 +1,11 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2019 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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,
@@ -16,25 +16,25 @@
package org.springframework.cloud.netflix.archaius;
import com.netflix.config.ConcurrentMapConfiguration;
import org.apache.commons.configuration.AbstractConfiguration;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.netflix.config.ConcurrentMapConfiguration;
/**
* @author Alexandru-George Burghelea
*/
@Configuration
@Configuration(proxyBeanMethods = false)
public class TestArchaiusExternalConfiguration {
@Bean
@Qualifier("dynamicConfiguration")
public AbstractConfiguration createDynamicConfiguration() {
ConcurrentMapConfiguration config = new ConcurrentMapConfiguration();
config.addProperty("db.property","this is a db property");
config.addProperty("db.second.property","this is another db property");
config.addProperty("db.property", "this is a db property");
config.addProperty("db.second.property", "this is another db property");
return config;
}
@@ -0,0 +1,70 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-netflix-concurrency-limits</artifactId>
<packaging>jar</packaging>
<name>Spring Cloud Netflix Concurrency Limits</name>
<url>https://projects.spring.io/spring-cloud/</url>
<dependencies>
<dependency>
<groupId>com.netflix.concurrency-limits</groupId>
<artifactId>concurrency-limits-core</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.concurrency-limits</groupId>
<artifactId>concurrency-limits-servlet</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
<optional>true</optional>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-test-support</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,53 @@
/*
* Copyright 2013-2019 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.concurrency.limits.micrometer;
import java.util.function.Supplier;
import com.netflix.concurrency.limits.MetricRegistry;
import io.micrometer.core.instrument.DistributionSummary;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Tags;
/**
* A Micrometer-specific {@link MetricRegistry} implementation.
*
* @author Spencer Gibb
*/
public class MicrometerMetricRegistry implements MetricRegistry {
private final MeterRegistry meterRegistry;
// TODO: baseId?
public MicrometerMetricRegistry(MeterRegistry meterRegistry) {
this.meterRegistry = meterRegistry;
}
@Override
public SampleListener registerDistribution(String id, String... tagNameValuePairs) {
DistributionSummary summary = this.meterRegistry.summary(id, tagNameValuePairs);
return value -> summary.record(value.longValue());
}
@Override
public void registerGauge(String id, Supplier<Number> supplier,
String... tagNameValuePairs) {
this.meterRegistry.gauge(id, Tags.of(tagNameValuePairs), supplier.get());
}
}
@@ -0,0 +1,54 @@
/*
* Copyright 2013-2019 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.concurrency.limits.reactive;
import com.netflix.concurrency.limits.Limiter;
import reactor.core.publisher.Mono;
import org.springframework.http.HttpStatus;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
/**
* A {@link WebFilter} implementation providing the possibility to use Netflix
* {@link Limiter} to handle requests.
*
* @author Spencer Gibb
*/
public class ConcurrencyLimitsWebFilter implements WebFilter {
private final Limiter<ServerWebExchange> limiter;
public ConcurrencyLimitsWebFilter(Limiter<ServerWebExchange> limiter) {
this.limiter = limiter;
}
@Override
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
return limiter.acquire(exchange)
.map(listener -> chain.filter(exchange)
.doOnSuccess(v -> listener.onSuccess())
.doOnError(throwable -> listener.onIgnore()))
.orElseGet(() -> {
exchange.getResponse().setStatusCode(HttpStatus.TOO_MANY_REQUESTS);
// TODO: set body
return exchange.getResponse().setComplete();
});
}
}
@@ -0,0 +1,67 @@
/*
* Copyright 2013-2019 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.concurrency.limits.reactive;
import java.util.function.Consumer;
import com.netflix.concurrency.limits.Limiter;
import reactor.core.publisher.Mono;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
/**
* Reactive autoconfiguration class for registering Netflix {@link Limiter} bean.
*
* @author Spencer Gibb
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnClass({ WebFilter.class, Mono.class })
public class ReactiveConcurrencyLimitsAutoConfiguration {
private final ObjectProvider<Consumer<ServerWebExchangeLimiterBuilder>> configurerProvider;
public ReactiveConcurrencyLimitsAutoConfiguration(
ObjectProvider<Consumer<ServerWebExchangeLimiterBuilder>> configurerProvider) {
this.configurerProvider = configurerProvider;
}
@Bean
@ConditionalOnMissingBean
public Limiter<ServerWebExchange> webfluxLimiter() {
ServerWebExchangeLimiterBuilder builder = new ServerWebExchangeLimiterBuilder();
this.configurerProvider.ifAvailable(consumer -> consumer.accept(builder));
return builder.build();
}
@Bean
public ConcurrencyLimitsWebFilter concurrencyLimitsWebFilter(
Limiter<ServerWebExchange> limiter) {
return new ConcurrencyLimitsWebFilter(limiter);
}
}
@@ -0,0 +1,100 @@
/*
* Copyright 2013-2019 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.concurrency.limits.reactive;
import java.util.Optional;
import java.util.function.Function;
import com.netflix.concurrency.limits.limiter.AbstractPartitionedLimiter;
import org.springframework.web.server.ServerWebExchange;
/**
* Builder for ServerWebExchange Limiter.
*
* @author Spencer Gibb
*/
public class ServerWebExchangeLimiterBuilder extends
AbstractPartitionedLimiter.Builder<ServerWebExchangeLimiterBuilder, ServerWebExchange> {
/**
* Partition the limit by header.
* @param name header name
* @return Chainable builder
*/
public ServerWebExchangeLimiterBuilder partitionByHeader(String name) {
return partitionResolver(
exchange -> exchange.getRequest().getHeaders().getFirst(name));
}
/**
* Partition the limit by {@link Principal}. Percentages of the limit are partitioned
* to named groups. Group membership is derived from the provided mapping function.
* @param principalToGroup Mapping function from {@link Principal} to a named group.
* @param configurer Configuration function though which group percentages may be
* specified Unspecified group values may only use excess capacity.
* @return Chainable builder
*/
/*
* public ServerWebExchangeLimiterBuilder partitionByUserPrincipal(Function<Principal,
* String> principalToGroup,
* Consumer<LookupPartitionStrategy.Builder<ServerWebExchange>> configurer) { return
* partitionResolver( exchange ->
* Optional.ofNullable(request.getUserPrincipal()).map(principalToGroup).orElse(null),
* configurer); }
*/
/**
* Partition the limit by request attribute.
* @param name attribute name
* @return Chainable builder
*/
public ServerWebExchangeLimiterBuilder partitionByAttribute(String name) {
return partitionResolver(exchange -> exchange.getAttribute(name));
}
/**
* Partition the limit by request parameter.
* @param name parameter name
* @return Chainable builder
*/
public ServerWebExchangeLimiterBuilder partitionByParameter(String name) {
return partitionResolver(
exchange -> exchange.getRequest().getQueryParams().getFirst(name));
}
/**
* Partition the limit by the full path. Percentages of the limit are partitioned to
* named groups. Group membership is derived from the provided mapping function.
* @param pathToGroup Mapping function from full path to a named group.
* @return Chainable builder
*/
public ServerWebExchangeLimiterBuilder partitionByPathInfo(
Function<String, String> pathToGroup) {
return partitionResolver(exchange -> {
// TODO: pathWithinApplication?
String path = exchange.getRequest().getPath().contextPath().value();
return Optional.ofNullable(path).map(pathToGroup).orElse(null);
});
}
@Override
protected ServerWebExchangeLimiterBuilder self() {
return this;
}
}
@@ -0,0 +1,91 @@
/*
* Copyright 2013-2019 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.concurrency.limits.web;
import java.io.IOException;
import java.util.Optional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.netflix.concurrency.limits.Limiter;
import com.netflix.concurrency.limits.Limiter.Listener;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
/**
* A {@link HandlerInterceptor} implementation providing the possibility to use Netflix
* {@link Limiter} to handle requests.
*
* @author Spencer Gibb
*/
public class ConcurrencyLimitsHandlerInterceptor implements HandlerInterceptor {
private final Limiter<HttpServletRequest> limiter;
public ConcurrencyLimitsHandlerInterceptor(Limiter<HttpServletRequest> limiter) {
this.limiter = limiter;
}
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
Object handler) throws Exception {
Optional<Listener> listener = limiter.acquire(request);
if (listener.isPresent()) {
request.setAttribute("concurrency_limiter_listener", listener.get());
return true;
}
try {
// TODO: headers with information?
/*
* response.sendError(HttpStatus.TOO_MANY_REQUESTS.value());
* response.getWriter().print("Concurrency limit exceeded");
*/
response.sendError(HttpStatus.TOO_MANY_REQUESTS.value(),
"Concurrency limit exceeded");
}
catch (IOException e) {
// ignore
}
return false;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response,
Object handler, ModelAndView modelAndView) throws Exception {
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response,
Object handler, Exception ex) throws Exception {
Listener listener = (Listener) request
.getAttribute("concurrency_limiter_listener");
if (listener != null) {
if (ex != null) {
listener.onIgnore();
}
else {
listener.onSuccess();
}
}
}
}
@@ -0,0 +1,78 @@
/*
* Copyright 2013-2019 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.concurrency.limits.web;
import java.util.function.Consumer;
import javax.servlet.http.HttpServletRequest;
import com.netflix.concurrency.limits.Limiter;
import com.netflix.concurrency.limits.servlet.ServletLimiterBuilder;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* MVC autoconfiguration class for registering Netflix {@link Limiter} bean.
*
* @author Spencer Gibb
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass({ HttpServletRequest.class, HandlerInterceptor.class })
public class MvcConcurrencyLimitsAutoConfiguration implements WebMvcConfigurer {
private final ObjectProvider<Consumer<ServletLimiterBuilder>> configurerProvider;
public MvcConcurrencyLimitsAutoConfiguration(
ObjectProvider<Consumer<ServletLimiterBuilder>> configurerProvider) {
this.configurerProvider = configurerProvider;
}
@Bean
@ConditionalOnMissingBean
public Limiter<HttpServletRequest> servletLimiter() {
ServletLimiterBuilder builder = new ServletLimiterBuilder();
this.configurerProvider.ifAvailable(consumer -> consumer.accept(builder));
return builder.build();
}
@Configuration(proxyBeanMethods = false)
protected static class HandlerInterceptorConfiguration implements WebMvcConfigurer {
@Autowired
private Limiter<HttpServletRequest> limiter;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new ConcurrencyLimitsHandlerInterceptor(limiter));
}
}
}
@@ -0,0 +1,3 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.cloud.netflix.concurrency.limits.reactive.ReactiveConcurrencyLimitsAutoConfiguration,\
org.springframework.cloud.netflix.concurrency.limits.web.MvcConcurrencyLimitsAutoConfiguration
@@ -0,0 +1,56 @@
/*
* Copyright 2013-2019 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.concurrency.limits.micrometer;
import io.micrometer.core.instrument.Gauge;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.junit.Ignore;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class MicrometerMetricRegistryTests {
@Test
public void testGuage() {
MeterRegistry registry = new SimpleMeterRegistry();
MicrometerMetricRegistry metricRegistry = new MicrometerMetricRegistry(registry);
metricRegistry.registerGauge("bar", () -> 10);
Gauge bar = registry.get("bar").gauge();
assertThat(bar.value()).isEqualTo(10.0);
}
@Test
@Ignore // FIXME: micrometer doesn't allow recreating a gauge
public void testUnregister() {
MeterRegistry registry = new SimpleMeterRegistry();
MicrometerMetricRegistry metricRegistry = new MicrometerMetricRegistry(registry);
metricRegistry.registerGauge("bar", () -> 10);
metricRegistry.registerGauge("bar", () -> 20);
Gauge bar = registry.get("bar").gauge();
assertThat(bar.value()).isEqualTo(20.0);
}
}
@@ -0,0 +1,75 @@
/*
* Copyright 2013-2019 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.concurrency.limits.reactive;
import java.util.function.Consumer;
import com.netflix.concurrency.limits.limit.FixedLimit;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.concurrency.limits.test.AbstractConcurrencyLimitsTests;
import org.springframework.cloud.test.ClassPathExclusions;
import org.springframework.cloud.test.ModifiedClassPathRunner;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.util.SocketUtils;
import org.springframework.web.reactive.function.client.WebClient;
@RunWith(ModifiedClassPathRunner.class)
@ClassPathExclusions({ "spring-boot-starter-tomcat-*", "tomcat-embed-*" })
public class ConcurrencyLimitsWebFilterTests extends AbstractConcurrencyLimitsTests {
private int port;
@Before
public void init() {
port = SocketUtils.findAvailableTcpPort();
client = WebClient.create("http://localhost:" + port);
}
@Test
@SuppressWarnings("Duplicates")
public void webFilterWorks() {
try (ConfigurableApplicationContext context = new SpringApplicationBuilder()
.properties("server.port=" + port,
"spring.main.web-application-type=reactive")
.sources(TestConfig.class).run()) {
assertLimiter(client);
}
}
@SpringBootConfiguration
@EnableAutoConfiguration
@Import(HelloControllerConfiguration.class)
protected static class TestConfig {
@Bean
public Consumer<ServerWebExchangeLimiterBuilder> limiterBuilderConfigurer() {
return limiterBuilder -> limiterBuilder.limit(FixedLimit.of(1));
}
}
}
@@ -0,0 +1,80 @@
/*
* Copyright 2013-2019 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.concurrency.limits.test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
import reactor.util.function.Tuple2;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;
import static org.assertj.core.api.Assertions.assertThat;
public class AbstractConcurrencyLimitsTests {
protected WebClient client;
protected void assertLimiter(WebClient client) {
// TODO: assert the body
Flux<Tuple2<String, HttpStatus>> flux = Flux.range(1, 100)
.flatMap(integer -> client.get().uri("/").exchange(), 4)
// .log("reqs", Level.INFO)
.flatMap(response -> response.bodyToMono(String.class).defaultIfEmpty("")
/* .log("body2mono", Level.INFO) */
.zipWith(Mono.just(response.statusCode())));
Responses responses = new Responses();
StepVerifier.create(flux).thenConsumeWhile(response -> true, response -> {
HttpStatus status = response.getT2();
if (status.equals(HttpStatus.OK)) {
responses.success.incrementAndGet();
}
else if (status.equals(HttpStatus.TOO_MANY_REQUESTS)) {
responses.tooManyReqs.incrementAndGet();
String body = response.getT1();
// TODO: body from handler isn't coming thru
// assertThat(body).isEqualTo("Concurrency limit exceeded");
}
else {
responses.other.incrementAndGet();
}
}).verifyComplete();
System.out.println("Responses: " + responses);
assertThat(responses.other).hasValue(0);
assertThat(responses.tooManyReqs).hasValueGreaterThanOrEqualTo(1);
}
@Configuration(proxyBeanMethods = false)
@RestController
protected static class HelloControllerConfiguration {
@GetMapping
public String get() {
return "Hello";
}
}
}
@@ -0,0 +1,37 @@
/*
* Copyright 2013-2019 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.concurrency.limits.test;
import java.util.concurrent.atomic.AtomicInteger;
import org.springframework.core.style.ToStringCreator;
public class Responses {
public AtomicInteger success = new AtomicInteger(0);
public AtomicInteger tooManyReqs = new AtomicInteger(0);
public AtomicInteger other = new AtomicInteger(0);
@Override
public String toString() {
return new ToStringCreator(this).append("success", success)
.append("tooManyReqs", tooManyReqs).append("other", other).toString();
}
}
@@ -0,0 +1,70 @@
/*
* Copyright 2013-2019 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.concurrency.limits.web;
import java.util.function.Consumer;
import com.netflix.concurrency.limits.limit.FixedLimit;
import com.netflix.concurrency.limits.servlet.ServletLimiterBuilder;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.cloud.netflix.concurrency.limits.test.AbstractConcurrencyLimitsTests;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.reactive.function.client.WebClient;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
@RunWith(SpringRunner.class)
@SpringBootTest(properties = "logging.level.reactor.netty=DEBUG",
webEnvironment = RANDOM_PORT)
public class ConcurrencyLimitsHandlerInterceptorTests
extends AbstractConcurrencyLimitsTests {
@LocalServerPort
public int port;
@Before
public void init() {
client = WebClient.create("http://localhost:" + port);
}
@Test
public void handlerInterceptorWorks() {
assertLimiter(client);
}
@SpringBootConfiguration
@EnableAutoConfiguration
@Import(HelloControllerConfiguration.class)
protected static class TestConfig {
@Bean
public Consumer<ServletLimiterBuilder> limiterBuilderConfigurer() {
return servletLimiterBuilder -> servletLimiterBuilder.limit(FixedLimit.of(1));
}
}
}
+6 -193
View File
@@ -1,212 +1,25 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
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>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>1.3.6.RELEASE</version>
<version>2.2.2.RELEASE</version>
<relativePath>..</relativePath> <!-- lookup parent from repository -->
</parent>
<artifactId>spring-cloud-netflix-core</artifactId>
<packaging>jar</packaging>
<name>Spring Cloud Netflix Core</name>
<description>Spring Cloud Netflix Core</description>
<properties>
<main.basedir>${basedir}/..</main.basedir>
</properties>
<name>Spring Cloud Netflix Core - Deprecated</name>
<description>Deprecated Spring Cloud Netflix Core - will be removed. Please use spring-cloud-netflix-hystrix instead.</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
<optional>true</optional>
</dependency>
<!-- archaius dependencies that are now runtime -->
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<optional>true</optional>
</dependency>
<!-- end archaius deps -->
<dependency>
<groupId>com.netflix.servo</groupId>
<artifactId>servo-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.netflix-commons</groupId>
<artifactId>netflix-commons-util</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon-loadbalancer</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-slf4j</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-hystrix</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-metrics-event-stream</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon-httpclient</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.zuul</groupId>
<artifactId>zuul-core</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>groovy-all</artifactId>
<groupId>org.codehaus.groovy</groupId>
</exclusion>
<exclusion>
<artifactId>mockito-all</artifactId>
<groupId>org.mockito</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.reactivex</groupId>
<artifactId>rxjava</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client4</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<!-- Only needed at compile time -->
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
@@ -0,0 +1,42 @@
/*
* Copyright 2018-2019 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.core;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.annotation.Configuration;
/**
* @author Olga Maciaszek-Sharma
* @since 2.1.0
* @deprecated Module spring-cloud-netflix-core is deprecated as of 2.1.0, use
* spring-cloud-netflix-hystrix instead.
*/
@Configuration(proxyBeanMethods = false)
@Deprecated
public class CoreAutoConfiguration {
private static final Log LOG = LogFactory.getLog(CoreAutoConfiguration.class);
public CoreAutoConfiguration() {
LOG.warn(
"This module is deprecated. It will be removed in the next major release. "
+ "Please use spring-cloud-netflix-hystrix instead.");
}
}
@@ -1,102 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.endpoint;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.ServletContextAware;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.ServletWrappingController;
public abstract class ServletWrappingEndpoint implements InitializingBean,
ApplicationContextAware, ServletContextAware, MvcEndpoint {
// TODO: move to spring-boot?
private String path;
private boolean sensitive;
private boolean enabled = true;
private final ServletWrappingController controller = new ServletWrappingController();
@Override
public void afterPropertiesSet() throws Exception {
this.controller.afterPropertiesSet();
}
@Override
public void setServletContext(ServletContext servletContext) {
this.controller.setServletContext(servletContext);
}
@Override
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException {
this.controller.setApplicationContext(applicationContext);
}
protected ServletWrappingEndpoint(Class<? extends Servlet> servletClass,
String servletName, String path, boolean sensitive, boolean enabled) {
this.controller.setServletClass(servletClass);
this.controller.setServletName(servletName);
this.path = path;
this.sensitive = sensitive;
this.enabled = enabled;
}
@RequestMapping("**")
public ModelAndView handle(HttpServletRequest request, HttpServletResponse response)
throws Exception {
return this.controller.handleRequest(request, response);
}
public boolean isEnabled() {
return this.enabled;
}
public ServletWrappingController getController() {
return this.controller;
}
@Override
public String getPath() {
return this.path;
}
@Override
public boolean isSensitive() {
return this.sensitive;
}
@Override
public Class<? extends Endpoint<?>> getEndpointType() {
return null;
}
}
@@ -1,87 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Collection;
import feign.MethodMetadata;
/**
* Feign contract method parameter processor.
*
* @author Jakub Narloch
* @author Abhijit Sarkar
*/
public interface AnnotatedParameterProcessor {
/**
* Retrieves the processor supported annotation type.
*
* @return the annotation type
*/
Class<? extends Annotation> getAnnotationType();
/**
* Process the annotated parameter.
*
* @param context the parameter context
* @param annotation the annotation instance
* @param method the method that contains the annotation
* @return whether the parameter is http
*/
boolean processArgument(AnnotatedParameterContext context, Annotation annotation, Method method);
/**
* Specifies the parameter context.
*
* @author Jakub Narloch
*/
interface AnnotatedParameterContext {
/**
* Retrieves the method metadata.
*
* @return the method metadata
*/
MethodMetadata getMethodMetadata();
/**
* Retrieves the index of the parameter.
*
* @return the parameter index
*/
int getParameterIndex();
/**
* Sets the parameter name.
*
* @param name the name of the parameter
*/
void setParameterName(String name);
/**
* Sets the template parameter.
*
* @param name the template parameter
* @param rest the existing parameter values
* @return parameters
*/
Collection<String> setTemplateParameter(String name, Collection<String> rest);
}
}
@@ -1,38 +0,0 @@
/*
* Copyright 2016 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import feign.Logger;
import feign.slf4j.Slf4jLogger;
/**
* @author Venil Noronha
*/
public class DefaultFeignLoggerFactory implements FeignLoggerFactory {
private Logger logger;
public DefaultFeignLoggerFactory(Logger logger) {
this.logger = logger;
}
@Override
public Logger create(Class<?> type) {
return this.logger != null ? this.logger : new Slf4jLogger(type);
}
}
@@ -1,88 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.context.annotation.Import;
/**
* Scans for interfaces that declare they are feign clients (via {@link FeignClient
* <code>@FeignClient</code>}). Configures component scanning directives for use with
* {@link org.springframework.context.annotation.Configuration
* <code>@Configuration</code>} classes.
*
* @author Spencer Gibb
* @author Dave Syer
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import(FeignClientsRegistrar.class)
public @interface EnableFeignClients {
/**
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation
* declarations e.g.: {@code @ComponentScan("org.my.pkg")} instead of
* {@code @ComponentScan(basePackages="org.my.pkg")}.
* @return the array of 'basePackages'.
*/
String[] value() default {};
/**
* Base packages to scan for annotated components.
* <p>
* {@link #value()} is an alias for (and mutually exclusive with) this attribute.
* <p>
* Use {@link #basePackageClasses()} for a type-safe alternative to String-based
* package names.
*
* @return the array of 'basePackages'.
*/
String[] basePackages() default {};
/**
* Type-safe alternative to {@link #basePackages()} for specifying the packages to
* scan for annotated components. The package of each class specified will be scanned.
* <p>
* Consider creating a special no-op marker class or interface in each package that
* serves no purpose other than being referenced by this attribute.
*
* @return the array of 'basePackageClasses'.
*/
Class<?>[] basePackageClasses() default {};
/**
* A custom <code>@Configuration</code> for all feign clients. Can contain override
* <code>@Bean</code> definition for the pieces that make up the client, for instance
* {@link feign.codec.Decoder}, {@link feign.codec.Encoder}, {@link feign.Contract}.
*
* @see FeignClientsConfiguration for the defaults
*/
Class<?>[] defaultConfiguration() default {};
/**
* List of classes annotated with @FeignClient. If not empty, disables classpath scanning.
* @return
*/
Class<?>[] clients() default {};
}
@@ -1,122 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.client.HttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.client.actuator.HasFeatures;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import feign.Client;
import feign.Feign;
import feign.httpclient.ApacheHttpClient;
import feign.okhttp.OkHttpClient;
/**
* @author Spencer Gibb
* @author Julien Roy
*/
@Configuration
@ConditionalOnClass(Feign.class)
public class FeignAutoConfiguration {
@Autowired(required = false)
private List<FeignClientSpecification> configurations = new ArrayList<>();
@Bean
public HasFeatures feignFeature() {
return HasFeatures.namedFeature("Feign", Feign.class);
}
@Bean
public FeignContext feignContext() {
FeignContext context = new FeignContext();
context.setConfigurations(this.configurations);
return context;
}
@Configuration
@ConditionalOnClass(name = "feign.hystrix.HystrixFeign")
protected static class HystrixFeignTargeterConfiguration {
@Bean
@ConditionalOnMissingBean
public Targeter feignTargeter() {
return new HystrixTargeter();
}
}
@Configuration
@ConditionalOnMissingClass("feign.hystrix.HystrixFeign")
protected static class DefaultFeignTargeterConfiguration {
@Bean
@ConditionalOnMissingBean
public Targeter feignTargeter() {
return new DefaultTargeter();
}
}
// the following configuration is for alternate feign clients if
// ribbon is not on the class path.
// see corresponding configurations in FeignRibbonClientAutoConfiguration
// for load balanced ribbon clients.
@Configuration
@ConditionalOnClass(ApacheHttpClient.class)
@ConditionalOnMissingClass("com.netflix.loadbalancer.ILoadBalancer")
@ConditionalOnProperty(value = "feign.httpclient.enabled", matchIfMissing = true)
protected static class HttpClientFeignConfiguration {
@Autowired(required = false)
private HttpClient httpClient;
@Bean
@ConditionalOnMissingBean(Client.class)
public Client feignClient() {
if (this.httpClient != null) {
return new ApacheHttpClient(this.httpClient);
}
return new ApacheHttpClient();
}
}
@Configuration
@ConditionalOnClass(OkHttpClient.class)
@ConditionalOnMissingClass("com.netflix.loadbalancer.ILoadBalancer")
@ConditionalOnProperty(value = "feign.okhttp.enabled", matchIfMissing = true)
protected static class OkHttpFeignConfiguration {
@Autowired(required = false)
private okhttp3.OkHttpClient okHttpClient;
@Bean
@ConditionalOnMissingBean(Client.class)
public Client feignClient() {
if (this.okHttpClient != null) {
return new OkHttpClient(this.okHttpClient);
}
return new OkHttpClient();
}
}
}
@@ -1,114 +0,0 @@
/*
* Copyright 2013-2016 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
/**
* Annotation for interfaces declaring that a REST client with that interface should be
* created (e.g. for autowiring into another component). If ribbon is available it will be
* used to load balance the backend requests, and the load balancer can be configured
* using a <code>@RibbonClient</code> with the same name (i.e. value) as the feign client.
*
* @author Spencer Gibb
* @author Venil Noronha
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface FeignClient {
/**
* The name of the service with optional protocol prefix. Synonym for {@link #name()
* name}. A name must be specified for all clients, whether or not a url is provided.
* Can be specified as property key, eg: ${propertyKey}.
*/
@AliasFor("name")
String value() default "";
/**
* The service id with optional protocol prefix. Synonym for {@link #value() value}.
*
* @deprecated use {@link #name() name} instead
*/
@Deprecated
String serviceId() default "";
/**
* The service id with optional protocol prefix. Synonym for {@link #value() value}.
*/
@AliasFor("value")
String name() default "";
/**
* Sets the <code>@Qualifier</code> value for the feign client.
*/
String qualifier() default "";
/**
* An absolute URL or resolvable hostname (the protocol is optional).
*/
String url() default "";
/**
* Whether 404s should be decoded instead of throwing FeignExceptions
*/
boolean decode404() default false;
/**
* A custom <code>@Configuration</code> for the feign client. Can contain override
* <code>@Bean</code> definition for the pieces that make up the client, for instance
* {@link feign.codec.Decoder}, {@link feign.codec.Encoder}, {@link feign.Contract}.
*
* @see FeignClientsConfiguration for the defaults
*/
Class<?>[] configuration() default {};
/**
* Fallback class for the specified Feign client interface. The fallback class must
* implement the interface annotated by this annotation and be a valid spring bean.
*/
Class<?> fallback() default void.class;
/**
* Define a fallback factory for the specified Feign client interface. The fallback
* factory must produce instances of fallback classes that implement the interface
* annotated by {@link FeignClient}. The fallback factory must be a valid spring
* bean.
*
* @see feign.hystrix.FallbackFactory for details.
*/
Class<?> fallbackFactory() default void.class;
/**
* Path prefix to be used by all method-level mappings. Can be used with or without
* <code>@RibbonClient</code>.
*/
String path() default "";
/**
* Whether to mark the feign proxy as a primary bean. Defaults to true.
*/
boolean primary() default true;
}
@@ -1,210 +0,0 @@
/*
* Copyright 2013-2016 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import java.util.Map;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.cloud.netflix.feign.ribbon.LoadBalancerFeignClient;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import feign.Client;
import feign.Contract;
import feign.Feign;
import feign.Logger;
import feign.Request;
import feign.RequestInterceptor;
import feign.Retryer;
import feign.Target.HardCodedTarget;
import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.codec.ErrorDecoder;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author Spencer Gibb
* @author Venil Noronha
*/
@Data
@EqualsAndHashCode(callSuper = false)
class FeignClientFactoryBean implements FactoryBean<Object>, InitializingBean,
ApplicationContextAware {
/***********************************
* WARNING! Nothing in this class should be @Autowired. It causes NPEs because of some lifecycle race condition.
***********************************/
private Class<?> type;
private String name;
private String url;
private String path;
private boolean decode404;
private ApplicationContext applicationContext;
private Class<?> fallback = void.class;
private Class<?> fallbackFactory = void.class;
@Override
public void afterPropertiesSet() throws Exception {
Assert.hasText(this.name, "Name must be set");
}
@Override
public void setApplicationContext(ApplicationContext context) throws BeansException {
this.applicationContext = context;
}
protected Feign.Builder feign(FeignContext context) {
FeignLoggerFactory loggerFactory = get(context, FeignLoggerFactory.class);
Logger logger = loggerFactory.create(this.type);
// @formatter:off
Feign.Builder builder = get(context, Feign.Builder.class)
// required values
.logger(logger)
.encoder(get(context, Encoder.class))
.decoder(get(context, Decoder.class))
.contract(get(context, Contract.class));
// @formatter:on
// optional values
Logger.Level level = getOptional(context, Logger.Level.class);
if (level != null) {
builder.logLevel(level);
}
Retryer retryer = getOptional(context, Retryer.class);
if (retryer != null) {
builder.retryer(retryer);
}
ErrorDecoder errorDecoder = getOptional(context, ErrorDecoder.class);
if (errorDecoder != null) {
builder.errorDecoder(errorDecoder);
}
Request.Options options = getOptional(context, Request.Options.class);
if (options != null) {
builder.options(options);
}
Map<String, RequestInterceptor> requestInterceptors = context.getInstances(
this.name, RequestInterceptor.class);
if (requestInterceptors != null) {
builder.requestInterceptors(requestInterceptors.values());
}
if (decode404) {
builder.decode404();
}
return builder;
}
protected <T> T get(FeignContext context, Class<T> type) {
T instance = context.getInstance(this.name, type);
if (instance == null) {
throw new IllegalStateException("No bean found of type " + type + " for "
+ this.name);
}
return instance;
}
protected <T> T getOptional(FeignContext context, Class<T> type) {
return context.getInstance(this.name, type);
}
protected <T> T loadBalance(Feign.Builder builder, FeignContext context,
HardCodedTarget<T> target) {
Client client = getOptional(context, Client.class);
if (client != null) {
builder.client(client);
Targeter targeter = get(context, Targeter.class);
return targeter.target(this, builder, context, target);
}
throw new IllegalStateException(
"No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-ribbon?");
}
@Override
public Object getObject() throws Exception {
FeignContext context = applicationContext.getBean(FeignContext.class);
Feign.Builder builder = feign(context);
if (!StringUtils.hasText(this.url)) {
String url;
if (!this.name.startsWith("http")) {
url = "http://" + this.name;
}
else {
url = this.name;
}
url += cleanPath();
return loadBalance(builder, context, new HardCodedTarget<>(this.type,
this.name, url));
}
if (StringUtils.hasText(this.url) && !this.url.startsWith("http")) {
this.url = "http://" + this.url;
}
String url = this.url + cleanPath();
Client client = getOptional(context, Client.class);
if (client != null) {
if (client instanceof LoadBalancerFeignClient) {
// not lod balancing because we have a url,
// but ribbon is on the classpath, so unwrap
client = ((LoadBalancerFeignClient)client).getDelegate();
}
builder.client(client);
}
Targeter targeter = get(context, Targeter.class);
return targeter.target(this, builder, context, new HardCodedTarget<>(
this.type, this.name, url));
}
private String cleanPath() {
String path = this.path.trim();
if (StringUtils.hasLength(path)) {
if (!path.startsWith("/")) {
path = "/" + path;
}
if (path.endsWith("/")) {
path = path.substring(0, path.length() - 1);
}
}
return path;
}
@Override
public Class<?> getObjectType() {
return this.type;
}
@Override
public boolean isSingleton() {
return true;
}
}
@@ -1,37 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import org.springframework.cloud.context.named.NamedContextFactory;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Dave Syer
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
class FeignClientSpecification implements NamedContextFactory.Specification {
private String name;
private Class<?>[] configuration;
}
@@ -1,126 +0,0 @@
/*
* Copyright 2013-2016 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
import org.springframework.cloud.netflix.feign.support.ResponseEntityDecoder;
import org.springframework.cloud.netflix.feign.support.SpringDecoder;
import org.springframework.cloud.netflix.feign.support.SpringEncoder;
import org.springframework.cloud.netflix.feign.support.SpringMvcContract;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.core.convert.ConversionService;
import org.springframework.format.support.DefaultFormattingConversionService;
import org.springframework.format.support.FormattingConversionService;
import com.netflix.hystrix.HystrixCommand;
import feign.Contract;
import feign.Feign;
import feign.Logger;
import feign.Retryer;
import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.hystrix.HystrixFeign;
/**
* @author Dave Syer
* @author Venil Noronha
*/
@Configuration
public class FeignClientsConfiguration {
@Autowired
private ObjectFactory<HttpMessageConverters> messageConverters;
@Autowired(required = false)
private List<AnnotatedParameterProcessor> parameterProcessors = new ArrayList<>();
@Autowired(required = false)
private List<FeignFormatterRegistrar> feignFormatterRegistrars = new ArrayList<>();
@Autowired(required = false)
private Logger logger;
@Bean
@ConditionalOnMissingBean
public Decoder feignDecoder() {
return new ResponseEntityDecoder(new SpringDecoder(this.messageConverters));
}
@Bean
@ConditionalOnMissingBean
public Encoder feignEncoder() {
return new SpringEncoder(this.messageConverters);
}
@Bean
@ConditionalOnMissingBean
public Contract feignContract(ConversionService feignConversionService) {
return new SpringMvcContract(this.parameterProcessors, feignConversionService);
}
@Bean
public FormattingConversionService feignConversionService() {
FormattingConversionService conversionService = new DefaultFormattingConversionService();
for (FeignFormatterRegistrar feignFormatterRegistrar : feignFormatterRegistrars) {
feignFormatterRegistrar.registerFormatters(conversionService);
}
return conversionService;
}
@Configuration
@ConditionalOnClass({ HystrixCommand.class, HystrixFeign.class })
protected static class HystrixFeignConfiguration {
@Bean
@Scope("prototype")
@ConditionalOnMissingBean
@ConditionalOnProperty(name = "feign.hystrix.enabled", matchIfMissing = false)
public Feign.Builder feignHystrixBuilder() {
return HystrixFeign.builder();
}
}
@Bean
@ConditionalOnMissingBean
public Retryer feignRetryer() {
return Retryer.NEVER_RETRY;
}
@Bean
@Scope("prototype")
@ConditionalOnMissingBean
public Feign.Builder feignBuilder(Retryer retryer) {
return Feign.builder().retryer(retryer);
}
@Bean
@ConditionalOnMissingBean(FeignLoggerFactory.class)
public FeignLoggerFactory feignLoggerFactory() {
return new DefaultFeignLoggerFactory(logger);
}
}
@@ -1,420 +0,0 @@
/*
* Copyright 2013-2016 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.core.type.ClassMetadata;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.filter.AbstractClassTestingTypeFilter;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.core.type.filter.TypeFilter;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
* @author Spencer Gibb
* @author Jakub Narloch
* @author Venil Noronha
*/
class FeignClientsRegistrar implements ImportBeanDefinitionRegistrar,
ResourceLoaderAware, BeanClassLoaderAware, EnvironmentAware {
// patterned after Spring Integration IntegrationComponentScanRegistrar
// and RibbonClientsConfigurationRegistgrar
private ResourceLoader resourceLoader;
private ClassLoader classLoader;
private Environment environment;
public FeignClientsRegistrar() {
}
@Override
public void setResourceLoader(ResourceLoader resourceLoader) {
this.resourceLoader = resourceLoader;
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}
@Override
public void registerBeanDefinitions(AnnotationMetadata metadata,
BeanDefinitionRegistry registry) {
registerDefaultConfiguration(metadata, registry);
registerFeignClients(metadata, registry);
}
private void registerDefaultConfiguration(AnnotationMetadata metadata,
BeanDefinitionRegistry registry) {
Map<String, Object> defaultAttrs = metadata
.getAnnotationAttributes(EnableFeignClients.class.getName(), true);
if (defaultAttrs != null && defaultAttrs.containsKey("defaultConfiguration")) {
String name;
if (metadata.hasEnclosingClass()) {
name = "default." + metadata.getEnclosingClassName();
}
else {
name = "default." + metadata.getClassName();
}
registerClientConfiguration(registry, name,
defaultAttrs.get("defaultConfiguration"));
}
}
public void registerFeignClients(AnnotationMetadata metadata,
BeanDefinitionRegistry registry) {
ClassPathScanningCandidateComponentProvider scanner = getScanner();
scanner.setResourceLoader(this.resourceLoader);
Set<String> basePackages;
Map<String, Object> attrs = metadata
.getAnnotationAttributes(EnableFeignClients.class.getName());
AnnotationTypeFilter annotationTypeFilter = new AnnotationTypeFilter(
FeignClient.class);
final Class<?>[] clients = attrs == null ? null
: (Class<?>[]) attrs.get("clients");
if (clients == null || clients.length == 0) {
scanner.addIncludeFilter(annotationTypeFilter);
basePackages = getBasePackages(metadata);
}
else {
final Set<String> clientClasses = new HashSet<>();
basePackages = new HashSet<>();
for (Class<?> clazz : clients) {
basePackages.add(ClassUtils.getPackageName(clazz));
clientClasses.add(clazz.getCanonicalName());
}
AbstractClassTestingTypeFilter filter = new AbstractClassTestingTypeFilter() {
@Override
protected boolean match(ClassMetadata metadata) {
String cleaned = metadata.getClassName().replaceAll("\\$", ".");
return clientClasses.contains(cleaned);
}
};
scanner.addIncludeFilter(
new AllTypeFilter(Arrays.asList(filter, annotationTypeFilter)));
}
for (String basePackage : basePackages) {
Set<BeanDefinition> candidateComponents = scanner
.findCandidateComponents(basePackage);
for (BeanDefinition candidateComponent : candidateComponents) {
if (candidateComponent instanceof AnnotatedBeanDefinition) {
// verify annotated class is an interface
AnnotatedBeanDefinition beanDefinition = (AnnotatedBeanDefinition) candidateComponent;
AnnotationMetadata annotationMetadata = beanDefinition.getMetadata();
Assert.isTrue(annotationMetadata.isInterface(),
"@FeignClient can only be specified on an interface");
Map<String, Object> attributes = annotationMetadata
.getAnnotationAttributes(
FeignClient.class.getCanonicalName());
String name = getClientName(attributes);
registerClientConfiguration(registry, name,
attributes.get("configuration"));
registerFeignClient(registry, annotationMetadata, attributes);
}
}
}
}
private void registerFeignClient(BeanDefinitionRegistry registry,
AnnotationMetadata annotationMetadata, Map<String, Object> attributes) {
String className = annotationMetadata.getClassName();
BeanDefinitionBuilder definition = BeanDefinitionBuilder
.genericBeanDefinition(FeignClientFactoryBean.class);
validate(attributes);
definition.addPropertyValue("url", getUrl(attributes));
definition.addPropertyValue("path", getPath(attributes));
String name = getName(attributes);
definition.addPropertyValue("name", name);
definition.addPropertyValue("type", className);
definition.addPropertyValue("decode404", attributes.get("decode404"));
definition.addPropertyValue("fallback", attributes.get("fallback"));
definition.addPropertyValue("fallbackFactory", attributes.get("fallbackFactory"));
definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE);
String alias = name + "FeignClient";
AbstractBeanDefinition beanDefinition = definition.getBeanDefinition();
boolean primary = (Boolean)attributes.get("primary"); // has a default, won't be null
beanDefinition.setPrimary(primary);
String qualifier = getQualifier(attributes);
if (StringUtils.hasText(qualifier)) {
alias = qualifier;
}
BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition, className,
new String[] { alias });
BeanDefinitionReaderUtils.registerBeanDefinition(holder, registry);
}
private void validate(Map<String, Object> attributes) {
AnnotationAttributes annotation = AnnotationAttributes.fromMap(attributes);
// This blows up if an aliased property is overspecified
annotation.getAliasedString("name", FeignClient.class, null);
}
/* for testing */ String getName(Map<String, Object> attributes) {
String name = (String) attributes.get("serviceId");
if (!StringUtils.hasText(name)) {
name = (String) attributes.get("name");
}
if (!StringUtils.hasText(name)) {
name = (String) attributes.get("value");
}
name = resolve(name);
if (!StringUtils.hasText(name)) {
return "";
}
String host = null;
try {
String url;
if (!name.startsWith("http://") && !name.startsWith("https://")) {
url = "http://" + name;
} else {
url = name;
}
host = new URI(url).getHost();
}
catch (URISyntaxException e) {
}
Assert.state(host != null, "Service id not legal hostname (" + name + ")");
return name;
}
private String resolve(String value) {
if (StringUtils.hasText(value)) {
return this.environment.resolvePlaceholders(value);
}
return value;
}
private String getUrl(Map<String, Object> attributes) {
String url = resolve((String) attributes.get("url"));
if (StringUtils.hasText(url) && !(url.startsWith("#{") && url.contains("}"))) {
if (!url.contains("://")) {
url = "http://" + url;
}
try {
new URL(url);
}
catch (MalformedURLException e) {
throw new IllegalArgumentException(url + " is malformed", e);
}
}
return url;
}
private String getPath(Map<String, Object> attributes) {
String path = resolve((String) attributes.get("path"));
if (StringUtils.hasText(path)) {
path = path.trim();
if (!path.startsWith("/")) {
path = "/" + path;
}
if (path.endsWith("/")) {
path = path.substring(0, path.length() - 1);
}
}
return path;
}
protected ClassPathScanningCandidateComponentProvider getScanner() {
return new ClassPathScanningCandidateComponentProvider(false, this.environment) {
@Override
protected boolean isCandidateComponent(
AnnotatedBeanDefinition beanDefinition) {
if (beanDefinition.getMetadata().isIndependent()) {
// TODO until SPR-11711 will be resolved
if (beanDefinition.getMetadata().isInterface()
&& beanDefinition.getMetadata()
.getInterfaceNames().length == 1
&& Annotation.class.getName().equals(beanDefinition
.getMetadata().getInterfaceNames()[0])) {
try {
Class<?> target = ClassUtils.forName(
beanDefinition.getMetadata().getClassName(),
FeignClientsRegistrar.this.classLoader);
return !target.isAnnotation();
}
catch (Exception ex) {
this.logger.error(
"Could not load target class: "
+ beanDefinition.getMetadata().getClassName(),
ex);
}
}
return true;
}
return false;
}
};
}
protected Set<String> getBasePackages(AnnotationMetadata importingClassMetadata) {
Map<String, Object> attributes = importingClassMetadata
.getAnnotationAttributes(EnableFeignClients.class.getCanonicalName());
Set<String> basePackages = new HashSet<>();
for (String pkg : (String[]) attributes.get("value")) {
if (StringUtils.hasText(pkg)) {
basePackages.add(pkg);
}
}
for (String pkg : (String[]) attributes.get("basePackages")) {
if (StringUtils.hasText(pkg)) {
basePackages.add(pkg);
}
}
for (Class<?> clazz : (Class[]) attributes.get("basePackageClasses")) {
basePackages.add(ClassUtils.getPackageName(clazz));
}
if (basePackages.isEmpty()) {
basePackages.add(
ClassUtils.getPackageName(importingClassMetadata.getClassName()));
}
return basePackages;
}
private String getQualifier(Map<String, Object> client) {
if (client == null) {
return null;
}
String qualifier = (String) client.get("qualifier");
if (StringUtils.hasText(qualifier)) {
return qualifier;
}
return null;
}
private String getClientName(Map<String, Object> client) {
if (client == null) {
return null;
}
String value = (String) client.get("value");
if (!StringUtils.hasText(value)) {
value = (String) client.get("name");
}
if (!StringUtils.hasText(value)) {
value = (String) client.get("serviceId");
}
if (StringUtils.hasText(value)) {
return value;
}
throw new IllegalStateException("Either 'name' or 'value' must be provided in @"
+ FeignClient.class.getSimpleName());
}
private void registerClientConfiguration(BeanDefinitionRegistry registry, Object name,
Object configuration) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder
.genericBeanDefinition(FeignClientSpecification.class);
builder.addConstructorArgValue(name);
builder.addConstructorArgValue(configuration);
registry.registerBeanDefinition(
name + "." + FeignClientSpecification.class.getSimpleName(),
builder.getBeanDefinition());
}
@Override
public void setEnvironment(Environment environment) {
this.environment = environment;
}
/**
* Helper class to create a {@link TypeFilter} that matches if all the delegates
* match.
*
* @author Oliver Gierke
*/
private static class AllTypeFilter implements TypeFilter {
private final List<TypeFilter> delegates;
/**
* Creates a new {@link AllTypeFilter} to match if all the given delegates match.
*
* @param delegates must not be {@literal null}.
*/
public AllTypeFilter(List<TypeFilter> delegates) {
Assert.notNull(delegates);
this.delegates = delegates;
}
@Override
public boolean match(MetadataReader metadataReader,
MetadataReaderFactory metadataReaderFactory) throws IOException {
for (TypeFilter filter : this.delegates) {
if (!filter.match(metadataReader, metadataReaderFactory)) {
return false;
}
}
return true;
}
}
}
@@ -1,34 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import org.springframework.cloud.context.named.NamedContextFactory;
/**
* A factory that creates instances of feign classes. It creates a Spring
* ApplicationContext per client name, and extracts the beans that it needs from there.
*
* @author Spencer Gibb
* @author Dave Syer
*/
public class FeignContext extends NamedContextFactory<FeignClientSpecification> {
public FeignContext() {
super(FeignClientsConfiguration.class, "feign", "feign.client.name");
}
}
@@ -1,36 +0,0 @@
/*
* Copyright 2016 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign;
import feign.Logger;
/**
* Allows an application to use a custom Feign {@link Logger}.
*
* @author Venil Noronha
*/
public interface FeignLoggerFactory {
/**
* Factory method to provide a {@link Logger} for a given {@link Class}.
*
* @param type the {@link Class} for which a {@link Logger} instance is to be created
* @return a {@link Logger} instance
*/
public Logger create(Class<?> type);
}
@@ -1,111 +0,0 @@
/*
* Copyright 2013-2016 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
*
* 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.
*
*/
package org.springframework.cloud.netflix.feign;
import org.springframework.util.Assert;
import feign.Feign;
import feign.Target;
import feign.hystrix.FallbackFactory;
import feign.hystrix.HystrixFeign;
import feign.hystrix.SetterFactory;
/**
* @author Spencer Gibb
* @author Erik Kringen
*/
@SuppressWarnings("unchecked")
class HystrixTargeter implements Targeter {
@Override
public <T> T target(FeignClientFactoryBean factory, Feign.Builder feign, FeignContext context,
Target.HardCodedTarget<T> target) {
if (!(feign instanceof feign.hystrix.HystrixFeign.Builder)) {
return feign.target(target);
}
feign.hystrix.HystrixFeign.Builder builder = (feign.hystrix.HystrixFeign.Builder) feign;
SetterFactory setterFactory = getOptional(factory.getName(), context,
SetterFactory.class);
if (setterFactory != null) {
builder.setterFactory(setterFactory);
}
Class<?> fallback = factory.getFallback();
if (fallback != void.class) {
return targetWithFallback(factory.getName(), context, target, builder, fallback);
}
Class<?> fallbackFactory = factory.getFallbackFactory();
if (fallbackFactory != void.class) {
return targetWithFallbackFactory(factory.getName(), context, target, builder, fallbackFactory);
}
return feign.target(target);
}
private <T> T targetWithFallbackFactory(String feignClientName, FeignContext context,
Target.HardCodedTarget<T> target,
HystrixFeign.Builder builder,
Class<?> fallbackFactoryClass) {
FallbackFactory<? extends T> fallbackFactory = (FallbackFactory<? extends T>)
getFromContext("fallbackFactory", feignClientName, context, fallbackFactoryClass, FallbackFactory.class);
/* We take a sample fallback from the fallback factory to check if it returns a fallback
that is compatible with the annotated feign interface. */
Object exampleFallback = fallbackFactory.create(new RuntimeException());
Assert.notNull(exampleFallback,
String.format(
"Incompatible fallbackFactory instance for feign client %s. Factory may not produce null!",
feignClientName));
if (!target.type().isAssignableFrom(exampleFallback.getClass())) {
throw new IllegalStateException(
String.format(
"Incompatible fallbackFactory instance for feign client %s. Factory produces instances of '%s', but should produce instances of '%s'",
feignClientName, exampleFallback.getClass(), target.type()));
}
return builder.target(target, fallbackFactory);
}
private <T> T targetWithFallback(String feignClientName, FeignContext context,
Target.HardCodedTarget<T> target,
HystrixFeign.Builder builder, Class<?> fallback) {
T fallbackInstance = getFromContext("fallback", feignClientName, context, fallback, target.type());
return builder.target(target, fallbackInstance);
}
private <T> T getFromContext(String fallbackMechanism, String feignClientName, FeignContext context,
Class<?> beanType, Class<T> targetType) {
Object fallbackInstance = context.getInstance(feignClientName, beanType);
if (fallbackInstance == null) {
throw new IllegalStateException(String.format(
"No " + fallbackMechanism + " instance of type %s found for feign client %s",
beanType, feignClientName));
}
if (!targetType.isAssignableFrom(beanType)) {
throw new IllegalStateException(
String.format(
"Incompatible " + fallbackMechanism + " instance. Fallback/fallbackFactory of type %s is not assignable to %s for feign client %s",
beanType, targetType, feignClientName));
}
return (T) fallbackInstance;
}
private <T> T getOptional(String feignClientName, FeignContext context,
Class<T> beanType) {
return context.getInstance(feignClientName, beanType);
}
}
@@ -1,77 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Map;
import org.springframework.cloud.netflix.feign.AnnotatedParameterProcessor;
import org.springframework.web.bind.annotation.PathVariable;
import feign.MethodMetadata;
import static feign.Util.checkState;
import static feign.Util.emptyToNull;
/**
* {@link PathVariable} parameter processor.
*
* @author Jakub Narloch
* @author Abhijit Sarkar
* @see AnnotatedParameterProcessor
*/
public class PathVariableParameterProcessor implements AnnotatedParameterProcessor {
private static final Class<PathVariable> ANNOTATION = PathVariable.class;
@Override
public Class<? extends Annotation> getAnnotationType() {
return ANNOTATION;
}
@Override
public boolean processArgument(AnnotatedParameterContext context, Annotation annotation, Method method) {
String name = ANNOTATION.cast(annotation).value();
checkState(emptyToNull(name) != null,
"PathVariable annotation was empty on param %s.", context.getParameterIndex());
context.setParameterName(name);
MethodMetadata data = context.getMethodMetadata();
String varName = '{' + name + '}';
if (!data.template().url().contains(varName)
&& !searchMapValues(data.template().queries(), varName)
&& !searchMapValues(data.template().headers(), varName)) {
data.formParams().add(name);
}
return true;
}
private <K, V> boolean searchMapValues(Map<K, Collection<V>> map, V search) {
Collection<Collection<V>> values = map.values();
if (values == null) {
return false;
}
for (Collection<V> entry : values) {
if (entry.contains(search)) {
return true;
}
}
return false;
}
}
@@ -1,70 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Map;
import org.springframework.cloud.netflix.feign.AnnotatedParameterProcessor;
import org.springframework.web.bind.annotation.RequestHeader;
import feign.MethodMetadata;
import static feign.Util.checkState;
import static feign.Util.emptyToNull;
/**
* {@link RequestHeader} parameter processor.
*
* @author Jakub Narloch
* @author Abhijit Sarkar
* @see AnnotatedParameterProcessor
*/
public class RequestHeaderParameterProcessor implements AnnotatedParameterProcessor {
private static final Class<RequestHeader> ANNOTATION = RequestHeader.class;
@Override
public Class<? extends Annotation> getAnnotationType() {
return ANNOTATION;
}
@Override
public boolean processArgument(AnnotatedParameterContext context, Annotation annotation, Method method) {
int parameterIndex = context.getParameterIndex();
Class<?> parameterType = method.getParameterTypes()[parameterIndex];
MethodMetadata data = context.getMethodMetadata();
if (Map.class.isAssignableFrom(parameterType)) {
checkState(data.headerMapIndex() == null, "Header map can only be present once.");
data.headerMapIndex(parameterIndex);
return true;
}
String name = ANNOTATION.cast(annotation).value();
checkState(emptyToNull(name) != null,
"RequestHeader.value() was empty on parameter %s", parameterIndex);
context.setParameterName(name);
Collection<String> header = context.setTemplateParameter(name, data.template().headers().get(name));
data.template().header(name, header);
return true;
}
}
@@ -1,73 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Map;
import org.springframework.cloud.netflix.feign.AnnotatedParameterProcessor;
import org.springframework.web.bind.annotation.RequestParam;
import static feign.Util.checkState;
import static feign.Util.emptyToNull;
import feign.MethodMetadata;
/**
* {@link RequestParam} parameter processor.
*
* @author Jakub Narloch
* @author Abhijit Sarkar
* @see AnnotatedParameterProcessor
*/
public class RequestParamParameterProcessor implements AnnotatedParameterProcessor {
private static final Class<RequestParam> ANNOTATION = RequestParam.class;
@Override
public Class<? extends Annotation> getAnnotationType() {
return ANNOTATION;
}
@Override
public boolean processArgument(AnnotatedParameterContext context, Annotation annotation, Method method) {
int parameterIndex = context.getParameterIndex();
Class<?> parameterType = method.getParameterTypes()[parameterIndex];
MethodMetadata data = context.getMethodMetadata();
if (Map.class.isAssignableFrom(parameterType)) {
checkState(data.queryMapIndex() == null, "Query map can only be present once.");
data.queryMapIndex(parameterIndex);
return true;
}
RequestParam requestParam = ANNOTATION.cast(annotation);
String name = requestParam.value();
checkState(emptyToNull(name) != null,
"RequestParam.value() was empty on parameter %s",
parameterIndex);
context.setParameterName(name);
Collection<String> query = context.setTemplateParameter(name,
data.template().queries().get(name));
data.template().query(name, query);
return true;
}
}
@@ -1,61 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.encoding;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.AccessLevel;
import lombok.Getter;
import org.springframework.util.Assert;
/**
* The base request interceptor.
*
* @author Jakub Narloch
*/
public abstract class BaseRequestInterceptor implements RequestInterceptor {
/**
* The encoding properties.
*/
@Getter(AccessLevel.PROTECTED)
private final FeignClientEncodingProperties properties;
/**
* Creates new instance of {@link BaseRequestInterceptor}.
*
* @param properties the encoding properties
*/
protected BaseRequestInterceptor(FeignClientEncodingProperties properties) {
Assert.notNull(properties, "Properties can not be null");
this.properties = properties;
}
/**
* Adds the header if it wasn't yet specified.
*
* @param requestTemplate the request
* @param name the header name
* @param values the header values
*/
protected void addHeader(RequestTemplate requestTemplate, String name, String... values) {
if (!requestTemplate.headers().containsKey(name)) {
requestTemplate.header(name, values);
}
}
}
@@ -1,49 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.encoding;
import feign.Feign;
import feign.httpclient.ApacheHttpClient;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.netflix.feign.FeignAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Configures the Feign response compression.
*
* @author Jakub Narloch
* @see FeignAcceptGzipEncodingInterceptor
*/
@Configuration
@EnableConfigurationProperties(FeignClientEncodingProperties.class)
@ConditionalOnClass(Feign.class)
@ConditionalOnBean(ApacheHttpClient.class)
@ConditionalOnProperty(value = "feign.compression.response.enabled", matchIfMissing = false)
@AutoConfigureAfter(FeignAutoConfiguration.class)
public class FeignAcceptGzipEncodingAutoConfiguration {
@Bean
public FeignAcceptGzipEncodingInterceptor feignAcceptGzipEncodingInterceptor(FeignClientEncodingProperties properties) {
return new FeignAcceptGzipEncodingInterceptor(properties);
}
}
@@ -1,49 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.encoding;
import feign.RequestTemplate;
/**
* Enables the HTTP response payload compression by specifying the {@code Accept-Encoding} headers.
* Although this does not yet mean that the requests will be compressed, it requires the remote server
* to understand the header and be configured to compress responses. Still no all responses might be compressed
* based on the media type matching and other factors like the response content length.
*
* @author Jakub Narloch
*/
public class FeignAcceptGzipEncodingInterceptor extends BaseRequestInterceptor {
/**
* Creates new instance of {@link FeignAcceptGzipEncodingInterceptor}.
*
* @param properties the encoding properties
*/
protected FeignAcceptGzipEncodingInterceptor(FeignClientEncodingProperties properties) {
super(properties);
}
/**
* {@inheritDoc}
*/
@Override
public void apply(RequestTemplate template) {
addHeader(template, HttpEncoding.ACCEPT_ENCODING_HEADER, HttpEncoding.GZIP_ENCODING,
HttpEncoding.DEFLATE_ENCODING);
}
}
@@ -1,40 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.encoding;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* The Feign encoding properties.
*
* @author Jakub Narloch
*/
@Data
@ConfigurationProperties("feign.compression.request")
public class FeignClientEncodingProperties {
/**
* The list of supported mime types.
*/
private String[] mimeTypes = new String[]{"text/xml", "application/xml", "application/json"};
/**
* The minimum threshold content size.
*/
private int minRequestSize = 2048;
}
@@ -1,49 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.encoding;
import feign.Feign;
import feign.httpclient.ApacheHttpClient;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.netflix.feign.FeignAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Configures the Feign request compression.
*
* @author Jakub Narloch
* @see FeignContentGzipEncodingInterceptor
*/
@Configuration
@EnableConfigurationProperties(FeignClientEncodingProperties.class)
@ConditionalOnClass(Feign.class)
@ConditionalOnBean(ApacheHttpClient.class)
@ConditionalOnProperty(value = "feign.compression.request.enabled", matchIfMissing = false)
@AutoConfigureAfter(FeignAutoConfiguration.class)
public class FeignContentGzipEncodingAutoConfiguration {
@Bean
public FeignContentGzipEncodingInterceptor feignContentGzipEncodingInterceptor(FeignClientEncodingProperties properties) {
return new FeignContentGzipEncodingInterceptor(properties);
}
}
@@ -1,111 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.encoding;
import feign.RequestTemplate;
import java.util.Collection;
import java.util.Map;
/**
* Enables the HTTP request payload compression by specifying the {@code Content-Encoding} headers.
*
* @author Jakub Narloch
*/
public class FeignContentGzipEncodingInterceptor extends BaseRequestInterceptor {
/**
* Creates new instance of {@link FeignContentGzipEncodingInterceptor}.
*
* @param properties the encoding properties
*/
protected FeignContentGzipEncodingInterceptor(FeignClientEncodingProperties properties) {
super(properties);
}
/**
* {@inheritDoc}
*/
@Override
public void apply(RequestTemplate template) {
if (requiresCompression(template)) {
addHeader(template, HttpEncoding.CONTENT_ENCODING_HEADER, HttpEncoding.GZIP_ENCODING,
HttpEncoding.DEFLATE_ENCODING);
}
}
/**
* Returns whether the request requires GZIP compression.
*
* @param template the request template
* @return true if request requires compression, false otherwise
*/
private boolean requiresCompression(RequestTemplate template) {
final Map<String, Collection<String>> headers = template.headers();
return matchesMimeType(headers.get(HttpEncoding.CONTENT_TYPE))
&& contentLengthExceedThreshold(headers.get(HttpEncoding.CONTENT_LENGTH));
}
/**
* Returns whether the request content length exceed configured minimum size.
*
* @param contentLength the content length header value
* @return true if length is grater than minimum size, false otherwise
*/
private boolean contentLengthExceedThreshold(Collection<String> contentLength) {
try {
if (contentLength == null || contentLength.size() != 1) {
return false;
}
final String strLen = contentLength.iterator().next();
final long length = Long.parseLong(strLen);
return length > getProperties().getMinRequestSize();
} catch (NumberFormatException ex) {
// ignores the exception
}
return false;
}
/**
* Returns whether the content mime types matches the configures mime types.
*
* @param contentTypes the content types
* @return true if any specified content type matches the request content types
*/
private boolean matchesMimeType(Collection<String> contentTypes) {
if (contentTypes == null || contentTypes.size() == 0) {
return false;
}
if (getProperties().getMimeTypes() == null || getProperties().getMimeTypes().length == 0) {
// no specific mime types has been set - matching everything
return true;
}
for (String mimeType : getProperties().getMimeTypes()) {
if (contentTypes.contains(mimeType)) {
return true;
}
}
return false;
}
}
@@ -1,55 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.encoding;
/**
* Lists all constants used by Feign encoders.
*
* @author Jakub Narloch
*/
public interface HttpEncoding {
/**
* The HTTP Content-Length header.
*/
String CONTENT_LENGTH = "Content-Length";
/**
* The HTTP Content-Type header.
*/
String CONTENT_TYPE = "Content-Type";
/**
* The HTTP Accept-Encoding header.
*/
String ACCEPT_ENCODING_HEADER = "Accept-Encoding";
/**
* The HTTP Content-Encoding header.
*/
String CONTENT_ENCODING_HEADER = "Content-Encoding";
/**
* The GZIP encoding.
*/
String GZIP_ENCODING = "gzip";
/**
* The Deflate encoding.
*/
String DEFLATE_ENCODING = "deflate";
}
@@ -1,75 +0,0 @@
/*
* Copyright 2013-2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.ribbon;
import java.util.Map;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory;
import org.springframework.cloud.netflix.ribbon.RibbonLoadBalancedRetryPolicyFactory;
import org.springframework.cloud.netflix.ribbon.ServerIntrospector;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import org.springframework.util.ConcurrentReferenceHashMap;
import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.ILoadBalancer;
/**
* Factory for SpringLoadBalancer instances that caches the entries created.
*
* @author Spencer Gibb
* @author Dave Syer
*/
public class CachingSpringLoadBalancerFactory {
private final SpringClientFactory factory;
private final LoadBalancedRetryPolicyFactory loadBalancedRetryPolicyFactory;
private boolean enableRetry = false;
private volatile Map<String, FeignLoadBalancer> cache = new ConcurrentReferenceHashMap<>();
public CachingSpringLoadBalancerFactory(SpringClientFactory factory) {
this.factory = factory;
this.loadBalancedRetryPolicyFactory = new RibbonLoadBalancedRetryPolicyFactory(factory);
}
public CachingSpringLoadBalancerFactory(SpringClientFactory factory,
LoadBalancedRetryPolicyFactory loadBalancedRetryPolicyFactory) {
this.factory = factory;
this.loadBalancedRetryPolicyFactory = loadBalancedRetryPolicyFactory;
}
public CachingSpringLoadBalancerFactory(SpringClientFactory factory,
LoadBalancedRetryPolicyFactory loadBalancedRetryPolicyFactory, boolean enableRetry) {
this.factory = factory;
this.loadBalancedRetryPolicyFactory = loadBalancedRetryPolicyFactory;
this.enableRetry = enableRetry;
}
public FeignLoadBalancer create(String clientName) {
if (this.cache.containsKey(clientName)) {
return this.cache.get(clientName);
}
IClientConfig config = this.factory.getClientConfig(clientName);
ILoadBalancer lb = this.factory.getLoadBalancer(clientName);
ServerIntrospector serverIntrospector = this.factory.getInstance(clientName, ServerIntrospector.class);
FeignLoadBalancer client = enableRetry ? new RetryableFeignLoadBalancer(lb, config, serverIntrospector,
loadBalancedRetryPolicyFactory) : new FeignLoadBalancer(lb, config, serverIntrospector);
this.cache.put(clientName, client);
return client;
}
}
@@ -1,38 +0,0 @@
/*
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.
*
*/
package org.springframework.cloud.netflix.feign.ribbon;
import feign.Client;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author Spencer Gibb
*/
@Configuration
class DefaultFeignLoadBalancedConfiguration {
@Bean
@ConditionalOnMissingBean
public Client feignClient(CachingSpringLoadBalancerFactory cachingFactory,
SpringClientFactory clientFactory) {
return new LoadBalancerFeignClient(new Client.Default(null, null),
cachingFactory, clientFactory);
}
}
@@ -1,215 +0,0 @@
/*
* Copyright 2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.ribbon;
import feign.Client;
import feign.Request;
import feign.Response;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.cloud.netflix.ribbon.ServerIntrospector;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpRequest;
import com.netflix.client.AbstractLoadBalancerAwareClient;
import com.netflix.client.ClientException;
import com.netflix.client.ClientRequest;
import com.netflix.client.IResponse;
import com.netflix.client.RequestSpecificRetryHandler;
import com.netflix.client.RetryHandler;
import com.netflix.client.config.CommonClientConfigKey;
import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.ILoadBalancer;
import com.netflix.loadbalancer.Server;
import static org.springframework.cloud.netflix.ribbon.RibbonUtils.updateToHttpsIfNeeded;
public class FeignLoadBalancer extends
AbstractLoadBalancerAwareClient<FeignLoadBalancer.RibbonRequest, FeignLoadBalancer.RibbonResponse> {
protected int connectTimeout;
protected int readTimeout;
protected IClientConfig clientConfig;
protected ServerIntrospector serverIntrospector;
public FeignLoadBalancer(ILoadBalancer lb, IClientConfig clientConfig,
ServerIntrospector serverIntrospector) {
super(lb, clientConfig);
this.setRetryHandler(RetryHandler.DEFAULT);
this.clientConfig = clientConfig;
this.connectTimeout = clientConfig.get(CommonClientConfigKey.ConnectTimeout);
this.readTimeout = clientConfig.get(CommonClientConfigKey.ReadTimeout);
this.serverIntrospector = serverIntrospector;
}
@Override
public RibbonResponse execute(RibbonRequest request, IClientConfig configOverride)
throws IOException {
Request.Options options;
if (configOverride != null) {
options = new Request.Options(
configOverride.get(CommonClientConfigKey.ConnectTimeout,
this.connectTimeout),
(configOverride.get(CommonClientConfigKey.ReadTimeout,
this.readTimeout)));
}
else {
options = new Request.Options(this.connectTimeout, this.readTimeout);
}
Response response = request.client().execute(request.toRequest(), options);
return new RibbonResponse(request.getUri(), response);
}
@Override
public RequestSpecificRetryHandler getRequestSpecificRetryHandler(
RibbonRequest request, IClientConfig requestConfig) {
if (this.clientConfig.get(CommonClientConfigKey.OkToRetryOnAllOperations,
false)) {
return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(),
requestConfig);
}
if (!request.toRequest().method().equals("GET")) {
return new RequestSpecificRetryHandler(true, false, this.getRetryHandler(),
requestConfig);
}
else {
return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(),
requestConfig);
}
}
@Override
public URI reconstructURIWithServer(Server server, URI original) {
URI uri = updateToHttpsIfNeeded(original, this.clientConfig, this.serverIntrospector, server);
return super.reconstructURIWithServer(server, uri);
}
static class RibbonRequest extends ClientRequest implements Cloneable {
private final Request request;
private final Client client;
RibbonRequest(Client client, Request request, URI uri) {
this.client = client;
setUri(uri);
this.request = toRequest(request);
}
private Request toRequest(Request request) {
Map<String, Collection<String>> headers = new LinkedHashMap<>(
request.headers());
return Request.create(request.method(),getUri().toASCIIString(),headers,request.body(),request.charset());
}
Request toRequest() {
return toRequest(this.request);
}
Client client() {
return this.client;
}
HttpRequest toHttpRequest() {
return new HttpRequest() {
@Override
public HttpMethod getMethod() {
return HttpMethod.resolve(RibbonRequest.this.toRequest().method());
}
@Override
public URI getURI() {
return RibbonRequest.this.getUri();
}
@Override
public HttpHeaders getHeaders() {
Map<String, List<String>> headers = new HashMap<String, List<String>>();
Map<String, Collection<String>> feignHeaders = RibbonRequest.this.toRequest().headers();
for(String key : feignHeaders.keySet()) {
headers.put(key, new ArrayList<String>(feignHeaders.get(key)));
}
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.putAll(headers);
return httpHeaders;
}
};
}
@Override
public Object clone() {
return new RibbonRequest(this.client, this.request, getUri());
}
}
static class RibbonResponse implements IResponse {
private final URI uri;
private final Response response;
RibbonResponse(URI uri, Response response) {
this.uri = uri;
this.response = response;
}
@Override
public Object getPayload() throws ClientException {
return this.response.body();
}
@Override
public boolean hasPayload() {
return this.response.body() != null;
}
@Override
public boolean isSuccess() {
return this.response.status() == 200;
}
@Override
public URI getRequestedURI() {
return this.uri;
}
@Override
public Map<String, Collection<String>> getHeaders() {
return this.response.headers();
}
Response toResponse() {
return this.response;
}
@Override
public void close() throws IOException {
if (this.response != null && this.response.body() != null) {
this.response.body().close();
}
}
}
}
@@ -1,119 +0,0 @@
/*
*
* * Copyright 2013-2016 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
* *
* * 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.
*
*/
package org.springframework.cloud.netflix.feign.ribbon;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.InterceptorRetryPolicy;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryContext;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy;
import org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser;
import org.springframework.http.HttpRequest;
import org.springframework.retry.RetryContext;
/**
* @author Ryan Baxter
*/
public class FeignRetryPolicy extends InterceptorRetryPolicy {
private HttpRequest request;
private String serviceId;
public FeignRetryPolicy(HttpRequest request, LoadBalancedRetryPolicy policy, ServiceInstanceChooser serviceInstanceChooser, String serviceName) {
super(request, policy, serviceInstanceChooser, serviceName);
this.request = request;
this.serviceId = serviceName;
}
@Override
public boolean canRetry(RetryContext context) {
/*
* In InterceptorRetryPolicy.canRetry we ask the LoadBalancer to choose a server if one is not
* set in the retry context and then return true. RetryTemplat calls the canRetry method of
* the policy even on its first execution. So the fact that we didnt have a service instance set
* in the RetryContext signaled that it was the first execution and we should return true.
*
* In the Feign scenario, Feign as actually already queried the load balancer for a service instance
* and we set that service instance in the context when we call the open method of the policy. So in
* the Feign case we just return true if the retry count is 0 indicating we haven't yet made a failed
* request.
*/
if(context.getRetryCount() == 0) {
return true;
}
return super.canRetry(context);
}
@Override
public RetryContext open(RetryContext parent) {
/*
* With Feign (unlike Ribbon) the request already has the URI for the service instance
* we are going to make the request to, so extract that information and set the service
* instance in the context. In the Ribbon scenario the URI in the request object still has
* the service id so we choose and set the service instance later on.
*/
LoadBalancedRetryContext context = new LoadBalancedRetryContext(parent, this.request);
context.setServiceInstance(new FeignRetryPolicyServiceInstance(serviceId, request));
return context;
}
class FeignRetryPolicyServiceInstance implements ServiceInstance {
private String serviceId;
private HttpRequest request;
private Map<String, String> metadata;
FeignRetryPolicyServiceInstance(String serviceId, HttpRequest request) {
this.serviceId = serviceId;
this.request = request;
this.metadata = new HashMap<String, String>();
}
@Override
public String getServiceId() {
return serviceId;
}
@Override
public String getHost() {
return request.getURI().getHost();
}
@Override
public int getPort() {
return request.getURI().getPort();
}
@Override
public boolean isSecure() {
return "https".equals(request.getURI().getScheme());
}
@Override
public URI getUri() {
return request.getURI();
}
@Override
public Map<String, String> getMetadata() {
return metadata;
}
}
}
@@ -1,74 +0,0 @@
/*
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.
*/
package org.springframework.cloud.netflix.feign.ribbon;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory;
import org.springframework.cloud.netflix.feign.FeignAutoConfiguration;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import com.netflix.loadbalancer.ILoadBalancer;
import feign.Feign;
import feign.Request;
/**
* Autoconfiguration to be activated if Feign is in use and needs to be use Ribbon as a
* load balancer.
*
* @author Dave Syer
*/
@ConditionalOnClass({ ILoadBalancer.class, Feign.class })
@Configuration
@AutoConfigureBefore(FeignAutoConfiguration.class)
//Order is important here, last should be the default, first should be optional
// see https://github.com/spring-cloud/spring-cloud-netflix/issues/2086#issuecomment-316281653
@Import({ HttpClientFeignLoadBalancedConfiguration.class,
OkHttpFeignLoadBalancedConfiguration.class,
DefaultFeignLoadBalancedConfiguration.class })
public class FeignRibbonClientAutoConfiguration {
@Bean
@Primary
@ConditionalOnMissingClass("org.springframework.retry.support.RetryTemplate")
public CachingSpringLoadBalancerFactory cachingLBClientFactory(
SpringClientFactory factory) {
return new CachingSpringLoadBalancerFactory(factory);
}
@Bean
@Primary
@ConditionalOnClass(name = "org.springframework.retry.support.RetryTemplate")
public CachingSpringLoadBalancerFactory retryabeCachingLBClientFactory(
SpringClientFactory factory, LoadBalancedRetryPolicyFactory retryPolicyFactory) {
return new CachingSpringLoadBalancerFactory(factory, retryPolicyFactory, true);
}
@Bean
@ConditionalOnMissingBean
public Request.Options feignRequestOptions() {
return LoadBalancerFeignClient.DEFAULT_OPTIONS;
}
}
@@ -1,54 +0,0 @@
/*
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.
*
*/
package org.springframework.cloud.netflix.feign.ribbon;
import feign.Client;
import feign.httpclient.ApacheHttpClient;
import org.apache.http.client.HttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author Spencer Gibb
*/
@Configuration
@ConditionalOnClass(ApacheHttpClient.class)
@ConditionalOnProperty(value = "feign.httpclient.enabled", matchIfMissing = true)
class HttpClientFeignLoadBalancedConfiguration {
@Autowired(required = false)
private HttpClient httpClient;
@Bean
@ConditionalOnMissingBean(Client.class)
public Client feignClient(CachingSpringLoadBalancerFactory cachingFactory,
SpringClientFactory clientFactory) {
ApacheHttpClient delegate;
if (this.httpClient != null) {
delegate = new ApacheHttpClient(this.httpClient);
} else {
delegate = new ApacheHttpClient();
}
return new LoadBalancerFeignClient(delegate, cachingFactory, clientFactory);
}
}
@@ -1,126 +0,0 @@
/*
* Copyright 2015 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
*
* 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.
*/
package org.springframework.cloud.netflix.feign.ribbon;
import java.io.IOException;
import java.net.URI;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import com.netflix.client.ClientException;
import com.netflix.client.config.CommonClientConfigKey;
import com.netflix.client.config.DefaultClientConfigImpl;
import com.netflix.client.config.IClientConfig;
import feign.Client;
import feign.Request;
import feign.Response;
/**
* @author Dave Syer
*
*/
public class LoadBalancerFeignClient implements Client {
static final Request.Options DEFAULT_OPTIONS = new Request.Options();
private final Client delegate;
private CachingSpringLoadBalancerFactory lbClientFactory;
private SpringClientFactory clientFactory;
public LoadBalancerFeignClient(Client delegate,
CachingSpringLoadBalancerFactory lbClientFactory,
SpringClientFactory clientFactory) {
this.delegate = delegate;
this.lbClientFactory = lbClientFactory;
this.clientFactory = clientFactory;
}
@Override
public Response execute(Request request, Request.Options options) throws IOException {
try {
URI asUri = URI.create(request.url());
String clientName = asUri.getHost();
URI uriWithoutHost = cleanUrl(request.url(), clientName);
FeignLoadBalancer.RibbonRequest ribbonRequest = new FeignLoadBalancer.RibbonRequest(
this.delegate, request, uriWithoutHost);
IClientConfig requestConfig = getClientConfig(options, clientName);
return lbClient(clientName).executeWithLoadBalancer(ribbonRequest,
requestConfig).toResponse();
}
catch (ClientException e) {
IOException io = findIOException(e);
if (io != null) {
throw io;
}
throw new RuntimeException(e);
}
}
IClientConfig getClientConfig(Request.Options options, String clientName) {
IClientConfig requestConfig;
if (options == DEFAULT_OPTIONS) {
requestConfig = this.clientFactory.getClientConfig(clientName);
} else {
requestConfig = new FeignOptionsClientConfig(options);
}
return requestConfig;
}
protected IOException findIOException(Throwable t) {
if (t == null) {
return null;
}
if (t instanceof IOException) {
return (IOException) t;
}
return findIOException(t.getCause());
}
public Client getDelegate() {
return this.delegate;
}
static URI cleanUrl(String originalUrl, String host) {
return URI.create(originalUrl.replaceFirst(host, ""));
}
private FeignLoadBalancer lbClient(String clientName) {
return this.lbClientFactory.create(clientName);
}
static class FeignOptionsClientConfig extends DefaultClientConfigImpl {
public FeignOptionsClientConfig(Request.Options options) {
setProperty(CommonClientConfigKey.ConnectTimeout,
options.connectTimeoutMillis());
setProperty(CommonClientConfigKey.ReadTimeout, options.readTimeoutMillis());
}
@Override
public void loadProperties(String clientName) {
}
@Override
public void loadDefaultValues() {
}
}
}
@@ -1,53 +0,0 @@
/*
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.
*
*/
package org.springframework.cloud.netflix.feign.ribbon;
import feign.Client;
import feign.okhttp.OkHttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author Spencer Gibb
*/
@Configuration
@ConditionalOnClass(OkHttpClient.class)
@ConditionalOnProperty(value = "feign.okhttp.enabled", matchIfMissing = true)
class OkHttpFeignLoadBalancedConfiguration {
@Autowired(required = false)
private okhttp3.OkHttpClient okHttpClient;
@Bean
@ConditionalOnMissingBean(Client.class)
public Client feignClient(CachingSpringLoadBalancerFactory cachingFactory,
SpringClientFactory clientFactory) {
OkHttpClient delegate;
if (this.okHttpClient != null) {
delegate = new OkHttpClient(this.okHttpClient);
} else {
delegate = new OkHttpClient();
}
return new LoadBalancerFeignClient(delegate, cachingFactory, clientFactory);
}
}
@@ -1,113 +0,0 @@
/*
*
* * Copyright 2013-2016 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
* *
* * 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.
*
*/
package org.springframework.cloud.netflix.feign.ribbon;
import feign.Request;
import feign.Response;
import java.io.IOException;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryContext;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy;
import org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicyFactory;
import org.springframework.cloud.client.loadbalancer.RetryableStatusCodeException;
import org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser;
import org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient;
import org.springframework.cloud.netflix.ribbon.ServerIntrospector;
import org.springframework.retry.RetryCallback;
import org.springframework.retry.RetryContext;
import org.springframework.retry.policy.NeverRetryPolicy;
import org.springframework.retry.support.RetryTemplate;
import com.netflix.client.DefaultLoadBalancerRetryHandler;
import com.netflix.client.RequestSpecificRetryHandler;
import com.netflix.client.config.CommonClientConfigKey;
import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.ILoadBalancer;
import com.netflix.loadbalancer.Server;
/**
* A {@link FeignLoadBalancer} that leverages Spring Retry to retry failed requests.
* @author Ryan Baxter
*/
public class RetryableFeignLoadBalancer extends FeignLoadBalancer implements ServiceInstanceChooser {
private final LoadBalancedRetryPolicyFactory loadBalancedRetryPolicyFactory;
public RetryableFeignLoadBalancer(ILoadBalancer lb, IClientConfig clientConfig,
ServerIntrospector serverIntrospector, LoadBalancedRetryPolicyFactory loadBalancedRetryPolicyFactory) {
super(lb, clientConfig, serverIntrospector);
this.loadBalancedRetryPolicyFactory = loadBalancedRetryPolicyFactory;
this.setRetryHandler(new DefaultLoadBalancerRetryHandler(clientConfig));
}
@Override
public RibbonResponse execute(final RibbonRequest request, IClientConfig configOverride)
throws IOException {
final Request.Options options;
if (configOverride != null) {
options = new Request.Options(
configOverride.get(CommonClientConfigKey.ConnectTimeout,
this.connectTimeout),
(configOverride.get(CommonClientConfigKey.ReadTimeout,
this.readTimeout)));
}
else {
options = new Request.Options(this.connectTimeout, this.readTimeout);
}
final LoadBalancedRetryPolicy retryPolicy = loadBalancedRetryPolicyFactory.create(this.getClientName(), this);
RetryTemplate retryTemplate = new RetryTemplate();
retryTemplate.setRetryPolicy(retryPolicy == null ? new NeverRetryPolicy()
: new FeignRetryPolicy(request.toHttpRequest(), retryPolicy, this, this.getClientName()));
return retryTemplate.execute(new RetryCallback<RibbonResponse, IOException>() {
@Override
public RibbonResponse doWithRetry(RetryContext retryContext) throws IOException {
Request feignRequest = null;
//on retries the policy will choose the server and set it in the context
//extract the server and update the request being made
if(retryContext instanceof LoadBalancedRetryContext) {
ServiceInstance service = ((LoadBalancedRetryContext)retryContext).getServiceInstance();
if(service != null) {
feignRequest = ((RibbonRequest)request.replaceUri(reconstructURIWithServer(new Server(service.getHost(), service.getPort()), request.getUri()))).toRequest();
}
}
if(feignRequest == null) {
feignRequest = request.toRequest();
}
Response response = request.client().execute(feignRequest, options);
if(retryPolicy.retryableStatusCode(response.status())) {
response.close();
throw new RetryableStatusCodeException(RetryableFeignLoadBalancer.this.getClientName(), response.status());
}
return new RibbonResponse(request.getUri(), response);
}
});
}
@Override
public RequestSpecificRetryHandler getRequestSpecificRetryHandler(
FeignLoadBalancer.RibbonRequest request, IClientConfig requestConfig) {
return new RequestSpecificRetryHandler(false, false, this.getRetryHandler(), requestConfig);
}
@Override
public ServiceInstance choose(String serviceId) {
return new RibbonLoadBalancerClient.RibbonServer(serviceId,
this.getLoadBalancer().chooseServer(serviceId));
}
}
@@ -1,55 +0,0 @@
package org.springframework.cloud.netflix.feign.support;
import com.netflix.hystrix.HystrixCommand;
import com.netflix.hystrix.HystrixCommandGroupKey;
import com.netflix.hystrix.HystrixThreadPoolKey;
/**
* Convenience class for implementing feign fallbacks that return {@link HystrixCommand}.
* Also useful for return types of {@link rx.Observable} and {@link java.util.concurrent.Future}.
* For those return types, just call {@link FallbackCommand#observe()} or {@link FallbackCommand#queue()} respectively.
* @author Spencer Gibb
*/
public class FallbackCommand<T> extends HystrixCommand<T> {
private T result;
public FallbackCommand(T result) {
this(result, "fallback");
}
protected FallbackCommand(T result, String groupname) {
super(HystrixCommandGroupKey.Factory.asKey(groupname));
this.result = result;
}
public FallbackCommand(T result, HystrixCommandGroupKey group) {
super(group);
this.result = result;
}
public FallbackCommand(T result, HystrixCommandGroupKey group, int executionIsolationThreadTimeoutInMilliseconds) {
super(group, executionIsolationThreadTimeoutInMilliseconds);
this.result = result;
}
public FallbackCommand(T result, HystrixCommandGroupKey group, HystrixThreadPoolKey threadPool) {
super(group, threadPool);
this.result = result;
}
public FallbackCommand(T result, HystrixCommandGroupKey group, HystrixThreadPoolKey threadPool, int executionIsolationThreadTimeoutInMilliseconds) {
super(group, threadPool, executionIsolationThreadTimeoutInMilliseconds);
this.result = result;
}
public FallbackCommand(T result, Setter setter) {
super(setter);
this.result = result;
}
@Override
protected T run() throws Exception {
return this.result;
}
}

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