People, I've got a question related to Spring, not Kotlin itself.
I'm trying to use Thymeleaf for generating XML (RSS 2.0 feed).
Way 1. Creating second template resolver didn't worked. It just can't find my template with xml extension.
Way 2. I've renamed my XML template to .html and left one (HTML5-mode) template resolver to deal with it. All works, but content-type is wrong. Setting both
httpServletResponse.contentType = "application/rss+xml"
and
@RequestMapping(produces = arrayOf("application/rss+xml"))
didn't worekd because template resolver sets its own content type.
Any ideas how to override this behavior?