I'm currently trying to migrate from Spring 2.x -> 3.1.5 as a beginner to Spring Security and I don't really understand the migration instructions.
Can someone explain the exact difference between the old requestMatchers and the new securityMatchers? The code attached below is the old version, but requestMatcher no longer works. Would the commented out parts be equivalent to the lower part?
//http.authorizeHttpRequests((authz) -> authz.anyRequest());
//http.securityMatcher().authorizeHttpRequests((authz) -> authz.anyRequest());
http.requestMatchers().anyRequest();
Would be thankful for each answer :)
As a start you have to check Migration Guide where you will be able to find an answer to your question:
It mean that you have to replace next one piece of code that you put in question:
To the next one:
More details about it you could find in above reference to Migration Guide.