Closed johnnyvdberg closed 6 years ago
You can extend ConfigurationMappingsProvider
and @Override
concatContextAndMappingPaths
@Component("mappingsProvider")
public class ProxyMappingProvider extends ConfigurationMappingsProvider {
public ProxyMappingProvider(ServerProperties server, CharonProperties charon, MappingsCorrector mappingsCorrector, HttpClientProvider httpClientProvider) {
super(server, charon, mappingsCorrector, httpClientProvider);
}
@Override
protected String concatContextAndMappingPaths(MappingProperties mapping) {
return correctUri(server.getServlet().getContextPath()) + mapping.getPath();
}
}
@BenEfrati fix should be good for now. Full support for Spring Boot 2 and Spring 5 is planned but I can't tell you when it will be done. I would like to also include webflux support.
I tried loading in the dependency for a Spring Boot 2.0 project, however they made some minor abstractions in the ServerProperties class, breaking this starter.
Currently you use this line of code in MappingsProvider and RequestForwarder:
return correctUri(server.getContextPath()) + mapping.getPath();
While Spring Boot 2 requires:return correctUri(server.getServlet().getContextPath()) + mapping.getPath();
Can we support both versions?