'Spring Boot Zuul : Static files 404 error

I have two different spring boot services:

1). One service is running on http://localhost:8080 1). the Second service is running on http://localhost:8081

And for Zuul, I have created a mapping like http://localhost:8080/service2 => http://localhost:8081/

But here, it is not keeping /service2 in URL when redirecting to http://localhost:8081/ and due to that my static files are having path like http://localhost:8080/assets/logo.png (returns 404) but instead it should have something like this: http://localhost:8080/service2/assets/logo.png

Is there anything we can do here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source