Search in sources :

Example 1 with StaticResourcesEndpoint

use of com.khartec.waltz.web.endpoints.api.StaticResourcesEndpoint in project waltz by khartec.

the class Main method start.

public void start(ServerMode mode) {
    // configure logging
    LoggingUtilities.configureLogging();
    ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
    Map<String, Endpoint> endpoints = ctx.getBeansOfType(Endpoint.class);
    endpoints.forEach((name, endpoint) -> {
        LOG.info("Registering Endpoint: {}", name);
        endpoint.register();
    });
    Map<String, BaseDataExtractor> extractors = ctx.getBeansOfType(BaseDataExtractor.class);
    extractors.forEach((name, extractor) -> {
        LOG.info("Registering Extractor: {}", name);
        extractor.register();
    });
    new StaticResourcesEndpoint().register();
    LOG.info("Completed endpoint registration");
    registerExceptionHandlers();
    enableGZIP();
    enableCORS();
}
Also used : StaticResourcesEndpoint(com.khartec.waltz.web.endpoints.api.StaticResourcesEndpoint) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) Endpoint(com.khartec.waltz.web.endpoints.Endpoint) StaticResourcesEndpoint(com.khartec.waltz.web.endpoints.api.StaticResourcesEndpoint) DIConfiguration(com.khartec.waltz.service.DIConfiguration) BaseDataExtractor(com.khartec.waltz.web.endpoints.extracts.BaseDataExtractor)

Aggregations

DIConfiguration (com.khartec.waltz.service.DIConfiguration)1 Endpoint (com.khartec.waltz.web.endpoints.Endpoint)1 StaticResourcesEndpoint (com.khartec.waltz.web.endpoints.api.StaticResourcesEndpoint)1 BaseDataExtractor (com.khartec.waltz.web.endpoints.extracts.BaseDataExtractor)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1