java - How to configure a default @RestController URI prefix for all controllers? - Stack Overflow
There's a new solution to solve this kind of problem available since Spring Boot 1.4.0.RC1 (Details see https://github.com/spring-projects/spring-boot/issues/5004)
The solution of Shahin ASkari disables parts of the Auto configuration, so might cause other problems.
The following solution takes his idea and integrates it properly into spring boot. For my case I wanted all RestControllers with the base path api, but still serve static content with the root path (f.e. angular webapp)
Read full article from java - How to configure a default @RestController URI prefix for all controllers? - Stack Overflow
No comments:
Post a Comment