Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-350

Support configuration of the HTTP root context in TCOMP REST API service

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • 0.16.0
    • None
    • None
    • None
    • All
    • 0.16.0
    • GreenHopper Ranking:
      0|i0xd9v:
    • 9223372036854775807
    • Small

    Description

      For DevOps purposes I need to have the capability to modify at runtime the base HTTP root context on which the TCOMP REST API service will listen for requests.

      This will allow more complex integrations with AWS Application Load Balancers.

      Currently, this root context is '/' however we would like to use more specific URL patterns, like '/api/tcomp' for example.
      To configure this we would like to use an environment variable provided to the TCOMP REST API docker container at runtime.
      So this env var would be injected in a Springboot configuration file to be used as the HTTP root context.

      Technical implementation

      Thanks to spring-boot configuration, it's easy to change the web application root context with the server.contextPath property.

      To change the tcomp root context, you need to add --server.contextPath=/tcomp argument when you start the server.

      java -jar components-api-service-rest-all-components-0.1.0-SNAPSHOT.jar --server.contextPath=/toto
      

      Moreover, the default root context is now /tcomp

      Attachments

        Activity

          People

            Unassigned Unassigned
            jleloup Julien Leloup
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: