Skip to content
Advertisement

spring boot starter security post methods not working

I have added spring ‘spring-boot-starter-security’ to existing spring boot project ; after that the post methods in spring rest controller not working properly it shows a error something like this :

JavaScript

my controller method is this:

JavaScript

pom file:

JavaScript

if i remove all these security related stuff the code is working great . Is there any thing wrong in my configuration ? . the security login form and all other functionality is working great . but the post methods is not working .

Advertisement

Answer

.csrf().disable() solved the problem

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement