To create your own application using EvoAl, you can create a custom main class.
Therefore, you implement the MainClass
, and annotate the class using CDI annotations:
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
import de.evoal.core.api.cdi.MainClass;
@ApplicationScoped
@Named("com.example.optimisation.my-main")
public class DataGenerator implements MainClass {
@Override
public void run() {
// your main application code goes here
}
}
You have to pass the parameter -Bcore:main=com.example.optimisation.my-main
to EvoAl, so it creates, initialises, and starts your main class.