3 ms·
I understand where you come from but for me this is a huge drawback when I have to use Spring. I never know what to expect when working on a new spring project.
by mtrovo 8y ago
I understand where you come from but for me this is a huge drawback when I have to use Spring. I never know what to expect when working on a new spring project.
> beans defined in XML : we don't do that anymore
But you still can do that! Also you still can do DI with Autowired private fields instead of injecting via constructors. You can also create beans based on properties. You can also create beans automatically via a included JAR on your class path. On Spring Boot you can also have beans created based based on some conditional annotation. And now there's yet another new DSL [1] to create your beans programatically on startup time. Tracking down and debugging what's loaded in Spring is super hard compared to Guice for example.
Configuration is another piece of software that I have a really hard time to think why they do that. You can configure via a YAML file, AND via a properties file, AND overriding via environment variables, AND also with a configuration server that store your properties on a separated server, and they are all mixed together in a weird single configuration entry for the specific environment that you have. Probably this made sense some 10 years ago when we loved J2EE but why support this kind of madness nowadays?
What I feel Spring is missing so much is forgetting about all the past and where the framework came from, start from scratch with simple premises around reactor-netty [2], only supporting the functional DSL, no crazy class path scanning, no crazy configuration loading, just a simple DI framework with some batteries included.
[1] https://spring.io/blog/2017/08/01/spring-framework-5-kotlin-apis-the-functional-way https://spring.io/blog/2017/08/01/spring-framework-5-kotlin-...
[2] https://github.com/reactor/reactor-netty https://github.com/reactor/reactor-netty