konrad-kaminski / spring-kotlin-coroutine

Kotlin coroutine support for Spring.
448 stars 69 forks source link

Could not resolve view with name '' #10

Open sdeleuze opened 6 years ago

sdeleuze commented 6 years ago

I have updated a little bit my deepdive example in order to use kotlinx.coroutines 0.20 and the map extension, and it seems this combination breaks the view name resolution. Run https://github.com/sdeleuze/spring-kotlin-deepdive/tree/coroutine-view-issue and go to http://localhost:8080/ to reproduce.

konrad-kaminski commented 6 years ago

The main culprit is an issue in Spring Core with incorrect return type of a suspending functions. I created a PR for solving it.

However, after solving this problem I found other issues. These were solved in 0.3.3 version.

There is a test for your case. It is ignored for now, but you can have a look at it here.

konrad-kaminski commented 6 years ago

I created a fixed Spring Core 5.0.4 version and put it in my repo (it's essentially 5.0.4.RELEASE with a fix in the MethodParameter class). In the mpfix branch you can see an example of using it. Especially have a look at the last commit.