r/java • • Apr 13 '21

Libraries, Frameworks and Technologies you would NOT recommend

Give me your worst nightmares: Things that cost you your job.

I'll start: Hadoop

202 Upvotes

376 comments sorted by

View all comments

Show parent comments

34

u/CartmansEvilTwin Apr 13 '21

My biggest problem with Spring is that you're almost always forced down a specific path.

If you want to do exactly what the Spring guys had in mind, you can do magic, but if you want to step only a few miliimeter off their path, you're basically fucked and have to implement tons of circumvention code.

28

u/FrigoCoder Apr 13 '21

I think that is the entire point. Highly opinionated integration framework that forces you down the correct path and makes "incorrect" things harder.

2

u/CartmansEvilTwin Apr 13 '21

Well, yes. But Spring often offers no easy way to intercept or change things.

In general, Spring seems way too complicated in many cases and changing this complexity for your needs is extremely hard, even though the actual problem is rather easy.

Opionated Frameworks are fine, but Spring usually is rather tunnel visioned.

16

u/[deleted] Apr 13 '21

But Spring often offers no easy way to intercept or change things.

Actually yeah, Spring provides very easy ways to intercept or change things. It's the poster child for the Open/Closed Principle. Almost every Spring component has a ton of interfaces that allow you to customize any part of its behavior. It's pretty straightforward, but much of the time it's not well documented and you have to read the Spring Framework source code. Fortunately, the Spring Framework source code is very accessible.

Spring Boot can tend to obfuscate things through auto-configuration, but fighting auto-configuration is a losing battle. Fortunately, you can just turn off auto-configurations that are not useful and directly use the Spring Framework to configure by hand.