4 ms·
People are always saying that spring boot has too much "behind the scenes magic". What behind the scenes magic? Spring boot barely does anything fancy. It bu
by humbleMouse 8y ago
People are always saying that spring boot has too much "behind the scenes magic". What behind the scenes magic? Spring boot barely does anything fancy.
It builds an xml dependency tree of your classes. That's not hard to understand.
Everything it does is well documented on their site as well.
Is @component and @restcontroller and @requestmapping really that hard to understand?
- jrs95 8y agoYeah, it's a little weird. Metaprogramming is apparently only a virtue if you're using a dynamic language. Personally I like being able to throw @Repository on an Interface and get paginated CRUD operations for free. I like being able to take any JPQL query, put it in an @Query annotation, and if I decided I want sorting and pagination later, I just change the return type to Page<T> and add an extra parameter for the pagination info. I like being able to write unit tests against those repositories by just adding a @DataJpaTest annotation to my test class. This stuff saves a considerable amount of time, and it's certainly better than the experience I've had in Go or even in Python with Flask.
- bradleyjg 8y ago> Personally I like being able to throw @Repository on an Interface and get paginated CRUD operations for free. If it doesn’t work how you expect / want it to work, now what? With a library I can go the declaration and see what’s going on and what I might be able to do. With annotation magic I have no choice but to go to google where my choices will be diving into extremely verbose and not particularly well written documentation or cargo culting based on stack overflow answers.
- jrs95 8y agoYou can still just configure and use Hibernate or JDBC directly. Although I wouldn’t be surprised if it was also possible to add your own custom implementation with different methods on the repository. It’s by far the most flexible and extensible framework I have worked with.