r/learnjava • u/desktoppc • Dec 12 '20
[ASK] How to Learn Java Spring?
I have a background in backend development using Python Django, but now I have to use Java Spring. I can do programming in Java but haven't used Spring.
But the problem is there are so many Java Spring framework like Hibernate, Security, MVC, etc. In addition, I also see that we have to define our ORM implementation like how to make the SQL query, etc. I haven't done anything like that because in Python Django the ORM implementation has been made by the framework.
I would like to learn how to make a REST API as most of the backend job required this for Junior Engineer (Fresh Graduate), how do I start? do I need to learn all java spring framework?
78
Upvotes
1
u/nekokattt Dec 12 '20
WARs aren't exactly standalone like spring boot applications are, which are essentially fat jars usually. Spring Boot jars just contain EVERYTHING including the server backend, which enables you to freely toss the blob at a wider range of environments and have it "just work" without a preconfigured Java-level environment to run it in first. Other than that, Spring Boot MVC usually is using servlets under the hood anyway. Reactor/webflux is a different kettle of fish, ofc.
Spring alone doesnt make the JAR size that much bigger. You can easily write an OSGi-based spring application for an ESB such as JBoss Fuse and keep the full JAR under a few megabytes.
Of course, shared environments can be more painful as it is easier to descend into dependency hell, from experience.