Spring Boot không thay thế Spring Framework — nó là lớp tiện ích xây trên Spring Framework để bỏ phần cấu hình thủ công.
| Spring Framework | Spring Boot | |
|---|---|---|
| Vai trò | Nền tảng cốt lõi (IoC, DI, AOP, MVC) | Lớp tiện ích trên Spring |
| Cấu hình | Thủ công (XML hoặc Java config nhiều) | Auto-configuration |
| Dependency | Tự khai báo từng cái + lo version | Starter gom sẵn, version tương thích |
| Server | Cần deploy .war vào Tomcat ngoài | Embedded server (java -jar) |
| Khởi tạo project | Tự setup | Spring Initializr trong vài phút |
Quan hệ: mọi tính năng Spring Boot dùng đều là Spring Framework bên dưới — @Autowired, @Transactional, Spring MVC... đều của Spring Framework. Spring Boot chỉ thêm auto-config + starter + embedded server.
Trả lời ngắn gọn khi phỏng vấn: "Spring Framework cung cấp IoC/DI và các module cốt lõi nhưng cần nhiều cấu hình. Spring Boot xây trên Spring, dùng convention-over-configuration để chạy được ngay với cấu hình tối thiểu."
Spring Boot does not replace Spring Framework — it is a convenience layer built on top of Spring Framework that removes manual configuration.
| Spring Framework | Spring Boot | |
|---|---|---|
| Role | Core platform (IoC, DI, AOP, MVC) | Convenience layer on Spring |
| Configuration | Manual (XML or lots of Java config) | Auto-configuration |
| Dependencies | Declare each one + manage versions | Starters bundle them at compatible versions |
| Server | Deploy a .war to external Tomcat | Embedded server (java -jar) |
| Project setup | Manual | Spring Initializr in minutes |
Relationship: every Spring Boot feature is Spring Framework underneath — @Autowired, @Transactional, Spring MVC all come from Spring Framework. Spring Boot only adds auto-config + starters + an embedded server.
Concise interview answer: "Spring Framework provides IoC/DI and the core modules but needs a lot of configuration. Spring Boot builds on Spring and uses convention-over-configuration so the app runs with minimal setup."