Skip to main content

27 posts tagged with "spring-boot"

View All Tags

Is It Safe to Send Passwords in Login Requests? HTTP vs HTTPS Security

· 14 min read
Mahmut Salman
Software Developer

"Is it safe to add password in LoginRequest? Can someone reach the user's request?" Great security question! The answer depends entirely on whether you're using HTTP or HTTPS. With HTTP, anyone on the network can see your password in plain text. With HTTPS, it's encrypted end-to-end. Let's understand the difference and how to secure your login.

ResponseEntity<T>: The Delivery Box That Can Hold Anything

· 9 min read
Mahmut Salman
Software Developer

"What does ResponseEntity<UnlockResponse> mean? Why can I use <UnlockResponse> here but <LoginResponse> somewhere else?" ResponseEntity is like a delivery box - it's a generic container that can hold any type of content. The <T> is a placeholder that you fill with your specific data type. Let's understand how this "magic" works and why it's incredibly powerful.

But Someone Still Has to Write the Code, Right? The Truth About Frameworks (Part 4)

· 12 min read
Mahmut Salman
Software Developer

In Parts 1-3, we learned why Spring Data JPA uses interfaces and generates implementations. But here's the critical question: "If implementations need to exist somewhere, aren't we just hiding the work? Someone still has to write the code!" Let's be brutally honest about what frameworks actually save you.

Spring Data JPA Part 5: Why UserRepository MUST Be an Interface - Java Type System Rules

· 8 min read
Mahmut Salman
Software Developer

"Why can't I use class instead of interface for UserRepository?" Because Java's type system has strict rules: class extends class, interface extends interface, class implements interface. When you try class UserRepository extends JpaRepository, Java sees JpaRepository is an interface and throws an error. Let's understand the three-level inheritance chain and who implements what.

Why Spring Security Locks All Endpoints Just By Adding the Dependency

· 8 min read
Mahmut Salman
Software Developer

"I just added spring-boot-starter-security to my pom.xml and now ALL my endpoints return 401 Unauthorized! I didn't write any security code - why is this happening?" This is Spring Security's "secure by default" philosophy at work. Let's understand why this design choice makes sense and how to configure it.