Spring functional endpoints to rescue you

Spring CLI

To show something, we need this “something”. Let’s quickly create the simple, sample MVC project in Spring. To do that I am going to use Spring Boot CLI.

spring init -a func-endpoints \
--build gradle \
-d web \
-g com.relaximus \
-l groovy func-endpoints
idea build.gradle

Func endpoints sample

Now we are ready to go. Let’s create something nice:

Nice improvements in Groovy

gradle bootRun


I am pretty sure, that you could feel a bit skeptical regarding this approach of creating the Controllers in Spring MVC.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store