Class PropertyConfigScheduler

java.lang.Object
swiss.trustbroker.config.PropertyConfigScheduler

@Controller public class PropertyConfigScheduler extends Object
  • Constructor Details

  • Method Details

    • run

      @Scheduled(cron="${trustbroker.config.claimsMapping.syncSchedule}") public void run()
    • checkReconfig

      @PostMapping(path="/api/v1/config", consumes="application/json") public org.springframework.http.ResponseEntity<String> checkReconfig(@RequestBody AdminAction action)
      Allow a config reload every 1sec (a bit of DOS prevention) given the client knows the admin secret. Returns HTTP/404 when the feature is disabled (default) or the action or secret is wrong. Copy and paste this one in DEV "local" setup to speed up config changes.
       curl -kv http://localhost:8090/api/v1/config \
         -H 'Content-Type: application/json' \
         -d '{"action":"reload","adminSecret":"trustbroker.config.adminSecret"}'
       
    • runSynchronization

      public String runSynchronization()