Код: Выделить всё
private RequestMatcher[] permittedAntMatchers() {
return Stream.concat(
"/admin/", "*/admin/"
)
.map(AntPathRequestMatcher::antMatcher)
.toArray(RequestMatcher[]::new);
}
< /code>
Я перенес его на это: < /p>
private RequestMatcher[] permittedAntMatchers() {
return Stream.concat(
"/admin/", "*/admin/"
)
.map(PathPatternRequestMatcher::new)
.toArray(RequestMatcher[]::new);
}
< /code>
Но я получаю ошибку: < /p>
'PathPatternRequestMatcher(org.springframework.web.util.pattern.PathPattern)' has private access in 'org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher'
Подробнее здесь: https://stackoverflow.com/questions/797 ... estmatcher