Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the fundamental difference between spring and spring? #19

Open
Hi-world-DF opened this issue Nov 6, 2019 · 3 comments
Open

Comments

@Hi-world-DF
Copy link

Hi-world-DF commented Nov 6, 2019

What is the fundamental difference between spring and springBoot?

@Saptaktdk
Copy link

The main difference is spring boot reduces boilerplate code, has autoconfiguration and includes embedded servers like tomcat.
In spring you have to write a lot of boilerplate code, it doesn't have any embedded servers, you have to set the server manually.
It has depeendency injection, but doesn't have auto configuration. Even you have to define the dependencies manually, whereas it is already taken care of in spring boot by starters.

@Prateek4546
Copy link

let's break down the differences between Spring and Spring Boot with simple examples that even a beginner can understand.

Spring Framework:
Imagine you're building a custom car from scratch. You have all the parts like the engine, wheels, seats, and the chassis. Spring Framework is like being a mechanic who has access to all these parts and needs to assemble them step by step. You decide where to place the engine, how to connect the wheels, and what kind of seats to use. You have a lot of control, but you need to do a lot of work to put it all together.

For example, in Spring Framework, if you want to create a simple "Hello, World!" web application, you'd have to configure everything manually, like setting up a web server, creating controllers, and defining routing. It's like building the car piece by piece.

Spring Boot:
Now, think of Spring Boot as buying a ready-made car. It's like going to a car dealership, and you get a car that's already assembled with all the parts in the right places. Spring Boot provides a pre-configured car with the engine, wheels, and seats already set up. You just need to get in and start driving.

For example, with Spring Boot, creating the same "Hello, World!" web application is much easier. You use a simple template or a starter project, and most of the configuration is done for you. It's like getting a car that's ready to go, and you just need to specify the color and some personal preferences.

So, in simple terms, Spring Framework is like building a custom car from scratch, where you have full control but need to do a lot of work. Spring Boot is like getting a pre-built car, where most of the work is done for you, and you can start using it right away. Spring Boot simplifies and speeds up the development process, making it a great choice for beginners and experienced developers looking for a faster way to create Java applications.

@guo36112
Copy link

guo36112 commented Oct 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants