How can I get @PathVariable inside FilterRegistrationBean? Spring Boot
<p>My requested path is: </p>

<pre><code>localhost:8080/companies/12/accounts/35
</code></pre>

<p>My Rest Controller contains this function and I want to get companyId and accountId inside Filter.</p>

<pre><code>@RequestMapping(value = "/companies/{companyId}/accounts/{accountId}", method = RequestMethod.PUT)
public Response editCompanyAccount(@PathVariable("companyId") long companyId, @PathVariable("accountId") long accountId,
@RequestBody @Validated CompanyAccountDto companyAccountDto,
                                       HttpServletRequest req) throws ErrorException, InvalidKeySpecException, NoSuchAlgorithmException
</code></pre>

<p>Is there any function that can be used in order to receive this information inside filter?</p>