Skip to content

Compile error in (Step 25 - Getting Started with JWT and Spring Security) #48

@MouathMohammad

Description

@MouathMohammad

Compile error details :
the line # 152 : .requestMatchers("/authenticate").permitAll()
the error details :
java: method requestMatchers in class org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry cannot be applied
to given types; required: org.springframework.security.web.util.matcher.RequestMatcher[]
found: java.lang.String
reason: varargs mismatch; java.lang.String cannot be converted to org.springframework.security.web.util.matcher.RequestMatcher

the problem description :
the requestMatchers(String) method is not available in the version of Spring Security 6+. Starting with Spring Security 6, the requestMatchers method has been updated to be more type-safe and flexible

Any advice Please !!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions