Skip to content
Snippets Groups Projects
Commit e8da366f authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-7491 spring: Shutdown on done

parent c2b46ef7
No related branches found
No related tags found
1 merge request!2OZG-7491 pipeline: Change version format
Pipeline #1569 skipped
......@@ -25,6 +25,7 @@ package de.ozgcloud.eingang.xta;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Profile;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
......@@ -43,11 +44,14 @@ class XtaRunner implements ApplicationListener<ContextRefreshedEvent> {
private XtaService service;
@Autowired
private SemantikAdapter semantikAdapter;
@Autowired
private ConfigurableApplicationContext context;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
LOG.info("Fetching XTA Messages");
runGetXtaMessages();
context.close();
}
void runGetXtaMessages() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment