Skip to content
Advertisement

Tag: spring-restcontroller

Custom Data Binding in Spring

I have a situation here. Suppose, I’m receiving this JSON in the @RequestBody, Which I’m binding to a POJO, like so. Now, ResourceRefRequest, is as follows, and, RefReqItem, is as follows, Things are pretty well, as I expect them to be. The only problem is, refReqItem.resourceId is null, for all refs. I want to populate each of, refReqItem.resourceId, in the

Why does root path in my controller maps to index.html in spring boot web application?

I’m testing a controller for a Spring Boot application. I want to map a resource to a path, which should be a part of my API. My controller is pretty specific about path: Here ‘web-interface’ is a property, as specified in application.yml file Expected behavior: path: localhost:8080/admin maps to index.html resource root path: localhost:8080/ maps to nothing, i.e. 404 error.

Rest Controller method not getting called in spring boot

I am implementing rest webservice via a spring boot application. POM application.properties Application launcher class Controller I see Did not find handler method for [/services/account] message in the console when I fire http://localhost:8082/services/account URL in the browser as shown below I dont see message – ACCOUNT METHOD CALLED in the console meaning controller method is not getting invoked.Can you please

Advertisement