NullPointerException Spring HATEOAS


#1

I’tm trying to add a simple HATEOAS link, using Spring HATEOAS, in my Kotlin application. But for some reason I’m getting NullPointerException and I really don’t know why.

This is the method that add a link:

Controller method:

I really don’t understand what’s wrong. Is it a Spring Hateoas bug?


#2

I figure it out. The error happens because my method is closed too. So I have to open it.

image