spencergibb / spring-cloud-gateway-mvc-sample

Spring Cloud Gateway MVC Sample
Apache License 2.0
23 stars 9 forks source link

Predicates with multiple path dont work #5

Closed NAHUEALB closed 8 months ago

NAHUEALB commented 8 months ago

Hi everyone!

I have the problem when config my apigateway mvc. I need define others paths for my microservice.

In my pom.xml i have spring-cloud-starter-gateway-mvc Version: 2023.0.0

spring:
  application:
    name: api-gateway
  cloud:
    gateway:
      mvc:
        routes-map:
          configCourses:
            id: courses-microservice
            uri: lb://COURSES-MICROSERVICE
            predicates:
              - Path=/api/courses/**
          configUsers:
            id: users-microservice
            uri: lb://USERS-MICROSERVICE
            predicates:
              - Path=/api/users/**, /auth/**

But result this exception Caused by: java.lang.IllegalArgumentException: Unable to find operation interface org.springframework.web.servlet.function.RequestPredicate for path with args {_genkey_0=/api/users/, _genkey_1=/auth/}

I tried other ways but they didn't work.

Can someone help me? :)

spencergibb commented 8 months ago

Please open an issue here https://github.com/spring-cloud/spring-cloud-gateway/issues