0

I'm use eureka + zull and have the following config:

Zull:

zuul:
  prefix: /api
  routes:  
    user-service:
      path: /user-service/**
      serviceId: user-service

User-service micro-service endpoint:

@RestController
@RequestMapping(value = "/api/user-service/users")
public class HelloController {

    @RequestMapping(value = "/hello")
    public String hello() {
        return "Hello world!";
    }
}

When i request <zull_url>/api/user-service/users/hello i've got 404

but <zull_url>/api/user-service/api/user-service/users/hello works fine.

Is it possible to store @RequestMapping(value = "/api/user-service/users") path in microservice and request <zull_url>/api/user-service/users/hello by zull without duplicating? Thanks.

ydeineka
  • 21
  • 2

1 Answers1

0

In Zuul routing config, use stripPrefix: false as the default is true.

Arnold Galovics
  • 3,246
  • 3
  • 22
  • 33