I like spring boot but I can't figure/find out how can I achieve this: I have executable spring application. I need applicationContext, do some stuff and then start "webPart" (REST api). Is it possible to tell spring "don't start jetty automatically, I'll start it myself", or I need to compose application myself?
I would like to do something like that. Do anyone have any idea?
@SpringApplication
public class App {
public static void main(String[] args) {
ApplicationContext ctx = SpringApplication.run(App.class, args);
try {
doSth(ctx);
startWeb();
} catch(Exception e) {
clean();
}
}
}
EDIT: I want to use "web-part" but later and when I decided to (f.e. Exception is not thrown...). I don't want to prevent web-context to be used at all.