Spring RestController specific basePath | Mathias Hauser
I recently started taking a look into Angular 2 and though about a proper project setup in combination with Spring RestControllers. During development, the front-end Angular 2 application will run via Webpack and the Spring Boot application with an embedded Tomcat. All RestController should use a common base path, since I plan to run the Angular 2 application together with the Spring application in a production environment. The test scenario is a simple index.html file that should be hosted in the URL '/index.html' and RestController hosted in '/api/hello'
Expected URL structure
/index.html – angular app placeholder
/api/hello – Endpoint for a rest controller
I recommend downloading the source of this example before you start. Link to the repository blog_rest-controller-base-path direct link to the source zip source-zip
Read full article from Spring RestController specific basePath | Mathias Hauser
No comments:
Post a Comment