关于Spring GateWay OAuth2ResourceServer 配置ServerHttpSecurity中的hasRole 无效的问题

我知道从security升级到5.2.X版本之后配置 jwtAuthenticationConverter这个可以解决,但是我现在的security版本为5.1.8,没有JwtGrantedAuthoritiesConverter这个类,而且我这个整体还不能升级,要怎么配置呢
5.2以上版本这样配置,但是我现在这个版本要怎么弄呢,cloud版本为Greenwitch.SR6

    @Bean
    public Converter<Jwt, ? extends Mono<? extends AbstractAuthenticationToken>> jwtAuthenticationConverter() {
        JwtGrantedAuthoritiesConverter jwtGrantedAuthoritiesConverter = new JwtGrantedAuthoritiesConverter();
        jwtGrantedAuthoritiesConverter.setAuthorityPrefix(AuthConstants.AUTHORITY_PREFIX);
        jwtGrantedAuthoritiesConverter.setAuthoritiesClaimName(AuthConstants.JWT_AUTHORITIES_KEY);

        JwtAuthenticationConverter jwtAuthenticationConverter = new JwtAuthenticationConverter();
        jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(jwtGrantedAuthoritiesConverter);
        return new ReactiveJwtAuthenticationConverterAdapter(jwtAuthenticationConverter);
    }

hasRole无效?UserDetails.getAuthorities() 他在判断是否有角色的时候 可是有前缀的