Hello team,
We are updating the spring version from 2.7.10 to 3.0.6 as we are updating the Java version from 8 to 17.
error mtaBuild - [ERROR] /home/vsts/work/1/s/Skill/srv/src/main/java/com/sap/c4p/rm/skill/config/HealthSecurityConfig.java:[23,22] cannot find symbol
error mtaBuild - [ERROR] symbol: method requestMatchers()
error mtaBuild - [ERROR] location: variable security of type org.springframework.security.config.annotation.web.builders.HttpSecurity
error mtaBuild - [ERROR] -> [Help 1]
error mtaBuild - [ERROR]
error mtaBuild - [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
This is how our statement looks like:
return security.requestMatchers().mvcMatchers("/actuator/health")....
Please help in resolving the issue?
Comment From: wilkinsona
Please follow the recommendations in the migration guide. In particular, upgrading your Spring Boot 2.7 app to Spring Security 5.8 will provide you with deprecation warnings and suggested replacements for the APIs that have been removed in Spring Security 6.0.
If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.