Vaadin and Spring boot with REST endpoints

I have changed the line like this:
http.authorizeHttpRequests(authz →
authz.requestMatchers(“/api/v2/**”).anonymous()

now I get this message
Could not navigate to ‘api/v2/agentregistration’
Available routes: