diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index e65ee4533..000000000
--- a/.editorconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-# EditorConfig is awesome: https://EditorConfig.org
-
-# top-most EditorConfig file
-root = true
-
-[*]
-indent_style = tab
-indent_size = 4
-end_of_line = lf
-insert_final_newline = true
-
-[*.yml]
-indent_style = space
-indent_size = 2
diff --git a/.flattened-pom.xml b/.flattened-pom.xml
new file mode 100644
index 000000000..85a754f61
--- /dev/null
+++ b/.flattened-pom.xml
@@ -0,0 +1,134 @@
+
+
+ 4.0.0
+
+ org.springframework.cloud
+ spring-cloud-build
+ 4.1.0-SNAPSHOT
+
+
+ org.springframework.cloud
+ spring-cloud-openfeign
+ 4.1.0-SNAPSHOT
+ pom
+ Spring Cloud OpenFeign
+ Spring Cloud OpenFeign
+ https://spring.io/spring-cloud/spring-cloud-openfeign
+
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+
+
+ Apache License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0
+ Copyright 2014-2021 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.
+
+
+
+
+ dsyer
+ Dave Syer
+ dsyer at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ lead
+
+
+
+ sgibb
+ Spencer Gibb
+ sgibb at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ lead
+
+
+
+ mgrzejszczak
+ Marcin Grzejszczak
+ mgrzejszczak at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+ rbaxter
+ Ryan Baxter
+ rbaxter at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+ omaciaszeksharma
+ Olga Maciaszek-Sharma
+ omaciaszeksharma at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+
+ scm:git:git://github.com/spring-cloud/spring-cloud-openfeign.git
+ scm:git:ssh://git@github.com/spring-cloud/spring-cloud-openfeign.git
+ https://github.com/spring-cloud/spring-cloud-openfeign
+
+
+
+ spring
+
+
+
+ false
+
+
+ true
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/snapshot
+
+
+
+ false
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+
+
+ false
+
+ spring-releases
+ Spring Releases
+ https://repo.spring.io/release
+
+
+
+
+
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
deleted file mode 100644
index b44059e78..000000000
--- a/.github/CONTRIBUTING.md
+++ /dev/null
@@ -1,45 +0,0 @@
-
-# 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 main. 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/main/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/main/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 main (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).
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 0bc5ef4fa..000000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index aeafef9d3..000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: ''
-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.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index bbcbbe7d6..000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-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.
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
new file mode 100644
index 000000000..442ed264b
--- /dev/null
+++ b/.github/workflows/deploy-docs.yml
@@ -0,0 +1,53 @@
+name: Deploy Docs
+run-name: ${{ format('{0} ({1})', github.workflow, github.event.inputs.build-refname || 'all') }}
+on:
+ workflow_dispatch:
+ inputs:
+ build-refname:
+ description: Enter git refname to build (e.g., 5.7.x).
+ required: false
+ push:
+ branches: docs-build
+env:
+ GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
+permissions:
+ contents: write
+jobs:
+ build:
+ if: github.repository_owner == 'spring-cloud'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 5
+ - name: Set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ - name: Set up refname build
+ if: github.event.inputs.build-refname
+ run: |
+ git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }}
+ export BUILD_REFNAME=${{ github.event.inputs.build-refname }}
+ echo "BUILD_REFNAME=$BUILD_REFNAME" >> $GITHUB_ENV
+ export BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:pom.xml | python3 -c "import xml.etree.ElementTree as xml; from sys import stdin; print(xml.parse(stdin).getroot().find('{http://maven.apache.org/POM/4.0.0}version').text)")
+ echo BUILD_VERSION=$BUILD_VERSION >> $GITHUB_ENV
+ - name: Run Antora
+ run: |
+ ./mvnw --no-transfer-progress -B antora -Pdocs
+ - name: Publish Docs
+ uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.15
+ with:
+ docs-username: ${{ secrets.DOCS_USERNAME }}
+ docs-host: ${{ secrets.DOCS_HOST }}
+ docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }}
+ docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }}
+ site-path: target/antora/site
+ - name: Bust Cloudflare Cache
+ uses: spring-io/spring-doc-actions/bust-cloudflare-antora-cache@v0.0.15
+ with:
+ context-root: spring-cloud-openfeign
+ cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
+ cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
deleted file mode 100644
index 4cffe942d..000000000
--- a/.github/workflows/maven.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-# This workflow will build a Java project with Maven
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
-
-name: Build
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- java: ["17"]
-
- steps:
- - uses: actions/checkout@v2
- - name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v2
- with:
- distribution: 'zulu'
- java-version: ${{ matrix.java }}
- cache: 'maven'
- - name: Build with Maven
- run: ./mvnw clean install -B -U -P sonar
- - uses: codecov/codecov-action@v1
- with:
- fail_ci_if_error: true
diff --git a/.gitignore b/.gitignore
index 8a860b408..360a846b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,22 @@
-*~
-#*
-*#
-.#*
-.classpath
-.project
+target/
.settings/
+.project
+.classpath
+*.orig
.springBeans
-target/
-bin/
-_site/
-.idea
+.factorypath
+.sts4-cache
+.ant-targets-build.xml
+src/ant/.ant-targets-upload-dist.xml
+*.sonar4clipse*
+.DS_Store
*.iml
*.ipr
*.iws
-.factorypath
-*.log
-.shelf
-*.swp
-*.swo
-.vscode/
-.flattened-pom.xml
-
+/.idea/
+*.graphml
+node
+node_modules
+build
+docs/package.json
+package-lock.json
diff --git a/.java-version b/.java-version
deleted file mode 100644
index 98d9bcb75..000000000
--- a/.java-version
+++ /dev/null
@@ -1 +0,0 @@
-17
diff --git a/.mvn/maven.config b/.mvn/maven.config
deleted file mode 100644
index 4b9372844..000000000
--- a/.mvn/maven.config
+++ /dev/null
@@ -1,2 +0,0 @@
--DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local
--P spring
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 000000000..b901097f2
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * 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.
+ */
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ private static final String WRAPPER_VERSION = "0.5.6";
+ /**
+ * 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/"
+ + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".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 directory '" + 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 {
+ if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+ String username = System.getenv("MVNW_USERNAME");
+ char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(username, password);
+ }
+ });
+ }
+ 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();
+ }
+
+}
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
index cb28b0e37..2cc7d4a55 100644
Binary files a/.mvn/wrapper/maven-wrapper.jar and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index ac184013f..642d572ce 100644
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1,18 +1,2 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
-wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
diff --git a/.sdkmanrc b/.sdkmanrc
deleted file mode 100644
index 415f90832..000000000
--- a/.sdkmanrc
+++ /dev/null
@@ -1,3 +0,0 @@
-# Enable auto-env through the sdkman_auto_env config
-# Add key=value pairs of SDKs to use below
-java=17.0.1-tem
diff --git a/.settings.xml b/.settings.xml
deleted file mode 100644
index 03645e8ce..000000000
--- a/.settings.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
- repo.spring.io
- ${env.CI_DEPLOY_USERNAME}
- ${env.CI_DEPLOY_PASSWORD}
-
-
-
-
-
- spring
-
- true
-
-
-
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/libs-snapshot-local
-
- true
-
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/libs-milestone-local
-
- false
-
-
-
- spring-releases
- Spring Releases
- https://repo.spring.io/release
-
- false
-
-
-
-
-
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/libs-snapshot-local
-
- true
-
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/libs-milestone-local
-
- false
-
-
-
-
-
-
diff --git a/.springformat b/.springformat
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Guardfile b/Guardfile
deleted file mode 100644
index d419ab250..000000000
--- a/Guardfile
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'asciidoctor'
-require 'erb'
-
-options = {:mkdirs => true, :safe => :unsafe, :attributes => ['linkcss', 'allow-uri-read']}
-
-guard 'shell' do
- watch(/^docs\/[A-Z-a-z][^#]*\.adoc$/) {|m|
- Asciidoctor.load_file('docs/src/main/asciidoc/README.adoc', :to_file => './README.adoc', safe: :safe, parse: false, attributes: 'allow-uri-read')
- Asciidoctor.render_file('docs/src/main/asciidoc/spring-cloud-netflix.adoc', options.merge(:to_dir => 'target/generated-docs'))
- }
-end
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 62589edd1..000000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- https://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/README.adoc b/README.adoc
index cb097fff2..77ed7a15f 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,360 +1,23 @@
-////
-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.
-////
+= Spring Cloud Openfeign Docs Build
+You're currently viewing the Antora playbook branch.
+The playbook branch hosts the docs build that is used to build and publish the production docs site.
-image::https://github.com/spring-cloud/spring-cloud-openfeign/workflows/Build/badge.svg?branch=main&style=svg["Build",link="https://github.com/spring-cloud/spring-cloud-openfeign/actions"]
+The Spring Cloud Openfeign reference docs are built using https://antora.org[Antora].
+This README covers how to build the docs in a software branch as well as how to build the production docs site locally.
-image:https://codecov.io/gh/spring-cloud/spring-cloud-openfeign/branch/main/graph/badge.svg["Codecov", link="https://codecov.io/gh/spring-cloud/spring-cloud-openfeign"]
+== Building the Site
-image:https://api.codacy.com/project/badge/Grade/97b04c4e609c4b4f86b415e4437a6484["Codacy code quality", link="https://www.codacy.com/app/Spring-Cloud/spring-cloud-openfeign?utm_source=github.com&utm_medium=referral&utm_content=spring-cloud/spring-cloud-openfeign&utm_campaign=Badge_Grade"]
+You can build the entire site by invoking the following on the docs-build branch and then viewing the site at `target/site/index.html`
-: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 OpenFeign
-:all: {asterisk}{asterisk}
-
-:core_path: {project-root}/spring-cloud-openfeign-core
-
-This project provides OpenFeign integrations for Spring Boot apps through autoconfiguration
-and binding to the Spring Environment and other Spring programming model idioms.
-
-
-== Features
-
-* Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
-
-== Building
-
-
-:jdkversion: 17
-
-=== 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.
-
-The projects that require middleware (i.e. Redis) for testing generally
-require that a local instance of [Docker](https://www.docker.com/get-started) is installed and running.
-
-
-=== 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.
-
-==== Activate the Spring Maven profile
-Spring Cloud projects require the 'spring' Maven profile to be activated to resolve
-the spring milestone and snapshot repositories. Use your preferred IDE to set this
-profile to be active, or you may experience build errors.
-
-==== 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]
+[source,bash]
----
- $ ./mvnw eclipse:eclipse
+./mvnw antora
----
-The generated eclipse projects can be imported by selecting `import existing projects`
-from the `file` menu.
-
-
-
-== 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.
+== Building a Specific Branch
-=== 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/
+[source,bash]
----
-└── src
- ├── checkstyle
- │ └── checkstyle-suppressions.xml <3>
- └── main
- └── resources
- ├── checkstyle-header.txt <2>
- └── checkstyle.xml <1>
+./mvnw antora
----
-<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
-----
-
-true <1>
- true
- <2>
- true
- <3>
-
-
-
-
- <4>
- io.spring.javaformat
- spring-javaformat-maven-plugin
-
- <5>
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
-
-
-
-
- <5>
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
-
-
-
-----
-<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
-----
-
-
-
-
-
-
-----
-
-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.
-
-=== Duplicate Finder
-
-Spring Cloud Build brings along the `basepom:duplicate-finder-maven-plugin`, that enables flagging duplicate and conflicting classes and resources on the java classpath.
-
-==== Duplicate Finder configuration
-
-Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the projecst's `pom.xml`.
-
-.pom.xml
-[source,xml]
-----
-
-
-
- org.basepom.maven
- duplicate-finder-maven-plugin
-
-
-
-----
-
-For other properties, we have set defaults as listed in the https://github.com/basepom/duplicate-finder-maven-plugin/wiki[plugin documentation].
-
-You can easily override them but setting the value of the selected property prefixed with `duplicate-finder-maven-plugin`. For example, set `duplicate-finder-maven-plugin.skip` to `true` in order to skip duplicates check in your build.
-
-If you need to add `ignoredClassPatterns` or `ignoredResourcePatterns` to your setup, make sure to add them in the plugin configuration section of your project:
-
-[source,xml]
-----
-
-
-
- org.basepom.maven
- duplicate-finder-maven-plugin
-
-
- org.joda.time.base.BaseDateTime
- .*module-info
-
-
- changelog.txt
-
-
-
-
-
-
-
-----
-
-
-== License
-
-The project license file is available https://raw.githubusercontent.com/spring-cloud/spring-cloud-openfeign/main/LICENSE.txt[here].
diff --git a/antora-playbook.yml b/antora-playbook.yml
new file mode 100644
index 000000000..ad10e61f2
--- /dev/null
+++ b/antora-playbook.yml
@@ -0,0 +1,39 @@
+antora:
+ extensions:
+ - require: '@springio/antora-extensions'
+ root_component_name: 'cloud-openfeign'
+site:
+ title: Spring Cloud Openfeign
+ url: https://docs.spring.io/spring-cloud-openfeign/reference
+ robots: allow
+git:
+ ensure_git_suffix: false
+content:
+ sources:
+ - url: https://github.com/spring-cloud/spring-cloud-openfeign
+ # Refname matching:
+ # https://docs.antora.org/antora/latest/playbook/content-refname-matching/
+ branches: [ main, 4.3.x, 4.2.x ]
+ tags: [ 'v{4..9}.+({0..9}).+({0..9})?(-{RC,M}*)', '!v4.1.0-M1', '!v4.0.*' ]
+ start_path: docs
+asciidoc:
+ attributes:
+ page-stackoverflow-url: https://stackoverflow.com/tags/spring-cloud
+ page-pagination: ''
+ hide-uri-scheme: '@'
+ tabs-sync-option: '@'
+ extensions:
+ - '@asciidoctor/tabs'
+ - '@springio/asciidoctor-extensions'
+urls:
+ latest_version_segment_strategy: redirect:to
+ latest_version_segment: ''
+ redirect_facility: httpd
+ui:
+ bundle:
+ url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.18/ui-bundle.zip
+ snapshot: true
+runtime:
+ log:
+ failure_level: warn
+ format: pretty
diff --git a/asciidoctor.css b/asciidoctor.css
deleted file mode 100644
index f592f50af..000000000
--- a/asciidoctor.css
+++ /dev/null
@@ -1,2011 +0,0 @@
-/* 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
-}
-
-audio, canvas, video {
- display: inline-block
-}
-
-audio:not([controls]) {
- display: none;
- height: 0
-}
-
-[hidden], template {
- display: none
-}
-
-script {
- display: none !important
-}
-
-html {
- font-family: sans-serif;
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%
-}
-
-body {
- margin: 0
-}
-
-a {
- background: transparent
-}
-
-a:focus {
- outline: thin dotted
-}
-
-a:active, a:hover {
- outline: 0
-}
-
-h1 {
- font-size: 2em;
- margin: .67em 0
-}
-
-abbr[title] {
- border-bottom: 1px dotted
-}
-
-b, strong {
- font-weight: bold
-}
-
-dfn {
- font-style: italic
-}
-
-hr {
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- height: 0
-}
-
-mark {
- background: #ff0;
- color: #000
-}
-
-code, kbd, pre, samp {
- font-family: monospace;
- font-size: 1em
-}
-
-pre {
- white-space: pre-wrap
-}
-
-q {
- quotes: "\201C" "\201D" "\2018" "\2019"
-}
-
-small {
- font-size: 80%
-}
-
-sub, sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline
-}
-
-sup {
- top: -.5em
-}
-
-sub {
- bottom: -.25em
-}
-
-img {
- border: 0
-}
-
-svg:not(:root) {
- overflow: hidden
-}
-
-figure {
- margin: 0
-}
-
-fieldset {
- border: 1px solid silver;
- margin: 0 2px;
- padding: .35em .625em .75em
-}
-
-legend {
- border: 0;
- padding: 0
-}
-
-button, input, select, textarea {
- font-family: inherit;
- font-size: 100%;
- margin: 0
-}
-
-button, input {
- line-height: normal
-}
-
-button, select {
- text-transform: none
-}
-
-button, html input[type="button"], input[type="reset"], input[type="submit"] {
- -webkit-appearance: button;
- cursor: pointer
-}
-
-button[disabled], html input[disabled] {
- cursor: default
-}
-
-input[type="checkbox"], input[type="radio"] {
- box-sizing: border-box;
- padding: 0
-}
-
-input[type="search"] {
- -webkit-appearance: textfield;
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box;
- box-sizing: content-box
-}
-
-input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none
-}
-
-button::-moz-focus-inner, input::-moz-focus-inner {
- border: 0;
- padding: 0
-}
-
-textarea {
- overflow: auto;
- vertical-align: top
-}
-
-table {
- border-collapse: collapse;
- border-spacing: 0
-}
-
-*, *:before, *:after {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box
-}
-
-html, body {
- font-size: 100%
-}
-
-body {
- background: #fff;
- color: rgba(0, 0, 0, .8);
- padding: 0;
- margin: 0;
- font-family: "Noto Serif", "DejaVu Serif", serif;
- font-weight: 400;
- font-style: normal;
- line-height: 1;
- position: relative;
- cursor: auto
-}
-
-a:hover {
- cursor: pointer
-}
-
-img, object, embed {
- max-width: 100%;
- height: auto
-}
-
-object, embed {
- height: 100%
-}
-
-img {
- -ms-interpolation-mode: bicubic
-}
-
-#map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object {
- max-width: none !important
-}
-
-.left {
- float: left !important
-}
-
-.right {
- float: right !important
-}
-
-.text-left {
- text-align: left !important
-}
-
-.text-right {
- text-align: right !important
-}
-
-.text-center {
- text-align: center !important
-}
-
-.text-justify {
- text-align: justify !important
-}
-
-.hide {
- display: none
-}
-
-.antialiased, body {
- -webkit-font-smoothing: antialiased
-}
-
-img {
- display: inline-block;
- vertical-align: middle
-}
-
-textarea {
- height: auto;
- min-height: 50px
-}
-
-select {
- width: 100%
-}
-
-p.lead, .paragraph.lead > p, #preamble > .sectionbody > .paragraph:first-of-type p {
- font-size: 1.21875em;
- line-height: 1.6
-}
-
-.subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title {
- line-height: 1.45;
- color: #7a2518;
- font-weight: 400;
- margin-top: 0;
- margin-bottom: .25em
-}
-
-div, dl, dt, dd, ul, ol, li, h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6, pre, form, p, blockquote, th, td {
- margin: 0;
- padding: 0;
- direction: ltr
-}
-
-a {
- color: #2156a5;
- text-decoration: underline;
- line-height: inherit
-}
-
-a:hover, a:focus {
- color: #1d4b8f
-}
-
-a img {
- border: none
-}
-
-p {
- font-family: inherit;
- font-weight: 400;
- font-size: 1em;
- line-height: 1.6;
- margin-bottom: 1.25em;
- text-rendering: optimizeLegibility
-}
-
-p aside {
- font-size: .875em;
- line-height: 1.35;
- font-style: italic
-}
-
-h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 {
- font-family: "Open Sans", "DejaVu Sans", sans-serif;
- font-weight: 300;
- font-style: normal;
- color: #ba3925;
- text-rendering: optimizeLegibility;
- margin-top: 1em;
- margin-bottom: .5em;
- line-height: 1.0125em
-}
-
-h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small {
- font-size: 60%;
- color: #e99b8f;
- line-height: 0
-}
-
-h1 {
- font-size: 2.125em
-}
-
-h2 {
- font-size: 1.6875em
-}
-
-h3, #toctitle, .sidebarblock > .content > .title {
- font-size: 1.375em
-}
-
-h4, h5 {
- font-size: 1.125em
-}
-
-h6 {
- font-size: 1em
-}
-
-hr {
- border: solid #ddddd8;
- border-width: 1px 0 0;
- clear: both;
- margin: 1.25em 0 1.1875em;
- height: 0
-}
-
-em, i {
- font-style: italic;
- line-height: inherit
-}
-
-strong, b {
- font-weight: bold;
- line-height: inherit
-}
-
-small {
- font-size: 60%;
- line-height: inherit
-}
-
-code {
- font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
- font-weight: 400;
- color: rgba(0, 0, 0, .9)
-}
-
-ul, ol, dl {
- font-size: 1em;
- line-height: 1.6;
- margin-bottom: 1.25em;
- list-style-position: outside;
- font-family: inherit
-}
-
-ul, ol, ul.no-bullet, ol.no-bullet {
- margin-left: 1.5em
-}
-
-ul li ul, ul li ol {
- margin-left: 1.25em;
- margin-bottom: 0;
- font-size: 1em
-}
-
-ul.square li ul, ul.circle li ul, ul.disc li ul {
- list-style: inherit
-}
-
-ul.square {
- list-style-type: square
-}
-
-ul.circle {
- list-style-type: circle
-}
-
-ul.disc {
- list-style-type: disc
-}
-
-ul.no-bullet {
- list-style: none
-}
-
-ol li ul, ol li ol {
- margin-left: 1.25em;
- margin-bottom: 0
-}
-
-dl dt {
- margin-bottom: .3125em;
- font-weight: bold
-}
-
-dl dd {
- margin-bottom: 1.25em
-}
-
-abbr, acronym {
- text-transform: uppercase;
- font-size: 90%;
- color: rgba(0, 0, 0, .8);
- border-bottom: 1px dotted #ddd;
- cursor: help
-}
-
-abbr {
- text-transform: none
-}
-
-blockquote {
- margin: 0 0 1.25em;
- padding: .5625em 1.25em 0 1.1875em;
- border-left: 1px solid #ddd
-}
-
-blockquote cite {
- display: block;
- font-size: .9375em;
- color: rgba(0, 0, 0, .6)
-}
-
-blockquote cite:before {
- content: "\2014 \0020"
-}
-
-blockquote cite a, blockquote cite a:visited {
- color: rgba(0, 0, 0, .6)
-}
-
-blockquote, blockquote p {
- line-height: 1.6;
- color: rgba(0, 0, 0, .85)
-}
-
-@media only screen and (min-width: 768px) {
- h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 {
- line-height: 1.2
- }
-
- h1 {
- font-size: 2.75em
- }
-
- h2 {
- font-size: 2.3125em
- }
-
- h3, #toctitle, .sidebarblock > .content > .title {
- font-size: 1.6875em
- }
-
- h4 {
- font-size: 1.4375em
- }
-}
-
-table {
- background: #fff;
- margin-bottom: 1.25em;
- border: solid 1px #dedede
-}
-
-table thead, table tfoot {
- background: #f7f8f7;
- font-weight: bold
-}
-
-table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td {
- padding: .5em .625em .625em;
- font-size: inherit;
- color: rgba(0, 0, 0, .8);
- text-align: left
-}
-
-table tr th, table tr td {
- padding: .5625em .625em;
- font-size: inherit;
- color: rgba(0, 0, 0, .8)
-}
-
-table tr.even, table tr.alt, table tr:nth-of-type(even) {
- background: #f8f8f7
-}
-
-table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td {
- display: table-cell;
- line-height: 1.6
-}
-
-h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 {
- line-height: 1.2;
- word-spacing: -.05em
-}
-
-h1 strong, h2 strong, h3 strong, #toctitle strong, .sidebarblock > .content > .title strong, h4 strong, h5 strong, h6 strong {
- font-weight: 400
-}
-
-.clearfix:before, .clearfix:after, .float-group:before, .float-group:after {
- content: " ";
- display: table
-}
-
-.clearfix:after, .float-group:after {
- clear: both
-}
-
-*:not(pre) > code {
- font-size: .9375em;
- font-style: normal !important;
- letter-spacing: 0;
- padding: .1em .5ex;
- word-spacing: -.15em;
- background-color: #f7f7f8;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- line-height: 1.45;
- text-rendering: optimizeSpeed
-}
-
-pre, pre > code {
- line-height: 1.45;
- color: rgba(0, 0, 0, .9);
- font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
- font-weight: 400;
- text-rendering: optimizeSpeed
-}
-
-.keyseq {
- color: rgba(51, 51, 51, .8)
-}
-
-kbd {
- display: inline-block;
- color: rgba(0, 0, 0, .8);
- font-size: .75em;
- line-height: 1.4;
- background-color: #f7f7f7;
- border: 1px solid #ccc;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em white inset;
- box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em #fff inset;
- margin: -.15em .15em 0 .15em;
- padding: .2em .6em .2em .5em;
- vertical-align: middle;
- white-space: nowrap
-}
-
-.keyseq kbd:first-child {
- margin-left: 0
-}
-
-.keyseq kbd:last-child {
- margin-right: 0
-}
-
-.menuseq, .menu {
- color: rgba(0, 0, 0, .8)
-}
-
-b.button:before, b.button:after {
- position: relative;
- top: -1px;
- font-weight: 400
-}
-
-b.button:before {
- content: "[";
- padding: 0 3px 0 2px
-}
-
-b.button:after {
- content: "]";
- padding: 0 2px 0 3px
-}
-
-p a > code:hover {
- color: rgba(0, 0, 0, .9)
-}
-
-#header, #content, #footnotes, #footer {
- width: 100%;
- margin-left: auto;
- margin-right: auto;
- margin-top: 0;
- margin-bottom: 0;
- max-width: 62.5em;
- *zoom: 1;
- position: relative;
- padding-left: .9375em;
- padding-right: .9375em
-}
-
-#header:before, #header:after, #content:before, #content:after, #footnotes:before, #footnotes:after, #footer:before, #footer:after {
- content: " ";
- display: table
-}
-
-#header:after, #content:after, #footnotes:after, #footer:after {
- clear: both
-}
-
-#content {
- margin-top: 1.25em
-}
-
-#content:before {
- content: none
-}
-
-#header > h1:first-child {
- color: rgba(0, 0, 0, .85);
- margin-top: 2.25rem;
- margin-bottom: 0
-}
-
-#header > h1:first-child + #toc {
- margin-top: 8px;
- border-top: 1px solid #ddddd8
-}
-
-#header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) {
- border-bottom: 1px solid #ddddd8;
- padding-bottom: 8px
-}
-
-#header .details {
- border-bottom: 1px solid #ddddd8;
- line-height: 1.45;
- padding-top: .25em;
- padding-bottom: .25em;
- padding-left: .25em;
- color: rgba(0, 0, 0, .6);
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- -ms-flex-flow: row wrap;
- -webkit-flex-flow: row wrap;
- flex-flow: row wrap
-}
-
-#header .details span:first-child {
- margin-left: -.125em
-}
-
-#header .details span.email a {
- color: rgba(0, 0, 0, .85)
-}
-
-#header .details br {
- display: none
-}
-
-#header .details br + span:before {
- content: "\00a0\2013\00a0"
-}
-
-#header .details br + span.author:before {
- content: "\00a0\22c5\00a0";
- color: rgba(0, 0, 0, .85)
-}
-
-#header .details br + span#revremark:before {
- content: "\00a0|\00a0"
-}
-
-#header #revnumber {
- text-transform: capitalize
-}
-
-#header #revnumber:after {
- content: "\00a0"
-}
-
-#content > h1:first-child:not([class]) {
- color: rgba(0, 0, 0, .85);
- border-bottom: 1px solid #ddddd8;
- padding-bottom: 8px;
- margin-top: 0;
- padding-top: 1rem;
- margin-bottom: 1.25rem
-}
-
-#toc {
- border-bottom: 1px solid #efefed;
- padding-bottom: .5em
-}
-
-#toc > ul {
- margin-left: .125em
-}
-
-#toc ul.sectlevel0 > li > a {
- font-style: italic
-}
-
-#toc ul.sectlevel0 ul.sectlevel1 {
- margin: .5em 0
-}
-
-#toc ul {
- font-family: "Open Sans", "DejaVu Sans", sans-serif;
- list-style-type: none
-}
-
-#toc a {
- text-decoration: none
-}
-
-#toc a:active {
- text-decoration: underline
-}
-
-#toctitle {
- color: #7a2518;
- font-size: 1.2em
-}
-
-@media only screen and (min-width: 768px) {
- #toctitle {
- font-size: 1.375em
- }
-
- body.toc2 {
- padding-left: 15em;
- padding-right: 0
- }
-
- #toc.toc2 {
- margin-top: 0 !important;
- background-color: #f8f8f7;
- position: fixed;
- width: 15em;
- left: 0;
- top: 0;
- border-right: 1px solid #efefed;
- border-top-width: 0 !important;
- border-bottom-width: 0 !important;
- z-index: 1000;
- padding: 1.25em 1em;
- height: 100%;
- overflow: auto
- }
-
- #toc.toc2 #toctitle {
- margin-top: 0;
- font-size: 1.2em
- }
-
- #toc.toc2 > ul {
- font-size: .9em;
- margin-bottom: 0
- }
-
- #toc.toc2 ul ul {
- margin-left: 0;
- padding-left: 1em
- }
-
- #toc.toc2 ul.sectlevel0 ul.sectlevel1 {
- padding-left: 0;
- margin-top: .5em;
- margin-bottom: .5em
- }
-
- body.toc2.toc-right {
- padding-left: 0;
- padding-right: 15em
- }
-
- body.toc2.toc-right #toc.toc2 {
- border-right-width: 0;
- border-left: 1px solid #efefed;
- left: auto;
- right: 0
- }
-}
-
-@media only screen and (min-width: 1280px) {
- body.toc2 {
- padding-left: 20em;
- padding-right: 0
- }
-
- #toc.toc2 {
- width: 20em
- }
-
- #toc.toc2 #toctitle {
- font-size: 1.375em
- }
-
- #toc.toc2 > ul {
- font-size: .95em
- }
-
- #toc.toc2 ul ul {
- padding-left: 1.25em
- }
-
- body.toc2.toc-right {
- padding-left: 0;
- padding-right: 20em
- }
-}
-
-#content #toc {
- border-style: solid;
- border-width: 1px;
- border-color: #e0e0dc;
- margin-bottom: 1.25em;
- padding: 1.25em;
- background: #f8f8f7;
- -webkit-border-radius: 4px;
- border-radius: 4px
-}
-
-#content #toc > :first-child {
- margin-top: 0
-}
-
-#content #toc > :last-child {
- margin-bottom: 0
-}
-
-#footer {
- max-width: 100%;
- background-color: rgba(0, 0, 0, .8);
- padding: 1.25em
-}
-
-#footer-text {
- color: rgba(255, 255, 255, .8);
- line-height: 1.44
-}
-
-.sect1 {
- padding-bottom: .625em
-}
-
-@media only screen and (min-width: 768px) {
- .sect1 {
- padding-bottom: 1.25em
- }
-}
-
-.sect1 + .sect1 {
- border-top: 1px solid #efefed
-}
-
-#content h1 > a.anchor, h2 > a.anchor, h3 > a.anchor, #toctitle > a.anchor, .sidebarblock > .content > .title > a.anchor, h4 > a.anchor, h5 > a.anchor, h6 > a.anchor {
- position: absolute;
- z-index: 1001;
- width: 1.5ex;
- margin-left: -1.5ex;
- display: block;
- text-decoration: none !important;
- visibility: hidden;
- text-align: center;
- font-weight: 400
-}
-
-#content h1 > a.anchor:before, h2 > a.anchor:before, h3 > a.anchor:before, #toctitle > a.anchor:before, .sidebarblock > .content > .title > a.anchor:before, h4 > a.anchor:before, h5 > a.anchor:before, h6 > a.anchor:before {
- content: "\00A7";
- font-size: .85em;
- display: block;
- padding-top: .1em
-}
-
-#content h1:hover > a.anchor, #content h1 > a.anchor:hover, h2:hover > a.anchor, h2 > a.anchor:hover, h3:hover > a.anchor, #toctitle:hover > a.anchor, .sidebarblock > .content > .title:hover > a.anchor, h3 > a.anchor:hover, #toctitle > a.anchor:hover, .sidebarblock > .content > .title > a.anchor:hover, h4:hover > a.anchor, h4 > a.anchor:hover, h5:hover > a.anchor, h5 > a.anchor:hover, h6:hover > a.anchor, h6 > a.anchor:hover {
- visibility: visible
-}
-
-#content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link {
- color: #ba3925;
- text-decoration: none
-}
-
-#content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover {
- color: #a53221
-}
-
-.audioblock, .imageblock, .literalblock, .listingblock, .stemblock, .videoblock {
- margin-bottom: 1.25em
-}
-
-.admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title {
- text-rendering: optimizeLegibility;
- text-align: left;
- font-family: "Noto Serif", "DejaVu Serif", serif;
- font-size: 1rem;
- font-style: italic
-}
-
-table.tableblock > caption.title {
- white-space: nowrap;
- overflow: visible;
- max-width: 0
-}
-
-.paragraph.lead > p, #preamble > .sectionbody > .paragraph:first-of-type p {
- color: rgba(0, 0, 0, .85)
-}
-
-table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p {
- font-size: inherit
-}
-
-.admonitionblock > table {
- border-collapse: separate;
- border: 0;
- background: none;
- width: 100%
-}
-
-.admonitionblock > table td.icon {
- text-align: center;
- width: 80px
-}
-
-.admonitionblock > table td.icon img {
- max-width: none
-}
-
-.admonitionblock > table td.icon .title {
- font-weight: bold;
- font-family: "Open Sans", "DejaVu Sans", sans-serif;
- text-transform: uppercase
-}
-
-.admonitionblock > table td.content {
- padding-left: 1.125em;
- padding-right: 1.25em;
- border-left: 1px solid #ddddd8;
- color: rgba(0, 0, 0, .6)
-}
-
-.admonitionblock > table td.content > :last-child > :last-child {
- margin-bottom: 0
-}
-
-.exampleblock > .content {
- border-style: solid;
- border-width: 1px;
- border-color: #e6e6e6;
- margin-bottom: 1.25em;
- padding: 1.25em;
- background: #fff;
- -webkit-border-radius: 4px;
- border-radius: 4px
-}
-
-.exampleblock > .content > :first-child {
- margin-top: 0
-}
-
-.exampleblock > .content > :last-child {
- margin-bottom: 0
-}
-
-.sidebarblock {
- border-style: solid;
- border-width: 1px;
- border-color: #e0e0dc;
- margin-bottom: 1.25em;
- padding: 1.25em;
- background: #f8f8f7;
- -webkit-border-radius: 4px;
- border-radius: 4px
-}
-
-.sidebarblock > :first-child {
- margin-top: 0
-}
-
-.sidebarblock > :last-child {
- margin-bottom: 0
-}
-
-.sidebarblock > .content > .title {
- color: #7a2518;
- margin-top: 0;
- text-align: center
-}
-
-.exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child, .exampleblock > .content .qlist > ol > li:last-child > :last-child, .sidebarblock > .content > :last-child > :last-child, .sidebarblock > .content .olist > ol > li:last-child > :last-child, .sidebarblock > .content .ulist > ul > li:last-child > :last-child, .sidebarblock > .content .qlist > ol > li:last-child > :last-child {
- margin-bottom: 0
-}
-
-.literalblock pre, .listingblock pre:not(.highlight), .listingblock pre[class="highlight"], .listingblock pre[class^="highlight "], .listingblock pre.CodeRay, .listingblock pre.prettyprint {
- background: #f7f7f8
-}
-
-.sidebarblock .literalblock pre, .sidebarblock .listingblock pre:not(.highlight), .sidebarblock .listingblock pre[class="highlight"], .sidebarblock .listingblock pre[class^="highlight "], .sidebarblock .listingblock pre.CodeRay, .sidebarblock .listingblock pre.prettyprint {
- background: #f2f1f1
-}
-
-.literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] {
- -webkit-border-radius: 4px;
- border-radius: 4px;
- word-wrap: break-word;
- padding: 1em;
- font-size: .8125em
-}
-
-.literalblock pre.nowrap, .literalblock pre[class].nowrap, .listingblock pre.nowrap, .listingblock pre[class].nowrap {
- overflow-x: auto;
- white-space: pre;
- word-wrap: normal
-}
-
-@media only screen and (min-width: 768px) {
- .literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] {
- font-size: .90625em
- }
-}
-
-@media only screen and (min-width: 1280px) {
- .literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] {
- font-size: 1em
- }
-}
-
-.literalblock.output pre {
- color: #f7f7f8;
- background-color: rgba(0, 0, 0, .9)
-}
-
-.listingblock pre.highlightjs {
- padding: 0
-}
-
-.listingblock pre.highlightjs > code {
- padding: 1em;
- -webkit-border-radius: 4px;
- border-radius: 4px
-}
-
-.listingblock pre.prettyprint {
- border-width: 0
-}
-
-.listingblock > .content {
- position: relative
-}
-
-.listingblock code[data-lang]:before {
- display: none;
- content: attr(data-lang);
- position: absolute;
- font-size: .75em;
- top: .425rem;
- right: .5rem;
- line-height: 1;
- text-transform: uppercase;
- color: #999
-}
-
-.listingblock:hover code[data-lang]:before {
- display: block
-}
-
-.listingblock.terminal pre .command:before {
- content: attr(data-prompt);
- padding-right: .5em;
- color: #999
-}
-
-.listingblock.terminal pre .command:not([data-prompt]):before {
- content: "$"
-}
-
-table.pyhltable {
- border-collapse: separate;
- border: 0;
- margin-bottom: 0;
- background: none
-}
-
-table.pyhltable td {
- vertical-align: top;
- padding-top: 0;
- padding-bottom: 0
-}
-
-table.pyhltable td.code {
- padding-left: .75em;
- padding-right: 0
-}
-
-pre.pygments .lineno, table.pyhltable td:not(.code) {
- color: #999;
- padding-left: 0;
- padding-right: .5em;
- border-right: 1px solid #ddddd8
-}
-
-pre.pygments .lineno {
- display: inline-block;
- margin-right: .25em
-}
-
-table.pyhltable .linenodiv {
- background: none !important;
- padding-right: 0 !important
-}
-
-.quoteblock {
- margin: 0 1em 1.25em 1.5em;
- display: table
-}
-
-.quoteblock > .title {
- margin-left: -1.5em;
- margin-bottom: .75em
-}
-
-.quoteblock blockquote, .quoteblock blockquote p {
- color: rgba(0, 0, 0, .85);
- font-size: 1.15rem;
- line-height: 1.75;
- word-spacing: .1em;
- letter-spacing: 0;
- font-style: italic;
- text-align: justify
-}
-
-.quoteblock blockquote {
- margin: 0;
- padding: 0;
- border: 0
-}
-
-.quoteblock blockquote:before {
- content: "\201c";
- float: left;
- font-size: 2.75em;
- font-weight: bold;
- line-height: .6em;
- margin-left: -.6em;
- color: #7a2518;
- text-shadow: 0 1px 2px rgba(0, 0, 0, .1)
-}
-
-.quoteblock blockquote > .paragraph:last-child p {
- margin-bottom: 0
-}
-
-.quoteblock .attribution {
- margin-top: .5em;
- margin-right: .5ex;
- text-align: right
-}
-
-.quoteblock .quoteblock {
- margin-left: 0;
- margin-right: 0;
- padding: .5em 0;
- border-left: 3px solid rgba(0, 0, 0, .6)
-}
-
-.quoteblock .quoteblock blockquote {
- padding: 0 0 0 .75em
-}
-
-.quoteblock .quoteblock blockquote:before {
- display: none
-}
-
-.verseblock {
- margin: 0 1em 1.25em 1em
-}
-
-.verseblock pre {
- font-family: "Open Sans", "DejaVu Sans", sans;
- font-size: 1.15rem;
- color: rgba(0, 0, 0, .85);
- font-weight: 300;
- text-rendering: optimizeLegibility
-}
-
-.verseblock pre strong {
- font-weight: 400
-}
-
-.verseblock .attribution {
- margin-top: 1.25rem;
- margin-left: .5ex
-}
-
-.quoteblock .attribution, .verseblock .attribution {
- font-size: .9375em;
- line-height: 1.45;
- font-style: italic
-}
-
-.quoteblock .attribution br, .verseblock .attribution br {
- display: none
-}
-
-.quoteblock .attribution cite, .verseblock .attribution cite {
- display: block;
- letter-spacing: -.05em;
- color: rgba(0, 0, 0, .6)
-}
-
-.quoteblock.abstract {
- margin: 0 0 1.25em 0;
- display: block
-}
-
-.quoteblock.abstract blockquote, .quoteblock.abstract blockquote p {
- text-align: left;
- word-spacing: 0
-}
-
-.quoteblock.abstract blockquote:before, .quoteblock.abstract blockquote p:first-of-type:before {
- display: none
-}
-
-table.tableblock {
- max-width: 100%;
- border-collapse: separate
-}
-
-table.tableblock td > .paragraph:last-child p > p:last-child, table.tableblock th > p:last-child, table.tableblock td > p:last-child {
- margin-bottom: 0
-}
-
-table.spread {
- width: 100%
-}
-
-table.tableblock, th.tableblock, td.tableblock {
- border: 0 solid #dedede
-}
-
-table.grid-all th.tableblock, table.grid-all td.tableblock {
- border-width: 0 1px 1px 0
-}
-
-table.grid-all tfoot > tr > th.tableblock, table.grid-all tfoot > tr > td.tableblock {
- border-width: 1px 1px 0 0
-}
-
-table.grid-cols th.tableblock, table.grid-cols td.tableblock {
- border-width: 0 1px 0 0
-}
-
-table.grid-all * > tr > .tableblock:last-child, table.grid-cols * > tr > .tableblock:last-child {
- border-right-width: 0
-}
-
-table.grid-rows th.tableblock, table.grid-rows td.tableblock {
- border-width: 0 0 1px 0
-}
-
-table.grid-all tbody > tr:last-child > th.tableblock, table.grid-all tbody > tr:last-child > td.tableblock, table.grid-all thead:last-child > tr > th.tableblock, table.grid-rows tbody > tr:last-child > th.tableblock, table.grid-rows tbody > tr:last-child > td.tableblock, table.grid-rows thead:last-child > tr > th.tableblock {
- border-bottom-width: 0
-}
-
-table.grid-rows tfoot > tr > th.tableblock, table.grid-rows tfoot > tr > td.tableblock {
- border-width: 1px 0 0 0
-}
-
-table.frame-all {
- border-width: 1px
-}
-
-table.frame-sides {
- border-width: 0 1px
-}
-
-table.frame-topbot {
- border-width: 1px 0
-}
-
-th.halign-left, td.halign-left {
- text-align: left
-}
-
-th.halign-right, td.halign-right {
- text-align: right
-}
-
-th.halign-center, td.halign-center {
- text-align: center
-}
-
-th.valign-top, td.valign-top {
- vertical-align: top
-}
-
-th.valign-bottom, td.valign-bottom {
- vertical-align: bottom
-}
-
-th.valign-middle, td.valign-middle {
- vertical-align: middle
-}
-
-table thead th, table tfoot th {
- font-weight: bold
-}
-
-tbody tr th {
- display: table-cell;
- line-height: 1.6;
- background: #f7f8f7
-}
-
-tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p {
- color: rgba(0, 0, 0, .8);
- font-weight: bold
-}
-
-p.tableblock > code:only-child {
- background: none;
- padding: 0
-}
-
-p.tableblock {
- font-size: 1em
-}
-
-td > div.verse {
- white-space: pre
-}
-
-ol {
- margin-left: 1.75em
-}
-
-ul li ol {
- margin-left: 1.5em
-}
-
-dl dd {
- margin-left: 1.125em
-}
-
-dl dd:last-child, dl dd:last-child > :last-child {
- margin-bottom: 0
-}
-
-ol > li p, ul > li p, ul dd, ol dd, .olist .olist, .ulist .ulist, .ulist .olist, .olist .ulist {
- margin-bottom: .625em
-}
-
-ul.unstyled, ol.unnumbered, ul.checklist, ul.none {
- list-style-type: none
-}
-
-ul.unstyled, ol.unnumbered, ul.checklist {
- margin-left: .625em
-}
-
-ul.checklist li > p:first-child > .fa-check-square-o:first-child, ul.checklist li > p:first-child > input[type="checkbox"]:first-child {
- margin-right: .25em
-}
-
-ul.checklist li > p:first-child > input[type="checkbox"]:first-child {
- position: relative;
- top: 1px
-}
-
-ul.inline {
- margin: 0 auto .625em auto;
- margin-left: -1.375em;
- margin-right: 0;
- padding: 0;
- list-style: none;
- overflow: hidden
-}
-
-ul.inline > li {
- list-style: none;
- float: left;
- margin-left: 1.375em;
- display: block
-}
-
-ul.inline > li > * {
- display: block
-}
-
-.unstyled dl dt {
- font-weight: 400;
- font-style: normal
-}
-
-ol.arabic {
- list-style-type: decimal
-}
-
-ol.decimal {
- list-style-type: decimal-leading-zero
-}
-
-ol.loweralpha {
- list-style-type: lower-alpha
-}
-
-ol.upperalpha {
- list-style-type: upper-alpha
-}
-
-ol.lowerroman {
- list-style-type: lower-roman
-}
-
-ol.upperroman {
- list-style-type: upper-roman
-}
-
-ol.lowergreek {
- list-style-type: lower-greek
-}
-
-.hdlist > table, .colist > table {
- border: 0;
- background: none
-}
-
-.hdlist > table > tbody > tr, .colist > table > tbody > tr {
- background: none
-}
-
-td.hdlist1 {
- padding-right: .75em;
- font-weight: bold
-}
-
-td.hdlist1, td.hdlist2 {
- vertical-align: top
-}
-
-.literalblock + .colist, .listingblock + .colist {
- margin-top: -.5em
-}
-
-.colist > table tr > td:first-of-type {
- padding: 0 .75em;
- line-height: 1
-}
-
-.colist > table tr > td:last-of-type {
- padding: .25em 0
-}
-
-.thumb, .th {
- line-height: 0;
- display: inline-block;
- border: solid 4px #fff;
- -webkit-box-shadow: 0 0 0 1px #ddd;
- box-shadow: 0 0 0 1px #ddd
-}
-
-.imageblock.left, .imageblock[style*="float: left"] {
- margin: .25em .625em 1.25em 0
-}
-
-.imageblock.right, .imageblock[style*="float: right"] {
- margin: .25em 0 1.25em .625em
-}
-
-.imageblock > .title {
- margin-bottom: 0
-}
-
-.imageblock.thumb, .imageblock.th {
- border-width: 6px
-}
-
-.imageblock.thumb > .title, .imageblock.th > .title {
- padding: 0 .125em
-}
-
-.image.left, .image.right {
- margin-top: .25em;
- margin-bottom: .25em;
- display: inline-block;
- line-height: 0
-}
-
-.image.left {
- margin-right: .625em
-}
-
-.image.right {
- margin-left: .625em
-}
-
-a.image {
- text-decoration: none
-}
-
-span.footnote, span.footnoteref {
- vertical-align: super;
- font-size: .875em
-}
-
-span.footnote a, span.footnoteref a {
- text-decoration: none
-}
-
-span.footnote a:active, span.footnoteref a:active {
- text-decoration: underline
-}
-
-#footnotes {
- padding-top: .75em;
- padding-bottom: .75em;
- margin-bottom: .625em
-}
-
-#footnotes hr {
- width: 20%;
- min-width: 6.25em;
- margin: -.25em 0 .75em 0;
- border-width: 1px 0 0 0
-}
-
-#footnotes .footnote {
- padding: 0 .375em;
- line-height: 1.3;
- font-size: .875em;
- margin-left: 1.2em;
- text-indent: -1.2em;
- margin-bottom: .2em
-}
-
-#footnotes .footnote a:first-of-type {
- font-weight: bold;
- text-decoration: none
-}
-
-#footnotes .footnote:last-of-type {
- margin-bottom: 0
-}
-
-#content #footnotes {
- margin-top: -.625em;
- margin-bottom: 0;
- padding: .75em 0
-}
-
-.gist .file-data > table {
- border: 0;
- background: #fff;
- width: 100%;
- margin-bottom: 0
-}
-
-.gist .file-data > table td.line-data {
- width: 99%
-}
-
-div.unbreakable {
- page-break-inside: avoid
-}
-
-.big {
- font-size: larger
-}
-
-.small {
- font-size: smaller
-}
-
-.underline {
- text-decoration: underline
-}
-
-.overline {
- text-decoration: overline
-}
-
-.line-through {
- text-decoration: line-through
-}
-
-.aqua {
- color: #00bfbf
-}
-
-.aqua-background {
- background-color: #00fafa
-}
-
-.black {
- color: #000
-}
-
-.black-background {
- background-color: #000
-}
-
-.blue {
- color: #0000bf
-}
-
-.blue-background {
- background-color: #0000fa
-}
-
-.fuchsia {
- color: #bf00bf
-}
-
-.fuchsia-background {
- background-color: #fa00fa
-}
-
-.gray {
- color: #606060
-}
-
-.gray-background {
- background-color: #7d7d7d
-}
-
-.green {
- color: #006000
-}
-
-.green-background {
- background-color: #007d00
-}
-
-.lime {
- color: #00bf00
-}
-
-.lime-background {
- background-color: #00fa00
-}
-
-.maroon {
- color: #600000
-}
-
-.maroon-background {
- background-color: #7d0000
-}
-
-.navy {
- color: #000060
-}
-
-.navy-background {
- background-color: #00007d
-}
-
-.olive {
- color: #606000
-}
-
-.olive-background {
- background-color: #7d7d00
-}
-
-.purple {
- color: #600060
-}
-
-.purple-background {
- background-color: #7d007d
-}
-
-.red {
- color: #bf0000
-}
-
-.red-background {
- background-color: #fa0000
-}
-
-.silver {
- color: #909090
-}
-
-.silver-background {
- background-color: #bcbcbc
-}
-
-.teal {
- color: #006060
-}
-
-.teal-background {
- background-color: #007d7d
-}
-
-.white {
- color: #bfbfbf
-}
-
-.white-background {
- background-color: #fafafa
-}
-
-.yellow {
- color: #bfbf00
-}
-
-.yellow-background {
- background-color: #fafa00
-}
-
-span.icon > .fa {
- cursor: default
-}
-
-.admonitionblock td.icon [class^="fa icon-"] {
- font-size: 2.5em;
- text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
- cursor: default
-}
-
-.admonitionblock td.icon .icon-note:before {
- content: "\f05a";
- color: #19407c
-}
-
-.admonitionblock td.icon .icon-tip:before {
- content: "\f0eb";
- text-shadow: 1px 1px 2px rgba(155, 155, 0, .8);
- color: #111
-}
-
-.admonitionblock td.icon .icon-warning:before {
- content: "\f071";
- color: #bf6900
-}
-
-.admonitionblock td.icon .icon-caution:before {
- content: "\f06d";
- color: #bf3400
-}
-
-.admonitionblock td.icon .icon-important:before {
- content: "\f06a";
- color: #bf0000
-}
-
-.conum[data-value] {
- display: inline-block;
- color: #fff !important;
- background-color: rgba(0, 0, 0, .8);
- -webkit-border-radius: 100px;
- border-radius: 100px;
- text-align: center;
- font-size: .75em;
- width: 1.67em;
- height: 1.67em;
- line-height: 1.67em;
- font-family: "Open Sans", "DejaVu Sans", sans-serif;
- font-style: normal;
- font-weight: bold
-}
-
-.conum[data-value] * {
- color: #fff !important
-}
-
-.conum[data-value] + b {
- display: none
-}
-
-.conum[data-value]:after {
- content: attr(data-value)
-}
-
-pre .conum[data-value] {
- position: relative;
- top: -.125em
-}
-
-b.conum * {
- color: inherit !important
-}
-
-.conum:not([data-value]):empty {
- display: none
-}
-
-h1, h2 {
- letter-spacing: -.01em
-}
-
-dt, th.tableblock, td.content {
- text-rendering: optimizeLegibility
-}
-
-p, td.content {
- letter-spacing: -.01em
-}
-
-p strong, td.content strong {
- letter-spacing: -.005em
-}
-
-p, blockquote, dt, td.content {
- font-size: 1.0625rem
-}
-
-p {
- margin-bottom: 1.25rem
-}
-
-.sidebarblock p, .sidebarblock dt, .sidebarblock td.content, p.tableblock {
- font-size: 1em
-}
-
-.exampleblock > .content {
- background-color: #fffef7;
- border-color: #e0e0dc;
- -webkit-box-shadow: 0 1px 4px #e0e0dc;
- box-shadow: 0 1px 4px #e0e0dc
-}
-
-.print-only {
- display: none !important
-}
-
-@media print {
- @page {
- margin: 1.25cm .75cm
- }
-
- * {
- -webkit-box-shadow: none !important;
- box-shadow: none !important;
- text-shadow: none !important
- }
-
- a {
- color: inherit !important;
- text-decoration: underline !important
- }
-
- a.bare, a[href^="#"], a[href^="mailto:"] {
- text-decoration: none !important
- }
-
- a[href^="http:"]:not(.bare):after, a[href^="https:"]:not(.bare):after {
- content: "(" attr(href) ")";
- display: inline-block;
- font-size: .875em;
- padding-left: .25em
- }
-
- abbr[title]:after {
- content: " (" attr(title) ")"
- }
-
- pre, blockquote, tr, img {
- page-break-inside: avoid
- }
-
- thead {
- display: table-header-group
- }
-
- img {
- max-width: 100% !important
- }
-
- p, blockquote, dt, td.content {
- font-size: 1em;
- orphans: 3;
- widows: 3
- }
-
- h2, h3, #toctitle, .sidebarblock > .content > .title {
- page-break-after: avoid
- }
-
- #toc, .sidebarblock, .exampleblock > .content {
- background: none !important
- }
-
- #toc {
- border-bottom: 1px solid #ddddd8 !important;
- padding-bottom: 0 !important
- }
-
- .sect1 {
- padding-bottom: 0 !important
- }
-
- .sect1 + .sect1 {
- border: 0 !important
- }
-
- #header > h1:first-child {
- margin-top: 1.25rem
- }
-
- body.book #header {
- text-align: center
- }
-
- body.book #header > h1:first-child {
- border: 0 !important;
- margin: 2.5em 0 1em 0
- }
-
- body.book #header .details {
- border: 0 !important;
- display: block;
- padding: 0 !important
- }
-
- body.book #header .details span:first-child {
- margin-left: 0 !important
- }
-
- body.book #header .details br {
- display: block
- }
-
- body.book #header .details br + span:before {
- content: none !important
- }
-
- body.book #toc {
- border: 0 !important;
- text-align: left !important;
- padding: 0 !important;
- margin: 0 !important
- }
-
- body.book #toc, body.book #preamble, body.book h1.sect0, body.book .sect1 > h2 {
- page-break-before: always
- }
-
- .listingblock code[data-lang]:before {
- display: block
- }
-
- #footer {
- background: none !important;
- padding: 0 .9375em
- }
-
- #footer-text {
- color: rgba(0, 0, 0, .6) !important;
- font-size: .9em
- }
-
- .hide-on-print {
- display: none !important
- }
-
- .print-only {
- display: block !important
- }
-
- .hide-for-print {
- display: none !important
- }
-
- .show-for-print {
- display: inherit !important
- }
-}
diff --git a/codecov.yml b/codecov.yml
deleted file mode 100644
index 765e05d29..000000000
--- a/codecov.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-comment:
- layout: "reach, diff, flags, files"
- behavior: default
- require_changes: false # if true: only post the comment if coverage changes
- require_base: no # [yes :: must have a base report to post]
- require_head: yes # [yes :: must have a head report to post]
- branches: null
diff --git a/docs/.flattened-pom.xml b/docs/.flattened-pom.xml
new file mode 100644
index 000000000..e6a367929
--- /dev/null
+++ b/docs/.flattened-pom.xml
@@ -0,0 +1,107 @@
+
+
+ 4.0.0
+
+ org.springframework.cloud
+ spring-cloud-openfeign
+ 4.1.0-SNAPSHOT
+ ..
+
+ org.springframework.cloud
+ spring-cloud-openfeign-docs
+ 4.1.0-SNAPSHOT
+ Spring Cloud OpenFeign Docs
+ Spring Cloud OpenFeign Docs
+ https://spring.io/spring-cloud/spring-cloud-openfeign/spring-cloud-openfeign-docs
+
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+
+
+ Apache License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0
+ Copyright 2014-2021 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.
+
+
+
+
+ dsyer
+ Dave Syer
+ dsyer at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ lead
+
+
+
+ sgibb
+ Spencer Gibb
+ sgibb at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ lead
+
+
+
+ mgrzejszczak
+ Marcin Grzejszczak
+ mgrzejszczak at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+ rbaxter
+ Ryan Baxter
+ rbaxter at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+ omaciaszeksharma
+ Olga Maciaszek-Sharma
+ omaciaszeksharma at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+
+ scm:git:git://github.com/spring-cloud/spring-cloud-openfeign.git/spring-cloud-openfeign-docs
+ scm:git:ssh://git@github.com/spring-cloud/spring-cloud-openfeign.git/spring-cloud-openfeign-docs
+ https://github.com/spring-cloud/spring-cloud-openfeign
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ 4.1.0-SNAPSHOT
+ compile
+
+
+
diff --git a/docs/pom.xml b/docs/pom.xml
deleted file mode 100644
index 23974a740..000000000
--- a/docs/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
- 4.0.0
-
- org.springframework.cloud
- spring-cloud-openfeign
- 4.1.0-SNAPSHOT
-
-
- https://github.com/spring-cloud/spring-cloud-openfeign
-
- spring-cloud-openfeign-docs
- jar
- Spring Cloud OpenFeign Docs
- Spring Cloud Docs
-
- spring-cloud-openfeign
- ${basedir}/..
- feign.*
- deploy
-
- none
-
-
-
- ${project.groupId}
- spring-cloud-starter-openfeign
-
-
-
- src/main/asciidoc
-
-
-
- docs
-
-
-
- pl.project13.maven
- git-commit-id-plugin
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- org.apache.maven.plugins
- maven-resources-plugin
-
-
- org.codehaus.mojo
- exec-maven-plugin
-
-
- org.asciidoctor
- asciidoctor-maven-plugin
-
-
- org.apache.maven.plugins
- maven-antrun-plugin
-
-
- maven-deploy-plugin
-
-
-
-
-
-
diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc
deleted file mode 100644
index 2af86f623..000000000
--- a/docs/src/main/asciidoc/README.adoc
+++ /dev/null
@@ -1,25 +0,0 @@
-image::https://github.com/spring-cloud/spring-cloud-openfeign/workflows/Build/badge.svg?branch=main&style=svg["Build",link="https://github.com/spring-cloud/spring-cloud-openfeign/actions"]
-
-image:https://codecov.io/gh/spring-cloud/spring-cloud-openfeign/branch/main/graph/badge.svg["Codecov", link="https://codecov.io/gh/spring-cloud/spring-cloud-openfeign"]
-
-image:https://api.codacy.com/project/badge/Grade/97b04c4e609c4b4f86b415e4437a6484["Codacy code quality", link="https://www.codacy.com/app/Spring-Cloud/spring-cloud-openfeign?utm_source=github.com&utm_medium=referral&utm_content=spring-cloud/spring-cloud-openfeign&utm_campaign=Badge_Grade"]
-
-include::_attributes.adoc[]
-
-include::intro.adoc[]
-
-== Features
-
-* Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
-
-== Building
-
-include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/building-jdk8.adoc[]
-
-== Contributing
-
-include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/contributing.adoc[]
-
-== License
-
-The project license file is available https://raw.githubusercontent.com/spring-cloud/spring-cloud-openfeign/main/LICENSE.txt[here].
diff --git a/docs/src/main/asciidoc/_attributes.adoc b/docs/src/main/asciidoc/_attributes.adoc
deleted file mode 100644
index 6efc1231d..000000000
--- a/docs/src/main/asciidoc/_attributes.adoc
+++ /dev/null
@@ -1,18 +0,0 @@
-: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 OpenFeign
-:all: {asterisk}{asterisk}
-
-:core_path: {project-root}/spring-cloud-openfeign-core
diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc
deleted file mode 100644
index 6d8de12a4..000000000
--- a/docs/src/main/asciidoc/_configprops.adoc
+++ /dev/null
@@ -1,37 +0,0 @@
-|===
-|Name | Default | Description
-
-|spring.cloud.openfeign.autoconfiguration.jackson.enabled | `false` | If true, PageJacksonModule and SortJacksonModule bean will be provided for Jackson page decoding.
-|spring.cloud.openfeign.circuitbreaker.enabled | `false` | If true, an OpenFeign client will be wrapped with a Spring Cloud CircuitBreaker circuit breaker.
-|spring.cloud.openfeign.circuitbreaker.group.enabled | `false` | If true, an OpenFeign client will be wrapped with a Spring Cloud CircuitBreaker circuit breaker with with group.
-|spring.cloud.openfeign.client.config | |
-|spring.cloud.openfeign.client.decode-slash | `true` | Feign clients do not encode slash `/` characters by default. To change this behavior, set the `decodeSlash` to `false`.
-|spring.cloud.openfeign.client.default-config | `default` |
-|spring.cloud.openfeign.client.default-to-properties | `true` |
-|spring.cloud.openfeign.client.refresh-enabled | `false` | Enables options value refresh capability for Feign.
-|spring.cloud.openfeign.compression.request.enabled | `false` | Enables the request sent by Feign to be compressed.
-|spring.cloud.openfeign.compression.request.mime-types | `[text/xml, application/xml, application/json]` | The list of supported mime types.
-|spring.cloud.openfeign.compression.request.min-request-size | `2048` | The minimum threshold content size.
-|spring.cloud.openfeign.compression.response.enabled | `false` | Enables the response from Feign to be compressed.
-|spring.cloud.openfeign.encoder.charset-from-content-type | `false` | Indicates whether the charset should be derived from the {@code Content-Type} header.
-|spring.cloud.openfeign.httpclient.connection-timeout | `2000` |
-|spring.cloud.openfeign.httpclient.connection-timer-repeat | `3000` |
-|spring.cloud.openfeign.httpclient.disable-ssl-validation | `false` |
-|spring.cloud.openfeign.httpclient.enabled | `true` | Enables the use of the Apache HTTP Client by Feign.
-|spring.cloud.openfeign.httpclient.follow-redirects | `true` |
-|spring.cloud.openfeign.httpclient.hc5.enabled | `false` | Enables the use of the Apache HTTP Client 5 by Feign.
-|spring.cloud.openfeign.httpclient.hc5.pool-concurrency-policy | | Pool concurrency policies.
-|spring.cloud.openfeign.httpclient.hc5.pool-reuse-policy | | Pool connection re-use policies.
-|spring.cloud.openfeign.httpclient.hc5.socket-timeout | `5` | Default value for socket timeout.
-|spring.cloud.openfeign.httpclient.hc5.socket-timeout-unit | | Default value for socket timeout unit.
-|spring.cloud.openfeign.httpclient.max-connections | `200` |
-|spring.cloud.openfeign.httpclient.max-connections-per-route | `50` |
-|spring.cloud.openfeign.httpclient.ok-http.read-timeout | `60s` | {@link OkHttpClient} read timeout; defaults to 60 seconds.
-|spring.cloud.openfeign.httpclient.time-to-live | `900` |
-|spring.cloud.openfeign.httpclient.time-to-live-unit | |
-|spring.cloud.openfeign.micrometer.enabled | `true` | Enables Micrometer capabilities for Feign.
-|spring.cloud.openfeign.oauth2.enabled | `false` | Enables feign interceptor for managing oauth2 access token.
-|spring.cloud.openfeign.oauth2.load-balanced | `false` | Enables load balancing for oauth2 access token provider.
-|spring.cloud.openfeign.okhttp.enabled | `false` | Enables the use of the OK HTTP Client by Feign.
-
-|===
diff --git a/docs/src/main/asciidoc/appendix.adoc b/docs/src/main/asciidoc/appendix.adoc
deleted file mode 100644
index 39eb1593e..000000000
--- a/docs/src/main/asciidoc/appendix.adoc
+++ /dev/null
@@ -1,14 +0,0 @@
-: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[]
diff --git a/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh
deleted file mode 100755
index 8bb835786..000000000
--- a/docs/src/main/asciidoc/ghpages.sh
+++ /dev/null
@@ -1,330 +0,0 @@
-#!/bin/bash -x
-
-set -e
-
-# Set default props like MAVEN_PATH, ROOT_FOLDER etc.
-function set_default_props() {
- # The script should be executed from the root folder
- ROOT_FOLDER=`pwd`
- echo "Current folder is ${ROOT_FOLDER}"
-
- if [[ ! -e "${ROOT_FOLDER}/.git" ]]; then
- echo "You're not in the root folder of the project!"
- exit 1
- fi
-
- # Prop that will let commit the changes
- COMMIT_CHANGES="no"
- MAVEN_PATH=${MAVEN_PATH:-}
- echo "Path to Maven is [${MAVEN_PATH}]"
- REPO_NAME=${PWD##*/}
- echo "Repo name is [${REPO_NAME}]"
- SPRING_CLOUD_STATIC_REPO=${SPRING_CLOUD_STATIC_REPO:-git@github.com:spring-cloud/spring-cloud-static.git}
- echo "Spring Cloud Static repo is [${SPRING_CLOUD_STATIC_REPO}"
-}
-
-# Check if gh-pages exists and docs have been built
-function check_if_anything_to_sync() {
- git remote set-url --push origin `git config remote.origin.url | sed -e 's/^git:/https:/'`
-
- if ! (git remote set-branches --add origin gh-pages && git fetch -q); then
- echo "No gh-pages, so not syncing"
- exit 0
- fi
-
- if ! [ -d docs/target/generated-docs ] && ! [ "${BUILD}" == "yes" ]; then
- echo "No gh-pages sources in docs/target/generated-docs, so not syncing"
- exit 0
- fi
-}
-
-function retrieve_current_branch() {
- # Code getting the name of the current branch. For main we want to publish as we did until now
- # 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
- CURRENT_BRANCH=$(git symbolic-ref -q HEAD)
- CURRENT_BRANCH=${CURRENT_BRANCH##refs/heads/}
- CURRENT_BRANCH=${CURRENT_BRANCH:-HEAD}
- fi
- echo "Current branch is [${CURRENT_BRANCH}]"
- git checkout ${CURRENT_BRANCH} || echo "Failed to check the branch... continuing with the script"
-}
-
-# Switches to the provided value of the release version. We always prefix it with `v`
-function switch_to_tag() {
- git checkout v${VERSION}
-}
-
-# Build the docs if switch is on
-function build_docs_if_applicable() {
- if [[ "${BUILD}" == "yes" ]] ; then
- ./mvnw clean install -P docs -pl docs -DskipTests
- fi
-}
-
-# Get the name of the `docs.main` property
-# Get whitelisted branches - assumes that a `docs` module is available under `docs` profile
-function retrieve_doc_properties() {
- MAIN_ADOC_VALUE=$("${MAVEN_PATH}"mvn -q \
- -Dexec.executable="echo" \
- -Dexec.args='${docs.main}' \
- --non-recursive \
- org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
- echo "Extracted 'main.adoc' from Maven build [${MAIN_ADOC_VALUE}]"
-
-
- WHITELIST_PROPERTY=${WHITELIST_PROPERTY:-"docs.whitelisted.branches"}
- WHITELISTED_BRANCHES_VALUE=$("${MAVEN_PATH}"mvn -q \
- -Dexec.executable="echo" \
- -Dexec.args="\${${WHITELIST_PROPERTY}}" \
- org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \
- -P docs \
- -pl docs)
- echo "Extracted '${WHITELIST_PROPERTY}' from Maven build [${WHITELISTED_BRANCHES_VALUE}]"
-}
-
-# Stash any outstanding changes
-function stash_changes() {
- git diff-index --quiet HEAD && dirty=$? || (echo "Failed to check if the current repo is dirty. Assuming that it is." && dirty="1")
- if [ "$dirty" != "0" ]; then git stash; fi
-}
-
-# Switch to gh-pages branch to sync it with current branch
-function add_docs_from_target() {
- local DESTINATION_REPO_FOLDER
- if [[ -z "${DESTINATION}" && -z "${CLONE}" ]] ; then
- DESTINATION_REPO_FOLDER=${ROOT_FOLDER}
- elif [[ "${CLONE}" == "yes" ]]; then
- mkdir -p ${ROOT_FOLDER}/target
- local clonedStatic=${ROOT_FOLDER}/target/spring-cloud-static
- if [[ ! -e "${clonedStatic}/.git" ]]; then
- echo "Cloning Spring Cloud Static to target"
- git clone ${SPRING_CLOUD_STATIC_REPO} ${clonedStatic} && git checkout gh-pages
- else
- echo "Spring Cloud Static already cloned - will pull changes"
- cd ${clonedStatic} && git checkout gh-pages && git pull origin gh-pages
- fi
- DESTINATION_REPO_FOLDER=${clonedStatic}/${REPO_NAME}
- mkdir -p ${DESTINATION_REPO_FOLDER}
- else
- if [[ ! -e "${DESTINATION}/.git" ]]; then
- echo "[${DESTINATION}] is not a git repository"
- exit 1
- fi
- DESTINATION_REPO_FOLDER=${DESTINATION}/${REPO_NAME}
- mkdir -p ${DESTINATION_REPO_FOLDER}
- echo "Destination was provided [${DESTINATION}]"
- fi
- cd ${DESTINATION_REPO_FOLDER}
- git checkout gh-pages
- git pull origin gh-pages
-
- # Add git branches
- ###################################################################
- if [[ -z "${VERSION}" ]] ; then
- copy_docs_for_current_version
- else
- copy_docs_for_provided_version
- fi
- commit_changes_if_applicable
-}
-
-
-# Copies the docs by using the retrieved properties from Maven build
-function copy_docs_for_current_version() {
- if [[ "${CURRENT_BRANCH}" == "main" ]] ; then
- echo -e "Current branch is main - will copy the current docs only to the root folder"
- for f in docs/target/generated-docs/*; do
- file=${f#docs/target/generated-docs/*}
- if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
- # Not ignored...
- cp -rf $f ${ROOT_FOLDER}/
- git add -A ${ROOT_FOLDER}/$file
- fi
- done
- COMMIT_CHANGES="yes"
- else
- echo -e "Current branch is [${CURRENT_BRANCH}]"
- # 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"
- for f in docs/target/generated-docs/*; do
- file=${f#docs/target/generated-docs/*}
- if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
- # Not ignored...
- # We want users to access 1.0.0.RELEASE/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html
- if [[ "${file}" == "${MAIN_ADOC_VALUE}.html" ]] ; then
- # We don't want to copy the spring-cloud-sleuth.html
- # we want it to be converted to index.html
- cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html
- git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html
- else
- cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}
- git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/$file
- fi
- fi
- done
- COMMIT_CHANGES="yes"
- else
- echo -e "Branch [${CURRENT_BRANCH}] is not on the white list! Check out the Maven [${WHITELIST_PROPERTY}] property in
- [docs] module available under [docs] profile. Won't commit any changes to gh-pages for this branch."
- fi
- fi
-}
-
-# Copies the docs by using the explicitly provided version
-function copy_docs_for_provided_version() {
- local FOLDER=${DESTINATION_REPO_FOLDER}/${VERSION}
- mkdir -p ${FOLDER}
- echo -e "Current tag is [v${VERSION}] Will copy the current docs to the [${FOLDER}] folder"
- for f in ${ROOT_FOLDER}/docs/target/generated-docs/*; do
- file=${f#${ROOT_FOLDER}/docs/target/generated-docs/*}
- copy_docs_for_branch ${file} ${FOLDER}
- done
- COMMIT_CHANGES="yes"
- CURRENT_BRANCH="v${VERSION}"
-}
-
-# Copies the docs from target to the provided destination
-# Params:
-# $1 - file from target
-# $2 - destination to which copy the files
-function copy_docs_for_branch() {
- local file=$1
- local destination=$2
- if ! git ls-files -i -o --exclude-standard --directory | grep -q ^${file}$; then
- # Not ignored...
- # We want users to access 1.0.0.RELEASE/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html
- if [[ ("${file}" == "${MAIN_ADOC_VALUE}.html") || ("${file}" == "${REPO_NAME}.html") ]] ; then
- # We don't want to copy the spring-cloud-sleuth.html
- # we want it to be converted to index.html
- cp -rf $f ${destination}/index.html
- git add -A ${destination}/index.html
- else
- cp -rf $f ${destination}
- git add -A ${destination}/$file
- fi
- fi
-}
-
-function commit_changes_if_applicable() {
- if [[ "${COMMIT_CHANGES}" == "yes" ]] ; then
- COMMIT_SUCCESSFUL="no"
- git commit -a -m "Sync docs from ${CURRENT_BRANCH} to gh-pages" && COMMIT_SUCCESSFUL="yes" || echo "Failed to commit changes"
-
- # Uncomment the following push if you want to auto push to
- # the gh-pages branch whenever you commit to main locally.
- # This is a little extreme. Use with care!
- ###################################################################
- if [[ "${COMMIT_SUCCESSFUL}" == "yes" ]] ; then
- git push origin gh-pages
- fi
- fi
-}
-
-# Switch back to the previous branch and exit block
-function checkout_previous_branch() {
- # If -version was provided we need to come back to root project
- cd ${ROOT_FOLDER}
- git checkout ${CURRENT_BRANCH} || echo "Failed to check the branch... continuing with the script"
- if [ "$dirty" != "0" ]; then git stash pop; fi
- exit 0
-}
-
-# Assert if properties have been properly passed
-function assert_properties() {
-echo "VERSION [${VERSION}], DESTINATION [${DESTINATION}], CLONE [${CLONE}]"
-if [[ "${VERSION}" != "" && (-z "${DESTINATION}" && -z "${CLONE}") ]] ; then echo "Version was set but destination / clone was not!"; exit 1;fi
-if [[ ("${DESTINATION}" != "" && "${CLONE}" != "") && -z "${VERSION}" ]] ; then echo "Destination / clone was set but version was not!"; exit 1;fi
-if [[ "${DESTINATION}" != "" && "${CLONE}" == "yes" ]] ; then echo "Destination and clone was set. Pick one!"; exit 1;fi
-}
-
-# Prints the usage
-function print_usage() {
-cat </`
-- if the destination switch is passed (-d) then the script will check if the provided dir is a git repo and then will
- switch to gh-pages of that repo and copy the generated docs to `docs//`
-
-USAGE:
-
-You can use the following options:
-
--v|--version - the script will apply the whole procedure for a particular library version
--d|--destination - the root of destination folder where the docs should be copied. You have to use the full path.
- E.g. point to spring-cloud-static folder. Can't be used with (-c)
--b|--build - will run the standard build process after checking out the branch
--c|--clone - will automatically clone the spring-cloud-static repo instead of providing the destination.
- Obviously can't be used with (-d)
-
-EOF
-}
-
-
-# ==========================================
-# ____ ____ _____ _____ _____ _______
-# / ____|/ ____| __ \|_ _| __ \__ __|
-# | (___ | | | |__) | | | | |__) | | |
-# \___ \| | | _ / | | | ___/ | |
-# ____) | |____| | \ \ _| |_| | | |
-# |_____/ \_____|_| \_\_____|_| |_|
-#
-# ==========================================
-
-while [[ $# > 0 ]]
-do
-key="$1"
-case ${key} in
- -v|--version)
- VERSION="$2"
- shift # past argument
- ;;
- -d|--destination)
- DESTINATION="$2"
- shift # past argument
- ;;
- -b|--build)
- BUILD="yes"
- ;;
- -c|--clone)
- CLONE="yes"
- ;;
- -h|--help)
- print_usage
- exit 0
- ;;
- *)
- echo "Invalid option: [$1]"
- print_usage
- exit 1
- ;;
-esac
-shift # past argument or value
-done
-
-assert_properties
-set_default_props
-check_if_anything_to_sync
-if [[ -z "${VERSION}" ]] ; then
- retrieve_current_branch
-else
- switch_to_tag
-fi
-build_docs_if_applicable
-retrieve_doc_properties
-stash_changes
-add_docs_from_target
-checkout_previous_branch
diff --git a/docs/src/main/asciidoc/index.adoc b/docs/src/main/asciidoc/index.adoc
deleted file mode 100644
index 503e0a538..000000000
--- a/docs/src/main/asciidoc/index.adoc
+++ /dev/null
@@ -1 +0,0 @@
-include::spring-cloud-openfeign.adoc[]
diff --git a/docs/src/main/asciidoc/intro.adoc b/docs/src/main/asciidoc/intro.adoc
deleted file mode 100644
index a69a78c55..000000000
--- a/docs/src/main/asciidoc/intro.adoc
+++ /dev/null
@@ -1,3 +0,0 @@
-This project provides OpenFeign integrations for Spring Boot apps through autoconfiguration
-and binding to the Spring Environment and other Spring programming model idioms.
-
diff --git a/docs/src/main/asciidoc/sagan-boot.adoc b/docs/src/main/asciidoc/sagan-boot.adoc
deleted file mode 100644
index e69de29bb..000000000
diff --git a/docs/src/main/asciidoc/sagan-index.adoc b/docs/src/main/asciidoc/sagan-index.adoc
deleted file mode 100644
index 134860fdf..000000000
--- a/docs/src/main/asciidoc/sagan-index.adoc
+++ /dev/null
@@ -1,41 +0,0 @@
-This project provides https://github.com/OpenFeign/feign[OpenFeign] integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms.
-
-## Features
-
-* Declarative REST Client: Feign creates a dynamic implementation of an interface decorated with JAX-RS or Spring MVC annotations
-
-## Getting Started
-
-
-```java
-@SpringBootApplication
-@EnableFeignClients
-public class WebApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(WebApplication.class, args);
- }
-
- @FeignClient("name")
- static interface NameService {
- @RequestMapping("/")
- public String getName();
- }
-}
-
-```
-
-## Contributing
-
-We welcome contributions. You can read more on how to contribute to the project https://github.com/spring-cloud/spring-cloud-openfeign/blob/main/README.adoc#3-contributing[here].
-
-## Community Support
-
-* You can report issues through https://github.com/spring-cloud/spring-cloud-openfeign/issues[Github].
-* We monitor https://stackoverflow.com/[StackOverflow] for questions with the `spring-cloud-feign` tag.
-* You can contact our team at https://gitter.im/spring-cloud/spring-cloud[Gitter].
-
-## Commercial Support
-
-Commercial Support is provided as part of the https://spring.io/support[VMware Spring Runtime] offering.
-
diff --git a/docs/src/main/asciidoc/spring-cloud-openfeign.adoc b/docs/src/main/asciidoc/spring-cloud-openfeign.adoc
deleted file mode 100644
index fef52d128..000000000
--- a/docs/src/main/asciidoc/spring-cloud-openfeign.adoc
+++ /dev/null
@@ -1,936 +0,0 @@
-= Spring Cloud OpenFeign
-include::_attributes.adoc[]
-
-*{spring-cloud-version}*
-
-include::intro.adoc[]
-
-
-[[spring-cloud-feign]]
-== Declarative REST Client: Feign
-
-https://github.com/OpenFeign/feign[Feign] is a declarative web service client.
-It makes writing web service clients easier.
-To use Feign create an interface and annotate it.
-It has pluggable annotation support including Feign annotations and JAX-RS annotations.
-Feign also supports pluggable encoders and decoders.
-Spring Cloud adds support for Spring MVC annotations and for using the same `HttpMessageConverters` used by default in Spring Web.
-Spring Cloud integrates Eureka, Spring Cloud CircuitBreaker, as well as Spring Cloud LoadBalancer to provide a load-balanced http client when using Feign.
-
-[[netflix-feign-starter]]
-=== How to Include Feign
-
-To include Feign in your project use the starter with group `org.springframework.cloud`
-and artifact id `spring-cloud-starter-openfeign`. See the https://projects.spring.io/spring-cloud/[Spring Cloud Project page]
-for details on setting up your build system with the current Spring Cloud Release Train.
-
-Example spring boot app
-
-[source,java,indent=0]
-----
-@SpringBootApplication
-@EnableFeignClients
-public class Application {
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
-----
-
-.StoreClient.java
-[source,java,indent=0]
-----
-@FeignClient("stores")
-public interface StoreClient {
- @RequestMapping(method = RequestMethod.GET, value = "/stores")
- List getStores();
-
- @RequestMapping(method = RequestMethod.GET, value = "/stores")
- Page getStores(Pageable pageable);
-
- @RequestMapping(method = RequestMethod.POST, value = "/stores/{storeId}", consumes = "application/json")
- Store update(@PathVariable("storeId") Long storeId, Store store);
-
- @RequestMapping(method = RequestMethod.DELETE, value = "/stores/{storeId:\\d+}")
- void delete(@PathVariable Long storeId);
-}
-----
-
-In the `@FeignClient` annotation the String value ("stores" above) is an arbitrary client name, which is used to create a https://github.com/spring-cloud/spring-cloud-commons/blob/main/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/blocking/client/BlockingLoadBalancerClient.java[Spring Cloud LoadBalancer client].
-You can also specify a URL using the `url` attribute
-(absolute value or just a hostname). The name of the bean in the
-application context is the fully qualified name of the interface.
-To specify your own alias value you can use the `qualifiers` value
-of the `@FeignClient` annotation.
-
-The load-balancer client above will want to discover the physical addresses
-for the "stores" service. If your application is a Eureka client then
-it will resolve the service in the Eureka service registry. If you
-don't want to use Eureka, you can configure a list of servers
-in your external configuration using https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#simplediscoveryclient[`SimpleDiscoveryClient`].
-
-Spring Cloud OpenFeign supports all the features available for the blocking mode of Spring Cloud LoadBalancer. You can read more about them in the https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#spring-cloud-loadbalancer[project documentation].
-
-TIP: To use `@EnableFeignClients` annotation on `@Configuration`-annotated-classes, make sure to specify where the clients are located, for example:
-`@EnableFeignClients(basePackages = "com.example.clients")`
-or list them explicitly:
-`@EnableFeignClients(clients = InventoryServiceFeignClient.class)`
-
-[[attribute-resolution-mode]]
-==== Attribute resolution mode
-
-While creating `Feign` client beans, we resolve the values passed via the `@FeignClient` annotation. As of `4.x`, the values are being resolved eagerly. This is a good solution for most use-cases, and it also allows for AOT support.
-
-If you need the attributes to be resolved lazily, set the `spring.cloud.openfeign.lazy-attributes-resolution` property value to `true`.
-
-TIP: For Spring Cloud Contract test integration, lazy attribute resolution should be used.
-
-[[spring-cloud-feign-overriding-defaults]]
-=== Overriding Feign Defaults
-
-A central concept in Spring Cloud's Feign support is that of the named client. Each feign client is part of an ensemble of components that work together to contact a remote server on demand, and the ensemble has a name that you give it as an application developer using the `@FeignClient` annotation. Spring Cloud creates a new ensemble as an
-`ApplicationContext` on demand for each named client using `FeignClientsConfiguration`. This contains (amongst other things) an `feign.Decoder`, a `feign.Encoder`, and a `feign.Contract`.
-It is possible to override the name of that ensemble by using the `contextId`
-attribute of the `@FeignClient` annotation.
-
-Spring Cloud lets you take full control of the feign client by declaring additional configuration (on top of the `FeignClientsConfiguration`) using `@FeignClient`. Example:
-
-[source,java,indent=0]
-----
-@FeignClient(name = "stores", configuration = FooConfiguration.class)
-public interface StoreClient {
- //..
-}
-----
-
-In this case the client is composed from the components already in `FeignClientsConfiguration` together with any in `FooConfiguration` (where the latter will override the former).
-
-NOTE: `FooConfiguration` does not need to be annotated with `@Configuration`. However, if it is, then take care to exclude it from any `@ComponentScan` that would otherwise include this configuration as it will become the default source for `feign.Decoder`, `feign.Encoder`, `feign.Contract`, etc., when specified. This can be avoided by putting it in a separate, non-overlapping package from any `@ComponentScan` or `@SpringBootApplication`, or it can be explicitly excluded in `@ComponentScan`.
-
-NOTE: Using `contextId` attribute of the `@FeignClient` annotation in addition to changing the name of
-the `ApplicationContext` ensemble, it will override the alias of the client name
-and it will be used as part of the name of the configuration bean created for that client.
-
-WARNING: Previously, using the `url` attribute, did not require the `name` attribute. Using `name` is now required.
-
-Placeholders are supported in the `name` and `url` attributes.
-
-[source,java,indent=0]
-----
-@FeignClient(name = "${feign.name}", url = "${feign.url}")
-public interface StoreClient {
- //..
-}
-----
-
-Spring Cloud OpenFeign provides the following beans by default for feign (`BeanType` beanName: `ClassName`):
-
-* `Decoder` feignDecoder: `ResponseEntityDecoder` (which wraps a `SpringDecoder`)
-* `Encoder` feignEncoder: `SpringEncoder`
-* `Logger` feignLogger: `Slf4jLogger`
-* `MicrometerObservationCapability` micrometerObservationCapability: If `feign-micrometer` is on the classpath and `ObservationRegistry` is available
-* `MicrometerCapability` micrometerCapability: If `feign-micrometer` is on the classpath, `MeterRegistry` is available and `ObservationRegistry` is not available
-* `CachingCapability` cachingCapability: If `@EnableCaching` annotation is used. Can be disabled via `spring.cloud.openfeign.cache.enabled`.
-* `Contract` feignContract: `SpringMvcContract`
-* `Feign.Builder` feignBuilder: `FeignCircuitBreaker.Builder`
-* `Client` feignClient: If Spring Cloud LoadBalancer is on the classpath, `FeignBlockingLoadBalancerClient` is used.
-If none of them is on the classpath, the default feign client is used.
-
-NOTE: `spring-cloud-starter-openfeign` supports `spring-cloud-starter-loadbalancer`. However, as is an optional dependency, you need to make sure it has been added to your project if you want to use it.
-
-The OkHttpClient, Apache HttpClient 5 and Http2Client Feign clients can be used by setting `spring.cloud.openfeign.okhttp.enabled` or `spring.cloud.openfeign.httpclient.hc5.enabled` or `spring.cloud.openfeign.http2client.enabled` to `true`, respectively, and having them on the classpath.
-You can customize the HTTP client used by providing a bean of either `org.apache.hc.client5.http.impl.classic.CloseableHttpClient` when using Apache HC5.
-
-You can further customise http clients by setting values in the `spring.cloud.openfeign.httpclient.xxx` properties. The ones prefixed just with `httpclient` will work for all the clients, the ones prefixed with `httpclient.hc5` to Apache HttpClient 5, the ones prefixed with `httpclient.okhttp` to OkHttpClient and the ones prefixed with `httpclient.http2` to Http2Client. You can find a full list of properties you can customise in the appendix.
-
-TIP: Starting with Spring Cloud OpenFeign 4, the Feign Apache HttpClient 4 is no longer supported. We suggest using Apache HttpClient 5 instead.
-
-Spring Cloud OpenFeign _does not_ provide the following beans by default for feign, but still looks up beans of these types from the application context to create the feign client:
-
-* `Logger.Level`
-* `Retryer`
-* `ErrorDecoder`
-* `Request.Options`
-* `Collection`
-* `SetterFactory`
-* `QueryMapEncoder`
-* `Capability` (`MicrometerObservationCapability` and `CachingCapability` are provided by default)
-
-A bean of `Retryer.NEVER_RETRY` with the type `Retryer` is created by default, which will disable retrying.
-Notice this retrying behavior is different from the Feign default one, where it will automatically retry IOExceptions,
-treating them as transient network related exceptions, and any RetryableException thrown from an ErrorDecoder.
-
-Creating a bean of one of those type and placing it in a `@FeignClient` configuration (such as `FooConfiguration` above) allows you to override each one of the beans described. Example:
-
-[source,java,indent=0]
-----
-@Configuration
-public class FooConfiguration {
- @Bean
- public Contract feignContract() {
- return new feign.Contract.Default();
- }
-
- @Bean
- public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
- return new BasicAuthRequestInterceptor("user", "password");
- }
-}
-----
-
-This replaces the `SpringMvcContract` with `feign.Contract.Default` and adds a `RequestInterceptor` to the collection of `RequestInterceptor`.
-
-`@FeignClient` also can be configured using configuration properties.
-
-application.yml
-[source,yaml]
-----
-spring:
- cloud:
- openfeign:
- client:
- config:
- feignName:
- url: http://remote-service.com
- connectTimeout: 5000
- readTimeout: 5000
- loggerLevel: full
- errorDecoder: com.example.SimpleErrorDecoder
- retryer: com.example.SimpleRetryer
- defaultQueryParameters:
- query: queryValue
- defaultRequestHeaders:
- header: headerValue
- requestInterceptors:
- - com.example.FooRequestInterceptor
- - com.example.BarRequestInterceptor
- responseInterceptor: com.example.BazResponseInterceptor
- dismiss404: false
- encoder: com.example.SimpleEncoder
- decoder: com.example.SimpleDecoder
- contract: com.example.SimpleContract
- capabilities:
- - com.example.FooCapability
- - com.example.BarCapability
- queryMapEncoder: com.example.SimpleQueryMapEncoder
- micrometer.enabled: false
-----
-`feignName` in this example refers to `@FeignClient` `value`, that is also aliased with `@FeignClient` `name` and `@FeignClient` `contextId`. In a load-balanced scenario, it also corresponds to the `serviceId` of the server app that will be used to retrieve the instances.
-
-
-Default configurations can be specified in the `@EnableFeignClients` attribute `defaultConfiguration` in a similar manner as described above. The difference is that this configuration will apply to _all_ feign clients.
-
-If you prefer using configuration properties to configure all `@FeignClient`, you can create configuration properties with `default` feign name.
-
-You can use `spring.cloud.openfeign.client.config.feignName.defaultQueryParameters` and `spring.cloud.openfeign.client.config.feignName.defaultRequestHeaders` to specify query parameters and headers that will be sent with every request of the client named `feignName`.
-
-application.yml
-[source,yaml]
-----
-spring:
- cloud:
- openfeign:
- client:
- config:
- default:
- connectTimeout: 5000
- readTimeout: 5000
- loggerLevel: basic
-----
-
-If we create both `@Configuration` bean and configuration properties, configuration properties will win.
-It will override `@Configuration` values. But if you want to change the priority to `@Configuration`,
-you can change `spring.cloud.openfeign.client.default-to-properties` to `false`.
-
-If we want to create multiple feign clients with the same name or url
-so that they would point to the same server but each with a different custom configuration then
-we have to use `contextId` attribute of the `@FeignClient` in order to avoid name
-collision of these configuration beans.
-
-[source,java,indent=0]
-----
-@FeignClient(contextId = "fooClient", name = "stores", configuration = FooConfiguration.class)
-public interface FooClient {
- //..
-}
-----
-
-[source,java,indent=0]
-----
-@FeignClient(contextId = "barClient", name = "stores", configuration = BarConfiguration.class)
-public interface BarClient {
- //..
-}
-----
-
-It is also possible to configure FeignClient not to inherit beans from the parent context.
-You can do this by overriding the `inheritParentConfiguration()` in a `FeignClientConfigurer`
-bean to return `false`:
-
-[source,java,indent=0]
-----
-@Configuration
-public class CustomConfiguration{
-
-@Bean
-public FeignClientConfigurer feignClientConfigurer() {
- return new FeignClientConfigurer() {
-
- @Override
- public boolean inheritParentConfiguration() {
- return false;
- }
- };
-
- }
-}
-----
-
-TIP: By default, Feign clients do not encode slash `/` characters. You can change this behaviour, by setting the value of `spring.cloud.openfeign.client.decodeSlash` to `false`.
-
-==== `SpringEncoder` configuration
-
-In the `SpringEncoder` that we provide, we set `null` charset for binary content types and `UTF-8` for all the other ones.
-
-You can modify this behaviour to derive the charset from the `Content-Type` header charset instead by setting the value of `spring.cloud.openfeign.encoder.charset-from-content-type` to `true`.
-
-[[timeout-handling]]
-=== Timeout Handling
-
-We can configure timeouts on both the default and the named client. OpenFeign works with two timeout parameters:
-
-- `connectTimeout` prevents blocking the caller due to the long server processing time.
-- `readTimeout` is applied from the time of connection establishment and is triggered when returning the response takes too long.
-
-NOTE: In case the server is not running or available a packet results in _connection refused_. The communication ends either with an error message or in a fallback. This can happen _before_ the `connectTimeout` if it is set very low. The time taken to perform a lookup and to receive such a packet causes a significant part of this delay. It is subject to change based on the remote host that involves a DNS lookup.
-
-=== Creating Feign Clients Manually
-
-In some cases it might be necessary to customize your Feign Clients in a way that is not
-possible using the methods above. In this case you can create Clients using the
-https://github.com/OpenFeign/feign/#basics[Feign Builder API]. Below is an example
-which creates two Feign Clients with the same interface but configures each one with
-a separate request interceptor.
-
-[source,java,indent=0]
-----
-@Import(FeignClientsConfiguration.class)
-class FooController {
-
- private FooClient fooClient;
-
- private FooClient adminClient;
-
- @Autowired
- public FooController(Client client, Encoder encoder, Decoder decoder, Contract contract, MicrometerObservationCapability micrometerObservationCapability) {
- this.fooClient = Feign.builder().client(client)
- .encoder(encoder)
- .decoder(decoder)
- .contract(contract)
- .addCapability(micrometerObservationCapability)
- .requestInterceptor(new BasicAuthRequestInterceptor("user", "user"))
- .target(FooClient.class, "https://PROD-SVC");
-
- this.adminClient = Feign.builder().client(client)
- .encoder(encoder)
- .decoder(decoder)
- .contract(contract)
- .addCapability(micrometerObservationCapability)
- .requestInterceptor(new BasicAuthRequestInterceptor("admin", "admin"))
- .target(FooClient.class, "https://PROD-SVC");
- }
-}
-----
-
-NOTE: In the above example `FeignClientsConfiguration.class` is the default configuration
-provided by Spring Cloud OpenFeign.
-
-NOTE: `PROD-SVC` is the name of the service the Clients will be making requests to.
-
-NOTE: The Feign `Contract` object defines what annotations and values are valid on interfaces. The
-autowired `Contract` bean provides supports for SpringMVC annotations, instead of
-the default Feign native annotations.
-
-You can also use the `Builder`to configure FeignClient not to inherit beans from the parent context.
-You can do this by overriding calling `inheritParentContext(false)` on the `Builder`.
-
-[[spring-cloud-feign-circuitbreaker]]
-=== Feign Spring Cloud CircuitBreaker Support
-
-If Spring Cloud CircuitBreaker is on the classpath and `spring.cloud.openfeign.circuitbreaker.enabled=true`, Feign will wrap all methods with a circuit breaker.
-
-To disable Spring Cloud CircuitBreaker support on a per-client basis create a vanilla `Feign.Builder` with the "prototype" scope, e.g.:
-
-[source,java,indent=0]
-----
-@Configuration
-public class FooConfiguration {
- @Bean
- @Scope("prototype")
- public Feign.Builder feignBuilder() {
- return Feign.builder();
- }
-}
-----
-
-The circuit breaker name follows this pattern `#()`. When calling a `@FeignClient` with `FooClient` interface and the called interface method that has no parameters is `bar` then the circuit breaker name will be `FooClient#bar()`.
-
-NOTE: As of 2020.0.2, the circuit breaker name pattern has changed from `_`.
-Using `CircuitBreakerNameResolver` introduced in 2020.0.4, circuit breaker names can retain the old pattern.
-
-Providing a bean of `CircuitBreakerNameResolver`, you can change the circuit breaker name pattern.
-[source,java,indent=0]
-----
-@Configuration
-public class FooConfiguration {
- @Bean
- public CircuitBreakerNameResolver circuitBreakerNameResolver() {
- return (String feignClientName, Target> target, Method method) -> feignClientName + "_" + method.getName();
- }
-}
-----
-
-To enable Spring Cloud CircuitBreaker group set the `spring.cloud.openfeign.circuitbreaker.group.enabled` property to `true` (by default `false`).
-
-[[spring-clou-feign-circuitbreaker-configurationproperties]]
-=== Configuring CircuitBreakers With Configuration Properties
-
-You can configure CircuitBreakers via configuration properties.
-
-For example, if you had this Feign client
-
-[source,java,indent=0]
-----
-@FeignClient(url = "http://localhost:8080")
-public interface DemoClient {
-
- @GetMapping("demo")
- String getDemo();
-}
-----
-
-You could configure it using configuration properties by doing the following
-
-[source,yaml,indent=0]
-----
-spring:
- cloud:
- openfeign:
- circuitbreaker:
- enabled: true
- alphanumeric-ids:
- enabled: true
-resilience4j:
- circuitbreaker:
- instances:
- DemoClientgetDemo:
- minimumNumberOfCalls: 69
- timelimiter:
- instances:
- DemoClientgetDemo:
- timeoutDuration: 10s
-----
-
-NOTE: If you want to switch back to the circuit breaker names used prior to Spring Cloud
-2022.0.0 you can set `spring.cloud.openfeign.circuitbreaker.alphanumeric-ids.enabled` to `false`.
-
-[[spring-cloud-feign-circuitbreaker-fallback]]
-=== Feign Spring Cloud CircuitBreaker Fallbacks
-
-Spring Cloud CircuitBreaker supports the notion of a fallback: a default code path that is executed when the circuit is open or there is an error. To enable fallbacks for a given `@FeignClient` set the `fallback` attribute to the class name that implements the fallback. You also need to declare your implementation as a Spring bean.
-
-[source,java,indent=0]
-----
-@FeignClient(name = "test", url = "http://localhost:${server.port}/", fallback = Fallback.class)
- protected interface TestClient {
-
- @RequestMapping(method = RequestMethod.GET, value = "/hello")
- Hello getHello();
-
- @RequestMapping(method = RequestMethod.GET, value = "/hellonotfound")
- String getException();
-
- }
-
- @Component
- static class Fallback implements TestClient {
-
- @Override
- public Hello getHello() {
- throw new NoFallbackAvailableException("Boom!", new RuntimeException());
- }
-
- @Override
- public String getException() {
- return "Fixed response";
- }
-
- }
-----
-
-If one needs access to the cause that made the fallback trigger, one can use the `fallbackFactory` attribute inside `@FeignClient`.
-
-[source,java,indent=0]
-----
-@FeignClient(name = "testClientWithFactory", url = "http://localhost:${server.port}/",
- fallbackFactory = TestFallbackFactory.class)
- protected interface TestClientWithFactory {
-
- @RequestMapping(method = RequestMethod.GET, value = "/hello")
- Hello getHello();
-
- @RequestMapping(method = RequestMethod.GET, value = "/hellonotfound")
- String getException();
-
- }
-
- @Component
- static class TestFallbackFactory implements FallbackFactory {
-
- @Override
- public FallbackWithFactory create(Throwable cause) {
- return new FallbackWithFactory();
- }
-
- }
-
- static class FallbackWithFactory implements TestClientWithFactory {
-
- @Override
- public Hello getHello() {
- throw new NoFallbackAvailableException("Boom!", new RuntimeException());
- }
-
- @Override
- public String getException() {
- return "Fixed response";
- }
-
- }
-----
-
-=== Feign and `@Primary`
-
-When using Feign with Spring Cloud CircuitBreaker fallbacks, there are multiple beans in the `ApplicationContext` of the same type. This will cause `@Autowired` to not work because there isn't exactly one bean, or one marked as primary. To work around this, Spring Cloud OpenFeign marks all Feign instances as `@Primary`, so Spring Framework will know which bean to inject. In some cases, this may not be desirable. To turn off this behavior set the `primary` attribute of `@FeignClient` to false.
-
-[source,java,indent=0]
-----
-@FeignClient(name = "hello", primary = false)
-public interface HelloClient {
- // methods here
-}
-----
-
-[[spring-cloud-feign-inheritance]]
-=== Feign Inheritance Support
-
-Feign supports boilerplate apis via single-inheritance interfaces.
-This allows grouping common operations into convenient base interfaces.
-
-.UserService.java
-[source,java,indent=0]
-----
-public interface UserService {
-
- @RequestMapping(method = RequestMethod.GET, value ="/users/{id}")
- User getUser(@PathVariable("id") long id);
-}
-----
-
-.UserResource.java
-[source,java,indent=0]
-----
-@RestController
-public class UserResource implements UserService {
-
-}
-----
-
-.UserClient.java
-[source,java,indent=0]
-----
-package project.user;
-
-@FeignClient("users")
-public interface UserClient extends UserService {
-
-}
-----
-
-WARNING: `@FeignClient` interfaces should not be shared between server and client and annotating `@FeignClient` interfaces with `@RequestMapping` on class level is no longer supported.
-
-=== Feign request/response compression
-
-You may consider enabling the request or response GZIP compression for your
-Feign requests. You can do this by enabling one of the properties:
-
-[source,java]
-----
-spring.cloud.openfeign.compression.request.enabled=true
-spring.cloud.openfeign.compression.response.enabled=true
-----
-
-Feign request compression gives you settings similar to what you may set for your web server:
-
-[source,java]
-----
-spring.cloud.openfeign.compression.request.enabled=true
-spring.cloud.openfeign.compression.request.mime-types=text/xml,application/xml,application/json
-spring.cloud.openfeign.compression.request.min-request-size=2048
-----
-
-These properties allow you to be selective about the compressed media types and minimum request threshold length.
-
-TIP: Since the OkHttpClient uses "transparent" compression, that is disabled if the `content-encoding` or `accept-encoding` header is present, we do not enable compression when `feign.okhttp.OkHttpClient` is present on the classpath and `spring.cloud.openfeign.okhttp.enabled` is set to `true`.
-
-=== Feign logging
-
-A logger is created for each Feign client created. By default, the name of the logger is the full class name of the interface used to create the Feign client. Feign logging only responds to the `DEBUG` level.
-
-.application.yml
-
-[source,yaml]
-----
-logging.level.project.user.UserClient: DEBUG
-----
-
-The `Logger.Level` object that you may configure per client, tells Feign how much to log. Choices are:
-
-* `NONE`, No logging (*DEFAULT*).
-* `BASIC`, Log only the request method and URL and the response status code and execution time.
-* `HEADERS`, Log the basic information along with request and response headers.
-* `FULL`, Log the headers, body, and metadata for both requests and responses.
-
-For example, the following would set the `Logger.Level` to `FULL`:
-
-[source,java,indent=0]
-----
-@Configuration
-public class FooConfiguration {
- @Bean
- Logger.Level feignLoggerLevel() {
- return Logger.Level.FULL;
- }
-}
-----
-
-=== Feign Capability support
-
-The Feign capabilities expose core Feign components so that these components can be modified. For example, the capabilities can take the `Client`, _decorate_ it, and give the decorated instance back to Feign.
-The support for Micrometer is a good real-life example for this. See <>.
-
-Creating one or more `Capability` beans and placing them in a `@FeignClient` configuration lets you register them and modify the behavior of the involved client.
-
-[source,java,indent=0]
-----
-@Configuration
-public class FooConfiguration {
- @Bean
- Capability customCapability() {
- return new CustomCapability();
- }
-}
-----
-
-=== Micrometer Support
-
-If all of the following conditions are true, a `MicrometerObservationCapability` bean is created and registered so that your Feign client is observable by Micrometer:
-
-* `feign-micrometer` is on the classpath
-* A `ObservationRegistry` bean is available
-* feign micrometer properties are set to `true` (by default)
- - `spring.cloud.openfeign.micrometer.enabled=true` (for all clients)
- - `spring.cloud.openfeign.client.config.feignName.micrometer.enabled=true` (for a single client)
-
-NOTE: If your application already uses Micrometer, enabling this feature is as simple as putting `feign-micrometer` onto your classpath.
-
-You can also disable the feature by either:
-
-* excluding `feign-micrometer` from your classpath
-* setting one of the feign micrometer properties to `false`
- - `spring.cloud.openfeign.micrometer.enabled=false`
- - `spring.cloud.openfeign.client.config.feignName.micrometer.enabled=false`
-
-NOTE: `spring.cloud.openfeign.micrometer.enabled=false` disables Micrometer support for *all* Feign clients regardless of the value of the client-level flags: `spring.cloud.openfeign.client.config.feignName.micrometer.enabled`.
-If you want to enable or disable Micrometer support per client, don't set `spring.cloud.openfeign.micrometer.enabled` and use `spring.cloud.openfeign.client.config.feignName.micrometer.enabled`.
-
-You can also customize the `MicrometerObservationCapability` by registering your own bean:
-
-[source,java,indent=0]
-----
-@Configuration
-public class FooConfiguration {
- @Bean
- public MicrometerObservationCapability micrometerObservationCapability(ObservationRegistry registry) {
- return new MicrometerObservationCapability(registry);
- }
-}
-----
-
-It is still possible to use `MicrometerCapability` with Feign (metrics-only support), you need to disable Micrometer support (`spring.cloud.openfeign.micrometer.enabled=false`) and create a `MicrometerCapability` bean:
-
-[source,java,indent=0]
-----
-@Configuration
-public class FooConfiguration {
- @Bean
- public MicrometerCapability micrometerCapability(MeterRegistry meterRegistry) {
- return new MicrometerCapability(meterRegistry);
- }
-}
-----
-
-=== Feign Caching
-
-If `@EnableCaching` annotation is used, a `CachingCapability` bean is created and registered so that your Feign client recognizes `@Cache*` annotations on its interface:
-
-[source,java,indent=0]
-----
-public interface DemoClient {
-
- @GetMapping("/demo/{filterParam}")
- @Cacheable(cacheNames = "demo-cache", key = "#keyParam")
- String demoEndpoint(String keyParam, @PathVariable String filterParam);
-}
-----
-
-You can also disable the feature via property `spring.cloud.openfeign.cache.enabled=false`.
-
-=== Feign @QueryMap support
-
-Spring Cloud OpenFeign provides an equivalent `@SpringQueryMap` annotation, which
-is used to annotate a POJO or Map parameter as a query parameter map.
-
-For example, the `Params` class defines parameters `param1` and `param2`:
-
-[source,java,indent=0]
-----
-// Params.java
-public class Params {
- private String param1;
- private String param2;
-
- // [Getters and setters omitted for brevity]
-}
-----
-
-The following feign client uses the `Params` class by using the `@SpringQueryMap` annotation:
-
-[source,java,indent=0]
-----
-@FeignClient("demo")
-public interface DemoTemplate {
-
- @GetMapping(path = "/demo")
- String demoEndpoint(@SpringQueryMap Params params);
-}
-----
-
-If you need more control over the generated query parameter map, you can implement a custom `QueryMapEncoder` bean.
-
-=== HATEOAS support
-
-Spring provides some APIs to create REST representations that follow the https://en.wikipedia.org/wiki/HATEOAS[HATEOAS] principle, https://spring.io/projects/spring-hateoas[Spring Hateoas] and https://spring.io/projects/spring-data-rest[Spring Data REST].
-
-If your project use the `org.springframework.boot:spring-boot-starter-hateoas` starter
-or the `org.springframework.boot:spring-boot-starter-data-rest` starter, Feign HATEOAS support is enabled by default.
-
-When HATEOAS support is enabled, Feign clients are allowed to serialize
-and deserialize HATEOAS representation models: https://docs.spring.io/spring-hateoas/docs/1.0.0.M1/apidocs/org/springframework/hateoas/EntityModel.html[EntityModel], https://docs.spring.io/spring-hateoas/docs/1.0.0.M1/apidocs/org/springframework/hateoas/CollectionModel.html[CollectionModel] and https://docs.spring.io/spring-hateoas/docs/1.0.0.M1/apidocs/org/springframework/hateoas/PagedModel.html[PagedModel].
-
-[source,java,indent=0]
-----
-@FeignClient("demo")
-public interface DemoTemplate {
-
- @GetMapping(path = "/stores")
- CollectionModel getStores();
-}
-----
-
-=== Spring @MatrixVariable Support
-
-Spring Cloud OpenFeign provides support for the Spring `@MatrixVariable` annotation.
-
-If a map is passed as the method argument, the `@MatrixVariable` path segment is created by joining key-value pairs from the map with a `=`.
-
-If a different object is passed, either the `name` provided in the `@MatrixVariable` annotation (if defined) or the annotated variable name is
-joined with the provided method argument using `=`.
-
-IMPORTANT:: Even though, on the server side, Spring does not require the users to name the path segment placeholder same as the matrix variable name, since it would be too ambiguous on the client side, Spring Cloud OpenFeign requires that you add a path segment placeholder with a name matching either the `name` provided in the `@MatrixVariable` annotation (if defined) or the annotated variable name.
-
-For example:
-
-[source,java,indent=0]
-----
-@GetMapping("/objects/links/{matrixVars}")
-Map> getObjects(@MatrixVariable Map> matrixVars);
-----
-Note that both variable name and the path segment placeholder are called `matrixVars`.
-
-[source,java,indent=0]
-----
-@FeignClient("demo")
-public interface DemoTemplate {
-
- @GetMapping(path = "/stores")
- CollectionModel getStores();
-}
-----
-
-=== Feign `CollectionFormat` support
-We support `feign.CollectionFormat` by providing the `@CollectionFormat` annotation.
-You can annotate a Feign client method (or the whole class to affect all methods) with it by passing the desired `feign.CollectionFormat` as annotation value.
-
-In the following example, the `CSV` format is used instead of the default `EXPLODED` to process the method.
-
-[source,java,indent=0]
-----
-@FeignClient(name = "demo")
-protected interface DemoFeignClient {
-
- @CollectionFormat(feign.CollectionFormat.CSV)
- @GetMapping(path = "/test")
- ResponseEntity performRequest(String test);
-
-}
-----
-
-=== Reactive Support
-As the https://github.com/OpenFeign/feign[OpenFeign project] does not currently support reactive clients, such as https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/reactive/function/client/WebClient.html[Spring WebClient], neither does Spring Cloud OpenFeign.We will add support for it here as soon as it becomes available in the core project.
-
-Until that is done, we recommend using https://github.com/Playtika/feign-reactive[feign-reactive] for Spring WebClient support.
-
-==== Early Initialization Errors
-
-Depending on how you are using your Feign clients you may see initialization errors when starting your application.
-To work around this problem you can use an `ObjectProvider` when autowiring your client.
-
-[source,java,indent=0]
-----
-@Autowired
-ObjectProvider testFeignClient;
-----
-
-=== Spring Data Support
-
-If Jackson Databind and Spring Data Commons are on the classpath, converters for `org.springframework.data.domain.Page` and `org.springframework.data.domain.Sort` will be added automatically.
-
-To disable this behaviour set
-[source,java]
-----
-spring.cloud.openfeign.autoconfiguration.jackson.enabled=false
-----
-
-See `org.springframework.cloud.openfeign.FeignAutoConfiguration.FeignJacksonConfiguration` for details.
-
-=== Spring `@RefreshScope` Support
-If Feign client refresh is enabled, each Feign client is created with:
-
-* `feign.Request.Options` as a refresh-scoped bean. This means properties such as `connectTimeout` and `readTimeout` can be refreshed against any Feign client instance.
-* A url wrapped under `org.springframework.cloud.openfeign.RefreshableUrl`. This means the URL of Feign client, if defined
-with `spring.cloud.openfeign.client.config.{feignName}.url` property, can be refreshed against any Feign client instance.
-
-You can refresh these properties through `POST /actuator/refresh`.
-
-By default, refresh behavior in Feign clients is disabled. Use the following property to enable refresh behavior:
-[source,java]
-----
-spring.cloud.openfeign.client.refresh-enabled=true
-----
-TIP: DO NOT annotate the `@FeignClient` interface with the `@RefreshScope` annotation.
-
-=== OAuth2 Support
-OAuth2 support can be enabled by setting following flag:
-----
-spring.cloud.openfeign.oauth2.enabled=true
-----
-When the flag is set to true, and the oauth2 client context resource details are present, a bean of class `OAuth2AccessTokenInterceptor` is created. Before each request, the interceptor resolves the required access token and includes it as a header.
-`OAuth2AccessTokenInterceptor` uses the `OAuth2AuthorizedClientManager` to get `OAuth2AuthorizedClient` that holds an `OAuth2AccessToken`. If the user has specified an OAuth2 `clientRegistrationId` using the `spring.cloud.openfeign.oauth2.clientRegistrationId` property, it will be used to retrieve the token. If the token is not retrieved or the `clientRegistrationId` has not been specified, the `serviceId` retrieved from the `url` host segment will be used.
-
-TIP:: Using the `serviceId` as OAuth2 client registrationId is convenient for load-balanced Feign clients. For non-load-balanced ones, the property-based `clientRegistrationId` is a suitable approach.
-
-TIP:: If you do not want to use the default setup for the `OAuth2AuthorizedClientManager`, you can just instantiate a bean of this type in your configuration.
-
-=== Transform the load-balanced HTTP request
-
-You can use the selected `ServiceInstance` to transform the load-balanced HTTP Request.
-
-For `Request`, you need to implement and define `LoadBalancerFeignRequestTransformer`, as follows:
-
-[source,java,indent=0]
-----
- @Bean
- public LoadBalancerFeignRequestTransformer transformer() {
- return new LoadBalancerFeignRequestTransformer() {
-
- @Override
- public Request transformRequest(Request request, ServiceInstance instance) {
- Map> headers = new HashMap<>(request.headers());
- headers.put("X-ServiceId", Collections.singletonList(instance.getServiceId()));
- headers.put("X-InstanceId", Collections.singletonList(instance.getInstanceId()));
- return Request.create(request.httpMethod(), request.url(), headers, request.body(), request.charset(),
- request.requestTemplate());
- }
- };
- }
-----
-
-If multiple transformers are defined, they are applied in the order in which beans are defined.
-Alternatively, you can use `LoadBalancerFeignRequestTransformer.DEFAULT_ORDER` to specify the order.
-
-=== X-Forwarded Headers Support
-
-`X-Forwarded-Host` and `X-Forwarded-Proto` support can be enabled by setting following flag:
-
-[source,properties]
-----
-spring.cloud.loadbalancer.x-forwarded.enabled=true
-----
-
-=== Supported Ways To Provide URL To A Feign Client
-You can provide a URL to a Feign client in any of the following ways:
-
-|===
-|Case |Example |Details
-
-|The URL is provided in the `@FeignClient` annotation.
-|`@FeignClient(name="testClient", url="http://localhost:8081")`
-|The URL is resolved from the `url` attribute of the annotation, without load-balancing.
-
-|The URL is provided in the `@FeignClient` annotation and in the
-configuration properties.
-|`@FeignClient(name="testClient", url="http://localhost:8081")` and the property defined in `application.yml` as
-`spring.cloud.openfeign.client.config.testClient.url=http://localhost:8081`
-|The URL is resolved from the `url` attribute of the annotation, without load-balancing.
-The URL provided in the configuration properties remains unused.
-
-|The URL is not provided in the `@FeignClient` annotation but is provided in configuration properties.
-| `@FeignClient(name="testClient")` and the property defined in `application.yml` as
-`spring.cloud.openfeign.client.config.testClient.url=http://localhost:8081`
-|The URL is resolved from configuration properties, without load-balancing. If
-`spring.cloud.openfeign.client.refresh-enabled=true`, then the URL defined in configuration properties can be refreshed as described in <>.
-
-|The URL is neither provided in the `@FeignClient` annotation nor in configuration properties.
-|`@FeignClient(name="testClient")`
-|The URL is resolved from `name` attribute of annotation, with load balancing.
-
-|===
-
-=== AOT and Native Image Support
-
-Spring Cloud OpenFeign supports Spring AOT transformations and native images, however, only with refresh mode disabled, Feign clients refresh disabled (default setting) and <> disabled (default setting).
-
-WARNING: If you want to run Spring Cloud OpenFeign clients in AOT or native image modes, make sure to set `spring.cloud.refresh.enabled` to `false`.
-
-TIP: If you want to run Spring Cloud OpenFeign clients in AOT or native image modes, ensure `spring.cloud.openfeign.client.refresh-enabled` has not been set to `true`.
-
-TIP: If you want to run Spring Cloud OpenFeign clients in AOT or native image modes, ensure `spring.cloud.openfeign.lazy-attributes-resolution` has not been set to `true`.
-
-TIP: However, if you set the `url` value via properties, it is possible to override the `@FeignClient` `url` value by running the image with `-Dspring.cloud.openfeign.client.config.[clientId].url=[url]` flag. In order to enable overriding, a `url` value also has to be set via properties and not `@FeignClient` attribute during buildtime.
-
-== Configuration properties
-
-To see the list of all Spring Cloud OpenFeign related configuration properties please check link:appendix.html[the Appendix page].
diff --git a/mvnw b/mvnw
index 8d937f4c1..41c0f0c23 100755
--- a/mvnw
+++ b/mvnw
@@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
-# Apache Maven Wrapper startup batch script, version 3.2.0
+# Maven Start Up Batch script
#
# Required ENV vars:
# ------------------
@@ -27,6 +27,7 @@
#
# Optional ENV vars
# -----------------
+# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@@ -35,10 +36,6 @@
if [ -z "$MAVEN_SKIP_RC" ] ; then
- if [ -f /usr/local/etc/mavenrc ] ; then
- . /usr/local/etc/mavenrc
- fi
-
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
@@ -53,7 +50,7 @@ fi
cygwin=false;
darwin=false;
mingw=false
-case "$(uname)" in
+case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
@@ -61,9 +58,9 @@ case "$(uname)" in
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
- JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
+ export JAVA_HOME="`/usr/libexec/java_home`"
else
- JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
+ export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
@@ -71,38 +68,68 @@ esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=$(java-config --jre-home)
+ JAVA_HOME=`java-config --jre-home`
fi
fi
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
- JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
- CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
- [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
- JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi
if [ -z "$JAVA_HOME" ]; then
- javaExecutable="$(which javac)"
- if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
- readLink=$(which readlink)
- if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
- javaHome="$(dirname "\"$javaExecutable\"")"
- javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
- javaExecutable="$(readlink -f "\"$javaExecutable\"")"
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
- javaHome="$(dirname "\"$javaExecutable\"")"
- javaHome=$(expr "$javaHome" : '\(.*\)/bin')
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
@@ -118,7 +145,7 @@ if [ -z "$JAVACMD" ] ; then
JAVACMD="$JAVA_HOME/bin/java"
fi
else
- JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
+ JAVACMD="`which java`"
fi
fi
@@ -132,9 +159,12 @@ if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
+
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
@@ -150,99 +180,96 @@ find_maven_basedir() {
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
- wdir=$(cd "$wdir/.." || exit 1; pwd)
+ wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
- printf '%s' "$(cd "$basedir" || exit 1; pwd)"
+ echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
- # Remove \r in case we run on Windows within Git Bash
- # and check out the repository with auto CRLF management
- # enabled. Otherwise, we may read lines that are delimited with
- # \r\n and produce $'-Xarg\r' rather than -Xarg due to word
- # splitting rules.
- tr -s '\r\n' ' ' < "$1"
- fi
-}
-
-log() {
- if [ "$MVNW_VERBOSE" = true ]; then
- printf '%s\n' "$1"
+ echo "$(tr -s '\n' ' ' < "$1")"
fi
}
-BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
+BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
-MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
-log "$MAVEN_PROJECTBASEDIR"
-
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
-wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
-if [ -r "$wrapperJarPath" ]; then
- log "Found $wrapperJarPath"
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
else
- log "Couldn't find $wrapperJarPath, downloading it ..."
-
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
if [ -n "$MVNW_REPOURL" ]; then
- wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
else
- wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
fi
- while IFS="=" read -r key value; do
- # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
- safeValue=$(echo "$value" | tr -d '\r')
- case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
- done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
- log "Downloading from: $wrapperUrl"
-
+ 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 $cygwin; then
- wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
fi
if command -v wget > /dev/null; then
- log "Found wget ... using wget"
- [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ wget "$jarUrl" -O "$wrapperJarPath"
else
- wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
- log "Found curl ... using curl"
- [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
+ curl -o "$wrapperJarPath" "$jarUrl" -f
else
- curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi
+
else
- log "Falling back to using Java to download"
- javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
- javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
- javaSource=$(cygpath --path --windows "$javaSource")
- javaClass=$(cygpath --path --windows "$javaClass")
+ javaClass=`cygpath --path --windows "$javaClass"`
fi
- if [ -e "$javaSource" ]; then
- if [ ! -e "$javaClass" ]; then
- log " - Compiling MavenWrapperDownloader.java ..."
- ("$JAVA_HOME/bin/javac" "$javaSource")
+ 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 "$javaClass" ]; then
- log " - Running MavenWrapperDownloader.java ..."
- ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
+ 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
@@ -251,58 +278,33 @@ fi
# End of extension
##########################################################################################
-# If specified, validate the SHA-256 sum of the Maven wrapper jar file
-wrapperSha256Sum=""
-while IFS="=" read -r key value; do
- case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
- esac
-done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
-if [ -n "$wrapperSha256Sum" ]; then
- wrapperSha256Result=false
- if command -v sha256sum > /dev/null; then
- if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
- wrapperSha256Result=true
- fi
- elif command -v shasum > /dev/null; then
- if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
- wrapperSha256Result=true
- fi
- else
- echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
- echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
- exit 1
- fi
- if [ $wrapperSha256Result = false ]; then
- echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
- echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
- echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
- exit 1
- fi
+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"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
- JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
- CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
- MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-# shellcheck disable=SC2086 # safe args
exec "$JAVACMD" \
$MAVEN_OPTS \
- $MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
index c4586b564..86115719e 100644
--- a/mvnw.cmd
+++ b/mvnw.cmd
@@ -18,12 +18,13 @@
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
-@REM Apache Maven Wrapper startup batch script, version 3.2.0
+@REM Maven 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 keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@@ -45,8 +46,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
-if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
@@ -119,10 +120,10 @@ 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 WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
-FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
- IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
+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
@@ -133,11 +134,11 @@ if exist %WRAPPER_JAR% (
)
) else (
if not "%MVNW_REPOURL%" == "" (
- SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
- echo Downloading from: %WRAPPER_URL%
+ echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
@@ -145,7 +146,7 @@ if exist %WRAPPER_JAR% (
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
@@ -153,35 +154,11 @@ if exist %WRAPPER_JAR% (
)
@REM End of extension
-@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
-SET WRAPPER_SHA_256_SUM=""
-FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
- IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
-)
-IF NOT %WRAPPER_SHA_256_SUM%=="" (
- powershell -Command "&{"^
- "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
- "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
- " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
- " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
- " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
- " exit 1;"^
- "}"^
- "}"
- if ERRORLEVEL 1 goto error
-)
-
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
-%MAVEN_JAVA_EXE% ^
- %JVM_CONFIG_MAVEN_PROPS% ^
- %MAVEN_OPTS% ^
- %MAVEN_DEBUG_OPTS% ^
- -classpath %WRAPPER_JAR% ^
- "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
- %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+%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
@@ -191,15 +168,15 @@ set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
-if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
-if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+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_BATCH_PAUSE%" == "on" pause
-if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-cmd /C exit /B %ERROR_CODE%
+exit /B %ERROR_CODE%
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..bafa987d1
--- /dev/null
+++ b/package.json
@@ -0,0 +1,10 @@
+{
+ "dependencies": {
+ "antora": "3.2.0-alpha.11",
+ "@antora/atlas-extension": "1.0.0-alpha.5",
+ "@antora/collector-extension": "1.0.3",
+ "@asciidoctor/tabs": "1.0.0-beta.6",
+ "@springio/antora-extensions": "1.14.11",
+ "@springio/asciidoctor-extensions": "1.0.0-alpha.18"
+ }
+}
diff --git a/pom.xml b/pom.xml
index 5d341fa67..637bcb3bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,238 +1,53 @@
-
-
+
+
+
4.0.0
- spring-cloud-openfeign
- 4.1.0-SNAPSHOT
- pom
- Spring Cloud OpenFeign
- Spring Cloud OpenFeign
+
+ spring-cloud-openfeign-docs-build
+ ${parent.version}org.springframework.cloud
- spring-cloud-build
- 4.1.0-SNAPSHOT
-
+ spring-cloud-openfeign
+ 4.1.4-SNAPSHOT
+
+ Spring Cloud Openfeign Docs Build
+ Builds Spring Cloud Openfeign Docs.
+ https://spring.io/projects/spring-cloud-openfeign
- https://github.com/spring-cloud/spring-cloud-openfeign
- scm:git:git://github.com/spring-cloud/spring-cloud-openfeign.git
+ scm:git:https://github.com/spring-cloud/spring-cloud-openfeign.git
- scm:git:ssh://git@github.com/spring-cloud/spring-cloud-openfeign.git
+ scm:git:git@github.com:spring-cloud/spring-cloud-openfeign.git
- HEAD
+ https://github.com/spring-cloud/spring-cloud-openfeign
-
- ${basedir}
- 2.11.3
- 4.1.0-SNAPSHOT
-
-
- 2.10
-
- 2.19.1
- jacoco
- reuseReports
- ${project.basedir}/../target/jacoco.exec
-
- java
-
+
+ https://github.com/spring-cloud/spring-cloud-openfeign/issues
+
- org.codehaus.mojo
- flatten-maven-plugin
-
-
- org.apache.maven.plugins
- maven-eclipse-plugin
- ${maven-eclipse-plugin.version}
-
- false
-
-
- .settings/org.eclipse.jdt.ui.prefs
- ${main.basedir}/eclipse/org.eclipse.jdt.ui.prefs
-
-
-
- .settings/org.eclipse.jdt.core.prefs
- ${main.basedir}/eclipse/org.eclipse.jdt.core.prefs
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
-
- io.spring.javaformat
- spring-javaformat-maven-plugin
-
-
- org.basepom.maven
- duplicate-finder-maven-plugin
-
-
- mozilla/public-suffix-list.txt
-
-
+ org.antora
+ antora-maven-plugin
-
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
-
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-commons-dependencies
- ${spring-cloud-commons.version}
- pom
- import
-
-
- org.springframework.cloud
- spring-cloud-openfeign-dependencies
- ${project.version}
- pom
- import
-
-
- org.springframework.cloud
- spring-cloud-test-support
- test
- ${spring-cloud-commons.version}
-
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-smile
- ${jackson.version}
-
-
-
-
- spring-cloud-openfeign-dependencies
- spring-cloud-openfeign-core
- spring-cloud-starter-openfeign
- docs
-
-
-
- spring
-
-
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/snapshot
-
- true
-
-
- false
-
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
-
- false
-
-
-
- spring-releases
- Spring Releases
- https://repo.spring.io/release
-
- false
-
-
-
-
-
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/snapshot
-
- true
-
-
- false
-
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
-
- false
-
-
-
- spring-releases
- Spring Releases
- https://repo.spring.io/release
-
- false
-
-
-
-
-
- sonar
-
-
-
- org.jacoco
- jacoco-maven-plugin
-
-
- pre-unit-test
-
- prepare-agent
-
-
- surefireArgLine
- ${project.build.directory}/jacoco.exec
-
-
-
-
- post-unit-test
- test
-
- report
-
-
-
- ${project.build.directory}/jacoco.exec
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- ${surefireArgLine} --add-opens=java.base/java.net=ALL-UNNAMED
-
-
-
-
-
-
+
+
+ spring-snapshot
+ https://repo.spring.io/snapshot
+
+ true
+
+
+ false
+
+
+
+ spring-milestone
+ https://repo.spring.io/milestone
+
+
diff --git a/spring-cloud-openfeign-core/.flattened-pom.xml b/spring-cloud-openfeign-core/.flattened-pom.xml
new file mode 100644
index 000000000..645f3fb9a
--- /dev/null
+++ b/spring-cloud-openfeign-core/.flattened-pom.xml
@@ -0,0 +1,302 @@
+
+
+ 4.0.0
+
+ org.springframework.cloud
+ spring-cloud-openfeign
+ 4.1.0-SNAPSHOT
+ ..
+
+ org.springframework.cloud
+ spring-cloud-openfeign-core
+ 4.1.0-SNAPSHOT
+ Spring Cloud OpenFeign Core
+ Spring Cloud OpenFeign Core
+ https://spring.io/spring-cloud/spring-cloud-openfeign/spring-cloud-openfeign-core
+
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+
+
+ Apache License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0
+ Copyright 2014-2021 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.
+
+
+
+
+ dsyer
+ Dave Syer
+ dsyer at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ lead
+
+
+
+ sgibb
+ Spencer Gibb
+ sgibb at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ lead
+
+
+
+ mgrzejszczak
+ Marcin Grzejszczak
+ mgrzejszczak at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+ rbaxter
+ Ryan Baxter
+ rbaxter at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+ omaciaszeksharma
+ Olga Maciaszek-Sharma
+ omaciaszeksharma at pivotal.io
+ Pivotal Software, Inc.
+ https://www.spring.io
+
+ developer
+
+
+
+
+ scm:git:git://github.com/spring-cloud/spring-cloud-openfeign.git/spring-cloud-openfeign-core
+ scm:git:ssh://git@github.com/spring-cloud/spring-cloud-openfeign.git/spring-cloud-openfeign-core
+ https://github.com/spring-cloud/spring-cloud-openfeign
+
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure
+ 3.2.0-SNAPSHOT
+ compile
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-webflux
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-reactor-netty
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-hateoas
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ io.netty
+ netty-codec-http
+ 4.1.97.Final
+ compile
+ true
+
+
+ io.projectreactor
+ reactor-core
+ 3.6.0-M3
+ compile
+ true
+
+
+ org.springframework.retry
+ spring-retry
+ 2.0.3-SNAPSHOT
+ compile
+
+
+ javax.annotation
+ javax.annotation-api
+
+
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+ 3.2.0-SNAPSHOT
+ compile
+
+
+ org.springframework.cloud
+ spring-cloud-commons
+ 4.1.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-context
+ 4.1.0-SNAPSHOT
+ compile
+ true
+
+
+ io.github.openfeign
+ feign-core
+ 12.4
+ compile
+ true
+
+
+ io.github.openfeign.form
+ feign-form-spring
+ 3.8.0
+ compile
+
+
+ commons-io
+ commons-io
+
+
+ commons-fileupload
+ commons-fileupload
+
+
+
+
+ commons-fileupload
+ commons-fileupload
+ 1.5
+ compile
+
+
+ io.github.openfeign
+ feign-slf4j
+ 12.4
+ compile
+ true
+
+
+ io.github.openfeign
+ feign-micrometer
+ 12.4
+ compile
+ true
+
+
+ io.github.openfeign
+ feign-hc5
+ 12.4
+ compile
+ true
+
+
+ io.github.openfeign
+ feign-okhttp
+ 12.4
+ compile
+ true
+
+
+ io.github.openfeign
+ feign-java11
+ 12.4
+ compile
+ true
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.11.0
+ compile
+ true
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure-processor
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.data
+ spring-data-commons
+ 3.2.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-loadbalancer
+ 4.1.0-SNAPSHOT
+ compile
+ true
+
+
+ org.springframework.security
+ spring-security-oauth2-client
+ 6.2.0-SNAPSHOT
+ compile
+ true
+
+
+
diff --git a/spring-cloud-openfeign-core/pom.xml b/spring-cloud-openfeign-core/pom.xml
deleted file mode 100644
index cc62b6478..000000000
--- a/spring-cloud-openfeign-core/pom.xml
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
- 4.0.0
-
- org.springframework.cloud
- spring-cloud-openfeign
- 4.1.0-SNAPSHOT
- ..
-
-
- https://github.com/spring-cloud/spring-cloud-openfeign
-
- spring-cloud-openfeign-core
- jar
- Spring Cloud OpenFeign Core
- Spring Cloud OpenFeign Core
-
- ${basedir}/..
-
-
-
- org.springframework.boot
- spring-boot-autoconfigure
-
-
- org.springframework.boot
- spring-boot-starter-actuator
- true
-
-
- org.springframework.boot
- spring-boot-starter-security
- true
-
-
- org.springframework.boot
- spring-boot-starter-web
- true
-
-
- org.springframework.boot
- spring-boot-starter-webflux
- true
-
-
- org.springframework.boot
- spring-boot-starter-reactor-netty
- true
-
-
- org.springframework.boot
- spring-boot-starter-hateoas
- true
-
-
- io.netty
- netty-codec-http
- true
-
-
- io.projectreactor
- reactor-core
- true
-
-
- org.springframework.retry
- spring-retry
- true
-
-
- javax.annotation
- javax.annotation-api
-
-
-
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
- org.springframework.cloud
- spring-cloud-commons
- true
-
-
- org.springframework.cloud
- spring-cloud-context
- true
-
-
- io.github.openfeign
- feign-core
- true
-
-
- io.github.openfeign.form
- feign-form-spring
-
-
-
- commons-io
- commons-io
-
-
- commons-fileupload
- commons-fileupload
-
-
-
-
- commons-fileupload
- commons-fileupload
-
-
- io.github.openfeign
- feign-slf4j
- true
-
-
- io.github.openfeign
- feign-micrometer
- true
-
-
- io.github.openfeign
- feign-hc5
- true
-
-
- io.github.openfeign
- feign-okhttp
- true
-
-
- io.github.openfeign
- feign-java11
- true
-
-
- com.squareup.okhttp3
- okhttp
- true
-
-
- org.springframework.boot
- spring-boot-autoconfigure-processor
- true
-
-
- org.springframework.boot
- spring-boot-configuration-processor
- true
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.springframework.cloud
- spring-cloud-test-support
- test
-
-
- org.springframework.data
- spring-data-commons
- true
-
-
- io.projectreactor
- reactor-test
- test
-
-
- org.springframework.boot
- spring-boot-starter-data-rest
- test
-
-
- com.googlecode.protobuf-java-format
- protobuf-java-format
- 1.4
- test
-
-
- com.google.protobuf
- protobuf-java
- 3.19.6
- test
-
-
- io.vavr
- vavr
- 0.10.4
- test
-
-
- org.springframework.cloud
- spring-cloud-loadbalancer
- true
-
-
- commons-io
- commons-io
- 2.11.0
- test
-
-
- org.springframework
- spring-core-test
- test
-
-
- org.junit.platform
- junit-platform-launcher
- test
-
-
- org.springframework.security
- spring-security-oauth2-client
- true
-
-
-
-
- java8plus
-
- [1.8,2.0)
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- -parameters
-
-
-
-
-
-
-
-
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/AnnotatedParameterProcessor.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/AnnotatedParameterProcessor.java
deleted file mode 100644
index 13cfaff0d..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/AnnotatedParameterProcessor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-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 setTemplateParameter(String name, Collection rest);
-
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CachingCapability.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CachingCapability.java
deleted file mode 100644
index f323350bb..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CachingCapability.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import feign.Capability;
-import feign.InvocationHandlerFactory;
-
-import org.springframework.cache.interceptor.CacheInterceptor;
-
-/**
- * Allows Spring's @Cache* annotations to be declared on the feign client's methods.
- *
- * @author Sam Kruglov
- */
-public class CachingCapability implements Capability {
-
- private final CacheInterceptor cacheInterceptor;
-
- public CachingCapability(CacheInterceptor cacheInterceptor) {
- this.cacheInterceptor = cacheInterceptor;
- }
-
- @Override
- public InvocationHandlerFactory enrich(InvocationHandlerFactory invocationHandlerFactory) {
- return new FeignCachingInvocationHandlerFactory(invocationHandlerFactory, cacheInterceptor);
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CircuitBreakerNameResolver.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CircuitBreakerNameResolver.java
deleted file mode 100644
index 67db1158e..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CircuitBreakerNameResolver.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import java.lang.reflect.Method;
-
-import feign.Target;
-
-/**
- * Used to resolve a circuitbreaker name which will be used in
- * {@link org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory}.
- *
- * @author Kwangyong Kim
- * @since 2020.0.4
- */
-public interface CircuitBreakerNameResolver {
-
- String resolveCircuitBreakerName(String feignClientName, Target> target, Method method);
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CollectionFormat.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CollectionFormat.java
deleted file mode 100644
index 9286b86ad..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/CollectionFormat.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Indicates which collection format should be used while processing the annotated method.
- *
- * @author Olga Maciaszek-Sharma
- * @author Sam Kruglov
- * @see feign.CollectionFormat
- */
-@Target({ ElementType.METHOD, ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface CollectionFormat {
-
- /**
- * Allows setting the {@link feign.CollectionFormat} to be used while processing the
- * annotated method.
- * @return the {@link feign.CollectionFormat} to be used
- */
- feign.CollectionFormat value();
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/DefaultFeignLoggerFactory.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/DefaultFeignLoggerFactory.java
deleted file mode 100644
index 41e9635c7..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/DefaultFeignLoggerFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2016-2022 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.openfeign;
-
-import feign.Logger;
-import feign.slf4j.Slf4jLogger;
-
-/**
- * @author Venil Noronha
- * @author Olga Maciaszek-Sharma
- */
-public class DefaultFeignLoggerFactory implements FeignLoggerFactory {
-
- private final Logger logger;
-
- public DefaultFeignLoggerFactory(Logger logger) {
- this.logger = logger;
- }
-
- @Override
- public Logger create(Class> type) {
- return this.logger != null ? this.logger : new Slf4jLogger(type);
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/DefaultTargeter.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/DefaultTargeter.java
deleted file mode 100644
index 29d9c2154..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/DefaultTargeter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import feign.Feign;
-import feign.Target;
-
-/**
- * @author Spencer Gibb
- */
-class DefaultTargeter implements Targeter {
-
- @Override
- public T target(FeignClientFactoryBean factory, Feign.Builder feign, FeignClientFactory context,
- Target.HardCodedTarget target) {
- return feign.target(target);
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/EnableFeignClients.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/EnableFeignClients.java
deleted file mode 100644
index e09cddfe4..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/EnableFeignClients.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-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 org.springframework.cloud.openfeign.FeignClient} @FeignClient).
- * Configures component scanning directives for use with
- * {@link org.springframework.context.annotation.Configuration}
- * @Configuration 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.
- *
- * {@link #value()} is an alias for (and mutually exclusive with) this attribute.
- *
- * 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.
- *
- * 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 @Configuration for all feign clients. Can contain override
- * @Bean 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
- * @return list of default configurations
- */
- Class>[] defaultConfiguration() default {};
-
- /**
- * List of classes annotated with @FeignClient. If not empty, disables classpath
- * scanning.
- * @return list of FeignClient classes
- */
- Class>[] clients() default {};
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FallbackFactory.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FallbackFactory.java
deleted file mode 100644
index 4d87adeb5..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FallbackFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import static feign.Util.checkNotNull;
-
-/**
- * Used to control the fallback given its cause.
- *
- * Ex.
- *
- *
- * {@code
- * // This instance will be invoked if there are errors of any kind.
- * FallbackFactory fallbackFactory = cause -> (owner, repo) -> {
- * if (cause instanceof FeignException && ((FeignException) cause).status() == 403) {
- * return Collections.emptyList();
- * } else {
- * return Arrays.asList("yogi");
- * }
- * };
- *
- * GitHub github = FeignCircuitBreaker.builder()
- * ...
- * .target(GitHub.class, "https://api.github.com", fallbackFactory);
- * }
- *
- *
- * @param the feign interface type
- */
-public interface FallbackFactory {
-
- /**
- * Returns an instance of the fallback appropriate for the given cause.
- * @param cause cause of an exception.
- * @return fallback
- */
- T create(Throwable cause);
-
- final class Default implements FallbackFactory {
-
- final Log logger;
-
- final T constant;
-
- public Default(T constant) {
- this(constant, LogFactory.getLog(Default.class));
- }
-
- Default(T constant, Log logger) {
- this.constant = checkNotNull(constant, "fallback");
- this.logger = checkNotNull(logger, "logger");
- }
-
- @Override
- public T create(Throwable cause) {
- if (logger.isTraceEnabled()) {
- logger.trace("fallback due to: " + cause.getMessage(), cause);
- }
- return constant;
- }
-
- @Override
- public String toString() {
- return constant.toString();
- }
-
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignAutoConfiguration.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignAutoConfiguration.java
deleted file mode 100644
index 4fa906c81..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignAutoConfiguration.java
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * Copyright 2013-2023 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.openfeign;
-
-import java.lang.reflect.Method;
-import java.net.http.HttpClient;
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.X509Certificate;
-import java.time.Duration;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-import com.fasterxml.jackson.databind.Module;
-import feign.Capability;
-import feign.Client;
-import feign.Feign;
-import feign.Target;
-import feign.hc5.ApacheHttp5Client;
-import feign.http2client.Http2Client;
-import feign.okhttp.OkHttpClient;
-import jakarta.annotation.PreDestroy;
-import okhttp3.ConnectionPool;
-import okhttp3.Protocol;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.springframework.aot.hint.MemberCategory;
-import org.springframework.aot.hint.RuntimeHints;
-import org.springframework.aot.hint.RuntimeHintsRegistrar;
-import org.springframework.aot.hint.TypeReference;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
-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.context.properties.EnableConfigurationProperties;
-import org.springframework.cache.interceptor.CacheInterceptor;
-import org.springframework.cloud.client.actuator.HasFeatures;
-import org.springframework.cloud.client.circuitbreaker.CircuitBreaker;
-import org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory;
-import org.springframework.cloud.openfeign.aot.FeignChildContextInitializer;
-import org.springframework.cloud.openfeign.aot.FeignClientBeanFactoryInitializationAotProcessor;
-import org.springframework.cloud.openfeign.security.OAuth2AccessTokenInterceptor;
-import org.springframework.cloud.openfeign.support.FeignEncoderProperties;
-import org.springframework.cloud.openfeign.support.FeignHttpClientProperties;
-import org.springframework.cloud.openfeign.support.PageJacksonModule;
-import org.springframework.cloud.openfeign.support.SortJacksonModule;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-import org.springframework.context.support.GenericApplicationContext;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Sort;
-import org.springframework.security.oauth2.client.AuthorizedClientServiceOAuth2AuthorizedClientManager;
-import org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager;
-import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
-import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
-import org.springframework.util.ClassUtils;
-
-/**
- * @author Spencer Gibb
- * @author Julien Roy
- * @author Grzegorz Poznachowski
- * @author Nikita Konev
- * @author Tim Peeters
- * @author Olga Maciaszek-Sharma
- * @author Nguyen Ky Thanh
- * @author Andrii Bohutskyi
- * @author Kwangyong Kim
- * @author Sam Kruglov
- * @author Wojciech Mąka
- * @author Dangzhicairang(小水牛)
- * @author changjin wei(魏昌进)
- */
-@Configuration(proxyBeanMethods = false)
-@ConditionalOnClass(Feign.class)
-@EnableConfigurationProperties({ FeignClientProperties.class, FeignHttpClientProperties.class,
- FeignEncoderProperties.class })
-public class FeignAutoConfiguration {
-
- private static final Log LOG = LogFactory.getLog(FeignAutoConfiguration.class);
-
- @Autowired(required = false)
- private List configurations = new ArrayList<>();
-
- @Bean
- public HasFeatures feignFeature() {
- return HasFeatures.namedFeature("Feign", Feign.class);
- }
-
- @Bean
- public FeignClientFactory feignContext() {
- FeignClientFactory context = new FeignClientFactory();
- context.setConfigurations(this.configurations);
- return context;
- }
-
- @Bean
- static FeignChildContextInitializer feignChildContextInitializer(GenericApplicationContext parentContext,
- FeignClientFactory feignClientFactory) {
- return new FeignChildContextInitializer(parentContext, feignClientFactory);
- }
-
- @Bean
- static FeignClientBeanFactoryInitializationAotProcessor feignClientBeanFactoryInitializationCodeGenerator(
- GenericApplicationContext applicationContext, FeignClientFactory feignClientFactory) {
- return new FeignClientBeanFactoryInitializationAotProcessor(applicationContext, feignClientFactory);
- }
-
- @Bean
- @ConditionalOnProperty(value = "spring.cloud.openfeign.cache.enabled", matchIfMissing = true)
- @ConditionalOnBean(CacheInterceptor.class)
- public Capability cachingCapability(CacheInterceptor cacheInterceptor) {
- return new CachingCapability(cacheInterceptor);
- }
-
- @Configuration(proxyBeanMethods = false)
- @ConditionalOnClass({ Module.class, Page.class, Sort.class })
- @ConditionalOnProperty(value = "spring.cloud.openfeign.autoconfiguration.jackson.enabled", havingValue = "true",
- matchIfMissing = true)
- protected static class FeignJacksonConfiguration {
-
- @Bean
- @ConditionalOnMissingBean(PageJacksonModule.class)
- public PageJacksonModule pageJacksonModule() {
- return new PageJacksonModule();
- }
-
- @Bean
- @ConditionalOnMissingBean(SortJacksonModule.class)
- public SortJacksonModule sortModule() {
- return new SortJacksonModule();
- }
-
- }
-
- @Configuration(proxyBeanMethods = false)
- @Conditional(FeignCircuitBreakerDisabledConditions.class)
- protected static class DefaultFeignTargeterConfiguration {
-
- @Bean
- @ConditionalOnMissingBean
- public Targeter feignTargeter() {
- return new DefaultTargeter();
- }
-
- }
-
- @Configuration(proxyBeanMethods = false)
- @ConditionalOnClass(CircuitBreaker.class)
- @ConditionalOnProperty(value = "spring.cloud.openfeign.circuitbreaker.enabled", havingValue = "true")
- protected static class CircuitBreakerPresentFeignTargeterConfiguration {
-
- @Bean
- @ConditionalOnMissingBean(CircuitBreakerFactory.class)
- public Targeter defaultFeignTargeter() {
- return new DefaultTargeter();
- }
-
- @Bean
- @ConditionalOnMissingBean(CircuitBreakerNameResolver.class)
- @ConditionalOnProperty(value = "spring.cloud.openfeign.circuitbreaker.alphanumeric-ids.enabled",
- havingValue = "false")
- public CircuitBreakerNameResolver circuitBreakerNameResolver() {
- return new DefaultCircuitBreakerNameResolver();
- }
-
- @Bean
- @ConditionalOnMissingBean(CircuitBreakerNameResolver.class)
- @ConditionalOnProperty(value = "spring.cloud.openfeign.circuitbreaker.alphanumeric-ids.enabled",
- havingValue = "true", matchIfMissing = true)
- public CircuitBreakerNameResolver alphanumericCircuitBreakerNameResolver() {
- return new AlphanumericCircuitBreakerNameResolver();
- }
-
- @SuppressWarnings("rawtypes")
- @Bean
- @ConditionalOnMissingBean
- @ConditionalOnBean(CircuitBreakerFactory.class)
- public Targeter circuitBreakerFeignTargeter(CircuitBreakerFactory circuitBreakerFactory,
- @Value("${spring.cloud.openfeign.circuitbreaker.group.enabled:false}") boolean circuitBreakerGroupEnabled,
- CircuitBreakerNameResolver circuitBreakerNameResolver) {
- return new FeignCircuitBreakerTargeter(circuitBreakerFactory, circuitBreakerGroupEnabled,
- circuitBreakerNameResolver);
- }
-
- static class DefaultCircuitBreakerNameResolver implements CircuitBreakerNameResolver {
-
- @Override
- public String resolveCircuitBreakerName(String feignClientName, Target> target, Method method) {
- return Feign.configKey(target.type(), method);
- }
-
- }
-
- static class AlphanumericCircuitBreakerNameResolver extends DefaultCircuitBreakerNameResolver {
-
- @Override
- public String resolveCircuitBreakerName(String feignClientName, Target> target, Method method) {
- return super.resolveCircuitBreakerName(feignClientName, target, method).replaceAll("[^a-zA-Z0-9]", "");
- }
-
- }
-
- }
-
- // the following configuration is for alternate feign clients if
- // SC loadbalancer is not on the class path.
- // see corresponding configurations in FeignLoadBalancerAutoConfiguration
- // for load-balanced clients.
- @Configuration(proxyBeanMethods = false)
- @ConditionalOnClass(OkHttpClient.class)
- @ConditionalOnMissingBean(okhttp3.OkHttpClient.class)
- @ConditionalOnProperty("spring.cloud.openfeign.okhttp.enabled")
- protected static class OkHttpFeignConfiguration {
-
- private okhttp3.OkHttpClient okHttpClient;
-
- @Bean
- @ConditionalOnMissingBean
- public okhttp3.OkHttpClient.Builder okHttpClientBuilder() {
- return new okhttp3.OkHttpClient.Builder();
- }
-
- @Bean
- @ConditionalOnMissingBean(ConnectionPool.class)
- public ConnectionPool httpClientConnectionPool(FeignHttpClientProperties httpClientProperties) {
- int maxTotalConnections = httpClientProperties.getMaxConnections();
- long timeToLive = httpClientProperties.getTimeToLive();
- TimeUnit ttlUnit = httpClientProperties.getTimeToLiveUnit();
- return new ConnectionPool(maxTotalConnections, timeToLive, ttlUnit);
- }
-
- @Bean
- public okhttp3.OkHttpClient okHttpClient(okhttp3.OkHttpClient.Builder builder, ConnectionPool connectionPool,
- FeignHttpClientProperties httpClientProperties) {
- boolean followRedirects = httpClientProperties.isFollowRedirects();
- int connectTimeout = httpClientProperties.getConnectionTimeout();
- boolean disableSslValidation = httpClientProperties.isDisableSslValidation();
- Duration readTimeout = httpClientProperties.getOkHttp().getReadTimeout();
- List protocols = httpClientProperties.getOkHttp().getProtocols().stream().map(Protocol::valueOf)
- .collect(Collectors.toList());
- if (disableSslValidation) {
- disableSsl(builder);
- }
- this.okHttpClient = builder.connectTimeout(connectTimeout, TimeUnit.MILLISECONDS)
- .followRedirects(followRedirects).readTimeout(readTimeout).connectionPool(connectionPool)
- .protocols(protocols).build();
- return this.okHttpClient;
- }
-
- private void disableSsl(okhttp3.OkHttpClient.Builder builder) {
- try {
- X509TrustManager disabledTrustManager = new DisableValidationTrustManager();
- TrustManager[] trustManagers = new TrustManager[1];
- trustManagers[0] = disabledTrustManager;
- SSLContext sslContext = SSLContext.getInstance("SSL");
- sslContext.init(null, trustManagers, new java.security.SecureRandom());
- SSLSocketFactory disabledSSLSocketFactory = sslContext.getSocketFactory();
- builder.sslSocketFactory(disabledSSLSocketFactory, disabledTrustManager);
- builder.hostnameVerifier(new TrustAllHostnames());
- }
- catch (NoSuchAlgorithmException | KeyManagementException e) {
- LOG.warn("Error setting SSLSocketFactory in OKHttpClient", e);
- }
- }
-
- @PreDestroy
- public void destroy() {
- if (this.okHttpClient != null) {
- this.okHttpClient.dispatcher().executorService().shutdown();
- this.okHttpClient.connectionPool().evictAll();
- }
- }
-
- @Bean
- @ConditionalOnMissingBean(Client.class)
- public Client feignClient(okhttp3.OkHttpClient client) {
- return new OkHttpClient(client);
- }
-
- /**
- * A {@link X509TrustManager} that does not validate SSL certificates.
- */
- class DisableValidationTrustManager implements X509TrustManager {
-
- @Override
- public void checkClientTrusted(X509Certificate[] x509Certificates, String s) {
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] x509Certificates, String s) {
- }
-
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- return new X509Certificate[0];
- }
-
- }
-
- /**
- * A {@link HostnameVerifier} that does not validate any hostnames.
- */
- class TrustAllHostnames implements HostnameVerifier {
-
- @Override
- public boolean verify(String s, SSLSession sslSession) {
- return true;
- }
-
- }
-
- }
-
- // the following configuration is for alternate feign clients if
- // SC loadbalancer is not on the class path.
- // see corresponding configurations in FeignLoadBalancerAutoConfiguration
- // for load-balanced clients.
- @Configuration(proxyBeanMethods = false)
- @ConditionalOnClass(ApacheHttp5Client.class)
- @ConditionalOnMissingBean(org.apache.hc.client5.http.impl.classic.CloseableHttpClient.class)
- @ConditionalOnProperty(value = "spring.cloud.openfeign.httpclient.hc5.enabled", havingValue = "true",
- matchIfMissing = true)
- @Import(org.springframework.cloud.openfeign.clientconfig.HttpClient5FeignConfiguration.class)
- protected static class HttpClient5FeignConfiguration {
-
- @Bean
- @ConditionalOnMissingBean(Client.class)
- public Client feignClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient5) {
- return new ApacheHttp5Client(httpClient5);
- }
-
- }
-
- @Configuration(proxyBeanMethods = false)
- @ConditionalOnClass(OAuth2AuthorizedClientManager.class)
- @ConditionalOnProperty("spring.cloud.openfeign.oauth2.enabled")
- protected static class Oauth2FeignConfiguration {
-
- @Bean
- @ConditionalOnBean({ OAuth2AuthorizedClientService.class, ClientRegistrationRepository.class })
- @ConditionalOnMissingBean
- OAuth2AuthorizedClientManager feignOAuth2AuthorizedClientManager(
- ClientRegistrationRepository clientRegistrationRepository,
- OAuth2AuthorizedClientService oAuth2AuthorizedClientService) {
- return new AuthorizedClientServiceOAuth2AuthorizedClientManager(clientRegistrationRepository,
- oAuth2AuthorizedClientService);
-
- }
-
- @Bean
- @ConditionalOnBean(OAuth2AuthorizedClientManager.class)
- public OAuth2AccessTokenInterceptor defaultOAuth2AccessTokenInterceptor(
- @Value("${spring.cloud.openfeign.oauth2.clientRegistrationId:}") String clientRegistrationId,
- OAuth2AuthorizedClientManager oAuth2AuthorizedClientManager) {
- return new OAuth2AccessTokenInterceptor(clientRegistrationId, oAuth2AuthorizedClientManager);
- }
-
- }
-
- // the following configuration is for alternate feign clients if
- // SC loadbalancer is not on the class path.
- // see corresponding configurations in FeignLoadBalancerAutoConfiguration
- // for load-balanced clients.
- @Configuration(proxyBeanMethods = false)
- @ConditionalOnClass({ Http2Client.class, HttpClient.class })
- @ConditionalOnMissingBean(HttpClient.class)
- @ConditionalOnProperty("spring.cloud.openfeign.http2client.enabled")
- @Import(org.springframework.cloud.openfeign.clientconfig.Http2ClientFeignConfiguration.class)
- protected static class Http2ClientFeignConfiguration {
-
- @Bean
- @ConditionalOnMissingBean(Client.class)
- public Client feignClient(HttpClient httpClient) {
- return new Http2Client(httpClient);
- }
-
- }
-
-}
-
-class FeignHints implements RuntimeHintsRegistrar {
-
- @Override
- public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
- if (!ClassUtils.isPresent("feign.Feign", classLoader)) {
- return;
- }
- hints.reflection().registerType(TypeReference.of(FeignClientFactoryBean.class),
- hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
- MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS));
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignBuilderCustomizer.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignBuilderCustomizer.java
deleted file mode 100644
index 82f5a150e..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignBuilderCustomizer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import feign.Feign;
-
-/**
- * Allows application to customize the Feign builder.
- *
- * @author Matt King
- */
-@FunctionalInterface
-public interface FeignBuilderCustomizer {
-
- void customize(Feign.Builder builder);
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCachingInvocationHandlerFactory.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCachingInvocationHandlerFactory.java
deleted file mode 100644
index 1fa380bd7..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCachingInvocationHandlerFactory.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.util.Map;
-import java.util.Optional;
-
-import feign.InvocationHandlerFactory;
-import feign.Target;
-import org.aopalliance.intercept.MethodInvocation;
-
-import org.springframework.cache.interceptor.CacheInterceptor;
-
-/**
- * Allows Spring's @Cache* annotations to be declared on the feign client's methods.
- *
- * @author Sam Kruglov
- */
-public class FeignCachingInvocationHandlerFactory implements InvocationHandlerFactory {
-
- private final InvocationHandlerFactory delegateFactory;
-
- private final CacheInterceptor cacheInterceptor;
-
- public FeignCachingInvocationHandlerFactory(InvocationHandlerFactory delegateFactory,
- CacheInterceptor cacheInterceptor) {
- this.delegateFactory = delegateFactory;
- this.cacheInterceptor = cacheInterceptor;
- }
-
- @Override
- public InvocationHandler create(Target target, Map dispatch) {
- final InvocationHandler delegateHandler = delegateFactory.create(target, dispatch);
- return (proxy, method, argsNullable) -> {
- Object[] args = Optional.ofNullable(argsNullable).orElseGet(() -> new Object[0]);
- return cacheInterceptor.invoke(new MethodInvocation() {
- @Override
- public Method getMethod() {
- return method;
- }
-
- @Override
- public Object[] getArguments() {
- return args;
- }
-
- @Override
- public Object proceed() throws Throwable {
- return delegateHandler.invoke(proxy, method, args);
- }
-
- @Override
- public Object getThis() {
- return target;
- }
-
- @Override
- public AccessibleObject getStaticPart() {
- return method;
- }
- });
- };
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreaker.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreaker.java
deleted file mode 100644
index 7868b1ae2..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreaker.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import feign.Feign;
-import feign.Target;
-
-import org.springframework.cloud.client.circuitbreaker.CircuitBreaker;
-import org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory;
-
-/**
- * Allows Feign interfaces to work with {@link CircuitBreaker}.
- *
- * @author Marcin Grzejszczak
- * @author Andrii Bohutskyi
- * @author Kwangyong Kim
- * @since 3.0.0
- */
-public final class FeignCircuitBreaker {
-
- private FeignCircuitBreaker() {
- throw new IllegalStateException("Don't instantiate a utility class");
- }
-
- /**
- * @return builder for Feign CircuitBreaker integration
- */
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * Builder for Feign CircuitBreaker integration.
- */
- public static final class Builder extends Feign.Builder {
-
- private CircuitBreakerFactory circuitBreakerFactory;
-
- private String feignClientName;
-
- private boolean circuitBreakerGroupEnabled;
-
- private CircuitBreakerNameResolver circuitBreakerNameResolver;
-
- Builder circuitBreakerFactory(CircuitBreakerFactory circuitBreakerFactory) {
- this.circuitBreakerFactory = circuitBreakerFactory;
- return this;
- }
-
- Builder feignClientName(String feignClientName) {
- this.feignClientName = feignClientName;
- return this;
- }
-
- Builder circuitBreakerGroupEnabled(boolean circuitBreakerGroupEnabled) {
- this.circuitBreakerGroupEnabled = circuitBreakerGroupEnabled;
- return this;
- }
-
- Builder circuitBreakerNameResolver(CircuitBreakerNameResolver circuitBreakerNameResolver) {
- this.circuitBreakerNameResolver = circuitBreakerNameResolver;
- return this;
- }
-
- public T target(Target target, T fallback) {
- return build(fallback != null ? new FallbackFactory.Default<>(fallback) : null).newInstance(target);
- }
-
- public T target(Target target, FallbackFactory extends T> fallbackFactory) {
- return build(fallbackFactory).newInstance(target);
- }
-
- @Override
- public T target(Target target) {
- return build(null).newInstance(target);
- }
-
- public Feign build(final FallbackFactory> nullableFallbackFactory) {
- super.invocationHandlerFactory((target, dispatch) -> new FeignCircuitBreakerInvocationHandler(
- circuitBreakerFactory, feignClientName, target, dispatch, nullableFallbackFactory,
- circuitBreakerGroupEnabled, circuitBreakerNameResolver));
- return super.build();
- }
-
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreakerDisabledConditions.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreakerDisabledConditions.java
deleted file mode 100644
index a3997d52a..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreakerDisabledConditions.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2013-2022 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.openfeign;
-
-import org.springframework.boot.autoconfigure.condition.AnyNestedCondition;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-
-class FeignCircuitBreakerDisabledConditions extends AnyNestedCondition {
-
- FeignCircuitBreakerDisabledConditions() {
- super(ConfigurationPhase.PARSE_CONFIGURATION);
- }
-
- @ConditionalOnMissingClass("org.springframework.cloud.client.circuitbreaker.CircuitBreaker")
- static class CircuitBreakerClassMissing {
-
- }
-
- @ConditionalOnProperty(value = "spring.cloud.openfeign.circuitbreaker.enabled", havingValue = "false",
- matchIfMissing = true)
- static class CircuitBreakerDisabled {
-
- }
-
-}
diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreakerInvocationHandler.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreakerInvocationHandler.java
deleted file mode 100644
index 048e24045..000000000
--- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreakerInvocationHandler.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright 2013-2023 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.openfeign;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-import feign.InvocationHandlerFactory;
-import feign.Target;
-
-import org.springframework.cloud.client.circuitbreaker.CircuitBreaker;
-import org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory;
-import org.springframework.cloud.client.circuitbreaker.NoFallbackAvailableException;
-import org.springframework.web.context.request.RequestAttributes;
-import org.springframework.web.context.request.RequestContextHolder;
-
-import static feign.Util.checkNotNull;
-
-/**
- * @author Marcin Grzejszczak
- * @author Olga Maciaszek-Sharma
- * @author Niang
- * @author Bohutskyi
- * @author kim
- * @author Vicasong
- */
-class FeignCircuitBreakerInvocationHandler implements InvocationHandler {
-
- private final CircuitBreakerFactory factory;
-
- private final String feignClientName;
-
- private final Target> target;
-
- private final Map dispatch;
-
- private final FallbackFactory> nullableFallbackFactory;
-
- private final Map fallbackMethodMap;
-
- private final boolean circuitBreakerGroupEnabled;
-
- private final CircuitBreakerNameResolver circuitBreakerNameResolver;
-
- FeignCircuitBreakerInvocationHandler(CircuitBreakerFactory factory, String feignClientName, Target> target,
- Map dispatch, FallbackFactory> nullableFallbackFactory,
- boolean circuitBreakerGroupEnabled, CircuitBreakerNameResolver circuitBreakerNameResolver) {
- this.factory = factory;
- this.feignClientName = feignClientName;
- this.target = checkNotNull(target, "target");
- this.dispatch = checkNotNull(dispatch, "dispatch");
- this.fallbackMethodMap = toFallbackMethod(dispatch);
- this.nullableFallbackFactory = nullableFallbackFactory;
- this.circuitBreakerGroupEnabled = circuitBreakerGroupEnabled;
- this.circuitBreakerNameResolver = circuitBreakerNameResolver;
- }
-
- @Override
- public Object invoke(final Object proxy, final Method method, final Object[] args) {
- // early exit if the invoked method is from java.lang.Object
- // code is the same as ReflectiveFeign.FeignInvocationHandler
- if ("equals".equals(method.getName())) {
- try {
- Object otherHandler = args.length > 0 && args[0] != null ? Proxy.getInvocationHandler(args[0]) : null;
- return equals(otherHandler);
- }
- catch (IllegalArgumentException e) {
- return false;
- }
- }
- else if ("hashCode".equals(method.getName())) {
- return hashCode();
- }
- else if ("toString".equals(method.getName())) {
- return toString();
- }
-
- String circuitName = circuitBreakerNameResolver.resolveCircuitBreakerName(feignClientName, target, method);
- CircuitBreaker circuitBreaker = circuitBreakerGroupEnabled ? factory.create(circuitName, feignClientName)
- : factory.create(circuitName);
- Supplier