mkopylec / charon-spring-boot-starter

Reverse proxy implementation in form of a Spring Boot starter.
Apache License 2.0
240 stars 54 forks source link

Missing migration guide #94

Closed torsten-liermann closed 4 years ago

torsten-liermann commented 4 years ago

Hi,

a little migration guide would be nice. Coming from version 3.20, I have no idea for fixing these compile errors without studying the entire documentation and source code. A spring boot starter with autoconfiguration of webmvc and webflux would also be handy.

image

Thanks, Torsten

mkopylec commented 4 years ago

It will be hard to create such a migration guide because all that has left from the old version is the name: Charon. The new Charon is a completely new project with a new way for configuring features and some new features added. The webmvc and webflux versions have identical configuration APIs.

torsten-liermann commented 4 years ago

This is a pity that absolutely no configuration options exist. Often, mappings must be customizable using external configuration. Unfortunately, charon proxy does not follow the idea of spring boot regarding externalized configuration. Each application now has to implement MappingProperties and so on. Not so good. Is it planned for future releases?

mkopylec commented 4 years ago

I need to understand more what problem you are trying to solve. Do you need a possibility to change request mappings during application runtime? Why CharonConfigurer's API is not sufficient for you?

reecefenwick commented 4 years ago

Agreed with @torsten-liermann, removing the configuration property support has significantly increased the complexity involved in using this library

What the motivation was for this change?

mkopylec commented 4 years ago

Hi @reecefenwick this is why I've changed it:

  1. IDE does not support code completion in YML files if there is a List or Map property in @ConfigurationProperties class.
  2. @ConfigurationProperties allow only to configure simple properties like String, int, Duration, Class etc. It is hard to model configuration for nested objects like the LoadBalancer here or List<ClientHttpRequestInterceptor> here
  3. Custom features (forwarding interceptors) can now use the same configuration API/style as the available ones.
  4. Now a developer knows that his configuration is wrong at compile time. In YML file errors are harder to detect.
mkopylec commented 4 years ago

If you still need help, let me know.