move TcpIngestor to pdb-ui
and start it in the web application. Also use the spring way of handling property files.
This commit is contained in:
21
pdb-ui/src/main/java/org/lucares/pdbui/Ingestion.java
Normal file
21
pdb-ui/src/main/java/org/lucares/pdbui/Ingestion.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package org.lucares.pdbui;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class Ingestion {
|
||||
|
||||
private final Ingestor tcpIngestor;
|
||||
|
||||
public Ingestion(final Ingestor tcpIngestor) {
|
||||
this.tcpIngestor = tcpIngestor;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void start() throws Exception {
|
||||
tcpIngestor.start();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user