I m new to springboot
I created a component :
@Component
public class Article {
File xml = new File(Constante.ARTICLE_XML);
static File out = new File(Constante.ARTICLE_CSV + "out_article.csv");
public synchronized void process() throws IOException, InterruptedException {
Thread th = new Thread() {
@Override
public void run() {
try {
.....
}
}
};
th.start();
}
.....
}
Here is the main method :
@SpringBootApplication
@EnableAutoConfiguration
@ComponentScan(basePackages = "com.axian.oxalys.*")
@PropertySource({"file:${app.home}/application.properties"})
public class App {
public static void main(String[] args) {
}
}
How can I call the component's method process() from the main method ?