A Spring Boot 2.0 app should behave the same as a Spering Boot 1.5 app with this change. The key thing was to change the return type of the FunctionController and move the computation of single valuedness for the output there (instead of trying to do it in the return value handler, which isn't used in Spring 5).