use of org.finos.waltz.web.endpoints.Endpoint in project waltz by khartec.
the class Main method start.
void start() {
// 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, DataExtractor> extractors = ctx.getBeansOfType(DataExtractor.class);
extractors.forEach((name, extractor) -> {
LOG.info("Registering Extractor: {}", name);
extractor.register();
});
new StaticResourcesEndpoint().register();
LOG.info("Completed endpoint registration");
registerExceptionHandlers();
enableGZIP();
enableCORS();
}
Aggregations