Skip to main content

One post tagged with "auto-configuration"

View All Tags

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.