![JAR search and dependency download from the Maven repository](/logo.png)
org.example.server.Main Maven / Gradle / Ivy
package org.example.server;
import io.avaje.inject.ApplicationScope;
import io.avaje.inject.BeanScope;
import io.avaje.jex.Jex;
import io.avaje.jex.Routing;
import java.util.List;
public class Main {
public static void main(String[] args) {
start(8090);
}
public static Jex.Server start(int port) {
return start(port, ApplicationScope.scope());
}
public static Jex.Server start(int port, BeanScope context) {
final List services = context.list(Routing.Service.class);
final Jex jex = Jex.create();
jex.routing().addAll(services);
return jex.port(port).start();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy