net.vectorpublish.desktop.vp.VectorPublishApplicationContext Maven / Gradle / Ivy
/*
* Copyright (c) 2016, Peter Rader. All rights reserved.
* ___ ___ __ ______ __ __ __ __
* | | |.-----..----.| |_ .-----..----.| __ \.--.--.| |--.| ||__|.-----.| |--.
* | | || -__|| __|| _|| _ || _|| __/| | || _ || || ||__ --|| |
* \_____/ |_____||____||____||_____||__| |___| |_____||_____||__||__||_____||__|__|
*
* http://www.gnu.org/licenses/gpl-3.0.html
*/
package net.vectorpublish.desktop.vp;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
final class VectorPublishApplicationContext extends AnnotationConfigApplicationContext {
private boolean exitOnClose = true;
VectorPublishApplicationContext() {
super(AppConfig.class);
}
@Override
protected void onClose() {
if (exitOnClose) {
System.exit(1);
}
}
public void setExitOnClose(boolean exitOnClose) {
this.exitOnClose = exitOnClose;
}
}