0x1306e6d / tollgate

An API gateway for your microservice.
MIT License
6 stars 1 forks source link

Add mandatory properties for configuring routing #155

Closed 0x1306e6d closed 2 years ago

0x1306e6d commented 2 years ago

Add mandatory properties (path, upstream information such as uri or scheme and endpoints) for configuring routing on the Spring Boot integration.

It would be useful since users don't have to create GatewayConfigurator beans. The TollgateAutoConfiguration will configure a Gateway to send clients' requests to an upstream according to the Spring Boot's properties. This is an example for settings:

tollgate:
  gateway:
    server:
      ports:
        - port: 8080
          protocol: HTTP
    routes:
      - name: exampleProxy
        path: /
        upstream:
          uri: https://example.com

The Gateway will send requests for / to https://example.com.

This commit changes the properties path for the gateway server from tollgate.server to tollgate.gateway.server.

codecov[bot] commented 2 years ago

Codecov Report

Merging #155 (58bfd54) into master (be0bc3f) will increase coverage by 1.30%. The diff coverage is 95.12%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #155      +/-   ##
============================================
+ Coverage     76.82%   78.12%   +1.30%     
- Complexity      146      153       +7     
============================================
  Files            27       28       +1     
  Lines           535      576      +41     
  Branches         30       32       +2     
============================================
+ Hits            411      450      +39     
  Misses          101      101              
- Partials         23       25       +2     
Impacted Files Coverage Δ
.../autoconfigure/GatewayServerConfigurationUtil.java 100.00% <ø> (ø)
...t/autoconfigure/GatewayRouteConfigurationUtil.java 83.33% <83.33%> (ø)
.../boot/autoconfigure/TollgateAutoConfiguration.java 100.00% <100.00%> (ø)
...amework/boot/autoconfigure/TollgateProperties.java 95.65% <100.00%> (+6.76%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update be0bc3f...58bfd54. Read the comment docs.