Injecting custom object to controller in Spring Boot

In Spring, you can inject your custom object to the controller methods like this Here are the steps of this implementation. In my sample project I have ClientRequest object which contains incoming request related variables. These variables are basically taken from the HttpServletRequest object. So we could inject HttpServletRequest instead of ClientRequest and would generate […]

Continue Reading...

Returning user requested variables with Spring

When implementing a REST API, you may want to provide flexibility for users about filtering the content based on their requests. when requesting GET /movies/1 and when user sets fields, GET /movies/1?fields=year,subject,director the result would be Implementation of this behavior is very similar to my previous tutorial about Role Based Content in Spring. I’m using […]

Continue Reading...