r/JavaProgramming • u/Substantial_Mess_548 • Jul 27 '25
Help me Spring Security
I am getting the login form for register whereas not getting for kaka wth is thiss idont want login in register
31
Upvotes
1
1
u/rgmac1994 Jul 27 '25
Why use AntPathRequestMatcher for one endpoint, unlike the others? That's unnecessary.
1
u/overgenji Jul 27 '25
your register path is for a POST, does that path also serve a GET request? if you're serving /register you need to permitAll for GET as well



1
u/srihari_18 Jul 27 '25 edited Jul 27 '25
Instead of using 3 different requestMatchers for permitAll try using a single requestMatchers and separate the mappings with a comma like "kaka", "register"