The Power of Java 8 Lambdas for REST API Development

The Power of Java 8 Lambdas for REST API Development

http://ift.tt/2gGXFLu

Have you noticed that all modern Java web frameworks support Lambda-based implementation of RESTful services? In general, it looks like this:

get("/foo", (req, resp) -> { application logic });
post("/bar", (req, resp) -> { application logic });

What’s wrong with this style? The style is fine, but we can do much better.

java

via DZone.com Feed https://dzone.com

December 14, 2016 at 07:27AM

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s