Skip to content

Tag: spring

Why do I have to set AuthenticationManager twice

In my application I’ve implemented X.509 authentication I created the following class named X509AuthenticationFilter that extends AbstractPreAuthenticatedProcessingFilter provided by spring security by default. I added my own AuthenticationManager to the class And also included the following setter The …

Convert nested map fields to snake case

how to convert all the nested fields of the following object rendered as json to snake_case? Given it’s read as a org.bson.Document, jackson object mapper won’t work as it’s designed for POJOs and it’s not possible to have POJOs here as the records are schema-less Answer It can be easi…

Endpoint overloading in Rest controller

I have a REST Controller in my Spring Boot application as follows: Upon trying to start the application, I get the following error: Upon changing the endpoints(in the getmapping part), this works perfectly. I fail to understand that since it does not recognise one with query param and one without as 2 separat…