be.bagofwords.web.TestMain Maven / Gradle / Ivy
package be.bagofwords.web;
import be.bagofwords.application.*;
import be.bagofwords.util.SafeThread;
import be.bagofwords.util.Utils;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
* Created by koen on 10.07.15.
*/
public class TestMain extends SafeThread implements MainClass {
public TestMain() {
super("main", false);
}
public static void main(String[] args) {
ApplicationManager.runSafely(new BaseApplicationContextFactory() {
@Override
public AnnotationConfigApplicationContext createApplicationContext() {
singleton("main", new TestMain());
scan("be.bagofwords");
singleton("properties", new EnvironmentProperties() {
@Override
public boolean saveThreadSamplesToFile() {
return false;
}
@Override
public String getThreadSampleLocation() {
return null;
}
@Override
public String getApplicationUrlRoot() {
return "localhost";
}
});
singleton("webcontainer", new WebContainer(8080));
return super.createApplicationContext();
}
});
}
@Override
protected void runInt() throws Exception {
//while (!isTerminateRequested()) {
Utils.threadSleep(2000);
//}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy