Create Developer/Extending EvoAl/Custom Main authored by Bernhard Johannes Berger's avatar Bernhard Johannes Berger
# Custom Main
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:
```java
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
import de.evoal.core.api.cdi.MainClass;
@ApplicationScoped
@Named("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=my-main``` to EvoAl so it creates, initialises and starts your main class.
\ No newline at end of file