Skip to content

Tag: spring-boot

Spring SPEL collection projection

A simple question on SPEL collection selection. Look at section 10.5.17 Collection Selection on this page https://docs.spring.io/spring/docs/4.3.10.RELEASE/spring-framework-reference/html/expressions.html What i need is the selection ‘Serbian’ to come from outside and not be a fixed hard coded Str…

No mapping for request with mockmvc

Currently struggling with problem when I get ‘mapping error for request’ with following controller/test configuration. Controller: Test: Configuration: After test execution I get No mapping for POST /subscriber/session The reason for the struggle is that my code from other modules with the same co…

OffsetDateTime always converted to UTC

I’m having a very simple spring boot app that gets and returns a timestamp. The code is as follow: Controller Model I’ve noticed that when I’m sending timezones which are not UTC the object I’m receiving converted into UTC – for example, the following call: has this response: Is …

How to add rewrite rule to spring boot 2.3.1

I have a Spring Boot application based on this example. Now the question is how can I add rewrite rules to my application that add /index.html when user visit the root URL. I mean when user visit http://localhost:8080/my-app or http://localhost:8080/my-app/ then I redirect him or her to http://localhost:8080/…

Passing List in @RequestHeader Restapi

I want to pass list of string in my controller via Request Header @RequestHeader(“list”) final List<String> listOfString. Can this be used. How can I pass list of string in header via Postman? list={item1,item2,item3}. This is not working while I want to test via Postman. Is there any way? A…