Mohammad Karmi
Mohammad Karmi

Reputation: 1

Method reference in http.csrf how it's working

So I spent many hours to understand how this is working and still it's confusing from Java perspective :

in Spring security you can disable csrf by below

http.csrf(AbstractHttpConfigurer::disable)

the problem that the disable method takes no argument and return an object. but the csrf takes a Customizer that takes argument and return nothing. how does Java allow this without any errors ? how these fit together ?

I'm expecting to have syntax error as this doesn't match , how does it work ?

Upvotes: 0

Views: 14

Answers (0)

Related Questions