Spring Boot REST API Anti-Patterns and Best Practices

preview_player
Показать описание
#sivalabs #spring #springboot #intellij #productivity #java #testing #junit #junit5 #maven #jpa #hibernate #unittesting

In this video, I will explain what are some of the common anti-patterns used in Spring Boot REST API development and how to fix them by following best practices.

Timestamps
00:00:00 Introduction
00:03:10 Existing REST API walk-through
00:06:42 Not following REST conventions
00:18:57 Using Field Injection
00:28:42 Not using pagination
00:36:00 Not using request-specific payload bindings
00:45:42 Using JPA DDL auto-generation
00:53:18 Misusing Spring Data JPA derived-query method names
00:57:23 Loading entire entities and using only a small subset of fields
01:03:00 Using JPA that results in N+1 Select problems
01:09:36 Not implementing proper Exception Handling
01:15:48 Using @SpringBootTest for testing slices (controller, repository)
01:21:35 Testing with in-memory database
01:29:01 Not using proper package structure

References
=============================================

Connect with Me
=============================================

Popular Series Playlists
=============================================

⭐ Tags ⭐
best spring tutorials, best spring boot tutorials, how to learn spring boot, mastering spring boot, complete java testing course, java testing best practices, how to build spring boot rest API, spring cloud tutorials, spring boot docker tutorial, spring boot Kubernetes tutorial, how to become proficient in java, how to learn spring boot quickly, how to learn spring boot in-depth
Рекомендации по теме
Комментарии
Автор

I've an enhancement on the pagination request you could use the
one based index instead of subtracting to be zero by just providing the property on the application propertise
spring:
data:
web:
pageable:
one-indexed-parameters: true

mohamedshaker
Автор

Thank you si a for the wonderful effort

momedalhouma
Автор

Only the first topic covers "Rest". Url naming patterns and certain status codes are not mandatory to be restful. Only a uniform interface.

zickzack
Автор

production-ready is also highly claimed too --> hence reworded as is the DONE #productEconomy scale ready

nagkumar
Автор

Sir, kindly make the tutorial over Servlet JSP JDBC so that our prerequisites are clear.

dishaarya
Автор

Can i do a post for getting things if i have a nested hierarchy like a category inside multiple categories, then brand inside multiple brands, then size where I'll be having lot of sizes. So if i want to pass multiple categories, brands, and sizes to get info

universal