user1516100
user1516100

Reputation:

Spring Integration and REST Gateway

Question is about feature/capability. Trying to understand if Spring Integration can be used to build a Gateway for RESTful web services. Essentially, looking to build a proxy/gateway layer that would intercept all calls to back end REST services and add security, rules such as OAUTH, Throttling etc. I have reviewed apache synapse, wso2 API Manager and looking to build similar service using Spring.

Upvotes: 3

Views: 8724

Answers (1)

Gary Russell
Gary Russell

Reputation: 174759

Yes; starting with Spring Integration 3.0 (current version is 4.0.2), you can give an http inbound-gateway multiple paths (foo/{bar}, /baz/{qux}) etc. In previous versions you would need a separate gateway for each URL, which would be impractical for a large service.

Depending on the complexity, you might want to consider implementing the restful front-end using Spring MVC's ReST support directly and interfacing with a back-end Spring Integration flow using a Messaging Gateway as necessary.

The spring-security-oauth project is available for oauth.

EDIT: There is also a rest-http sample.

Upvotes: 5

Related Questions