<h3id="spring-matrixvariable-support"><aclass="anchor"href="#spring-matrixvariable-support"></a><aclass="link"href="#spring-matrixvariable-support">1.12. Spring @MatrixVariable Support</a></h3>
<divclass="paragraph">
<p>Spring Cloud OpenFeign provides support for the Spring <code>@MatrixVariable</code> annotation.</p>
</div>
<divclass="paragraph">
<p>If a map is passed as the method argument, the <code>@MatrixVariable</code> path segment is created by joining key-value pairs from the map with a <code>=</code>.</p>
</div>
<divclass="paragraph">
<p>If a different object is passed, either the <code>name</code> provided in the <code>@MatrixVariable</code> annotation (if defined) or the annotated variable name is
joined with the provided method argument using <code>=</code>.</p>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">IMPORTANT</dt>
<dd>
<p>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, Sprig Cloud OpenFeign requires that you add a path segment placeholder with a name matching either the <code>name</code> provided in the <code>@MatrixVariable</code> annotation (if defined) or the annotated variable name.</p>
<h4id="early-initialization-errors"><aclass="anchor"href="#early-initialization-errors"></a><aclass="link"href="#early-initialization-errors">1.12.1. Early Initialization Errors</a></h4>
<h4id="early-initialization-errors"><aclass="anchor"href="#early-initialization-errors"></a><aclass="link"href="#early-initialization-errors">1.13.1. Early Initialization Errors</a></h4>
<divclass="paragraph">
<p>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 <code>ObjectProvider</code> when autowiring your client.</p>
<h3id="spring-matrixvariable-support"><aclass="anchor"href="#spring-matrixvariable-support"></a><aclass="link"href="#spring-matrixvariable-support">1.12. Spring @MatrixVariable Support</a></h3>
<divclass="paragraph">
<p>Spring Cloud OpenFeign provides support for the Spring <code>@MatrixVariable</code> annotation.</p>
</div>
<divclass="paragraph">
<p>If a map is passed as the method argument, the <code>@MatrixVariable</code> path segment is created by joining key-value pairs from the map with a <code>=</code>.</p>
</div>
<divclass="paragraph">
<p>If a different object is passed, either the <code>name</code> provided in the <code>@MatrixVariable</code> annotation (if defined) or the annotated variable name is
joined with the provided method argument using <code>=</code>.</p>
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">IMPORTANT</dt>
<dd>
<p>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, Sprig Cloud OpenFeign requires that you add a path segment placeholder with a name matching either the <code>name</code> provided in the <code>@MatrixVariable</code> annotation (if defined) or the annotated variable name.</p>
<h4id="early-initialization-errors"><aclass="anchor"href="#early-initialization-errors"></a><aclass="link"href="#early-initialization-errors">1.12.1. Early Initialization Errors</a></h4>
<h4id="early-initialization-errors"><aclass="anchor"href="#early-initialization-errors"></a><aclass="link"href="#early-initialization-errors">1.13.1. Early Initialization Errors</a></h4>
<divclass="paragraph">
<p>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 <code>ObjectProvider</code> when autowiring your client.</p>