is ModelAndView(View view, @Nullable Map<String, ?> model) constructor supported in IntelliJ Spring plugin?

I'm working with IntelliJ and Spring Boot 2.3.1. The problem is when I'm using code like this:

fun homePage() = run {
val model = mapOf(
"bean" to CheckAvailabilityBackingBean(),
"performances" to performanceRepository.findAll(),
"seatNums" to CheckAvailabilityBackingBean.seatNums,
"seatRows" to CheckAvailabilityBackingBean.seatRows
ModelAndView("seatBooking", model)

The autocompletion in the *seatBooking* template is not working. The property bean is not being found. But, if I'm using code like this:

fun homePage() = run {
ModelAndView("seatBooking", "bean", CheckAvailabilityBackingBean())

I can see the *bean* property rightfully recognized in the Thymeleaf template. So, the question is, is it possible to pass many properties using a map with Kotlin? IntelliJ Spring integration can autocomplete said properties sent inside de map?

Please sign in to leave a comment.