r/learnjava • • 25d ago

learning resources

learning sources

which is the best book that i should learn spring boot from? Learning Spring Boot 4, Fourth Edition ? or Spring Starts Here ?

5 Upvotes

2 comments sorted by

View all comments

2

u/Far-Bullfrog161 24d ago

Both are good, but they suit different stages. Spring Starts Here is the better first book if you're new to Spring, because it builds up the core ideas slowly: the application context, beans, dependency injection, and how Spring Boot's auto-configuration sits on top of that. Learning Spring Boot is more of a hands-on tour of building apps with Boot, so it lands better once you already know why those annotations work. Whichever you pick, type out the examples yourself rather than just reading, and then change something in each one, like swapping the in-memory database for Postgres or adding validation to a request. After the book, build one small REST API on your own with a database, error handling and a couple of tests, since that's where the concepts actually stick. Also check which Spring Boot version the book uses and match it in your project, so you don't lose an evening to a renamed property or package.