/*
 * Copyright 2015 Shredder121.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.shredder121.gh_event_api;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Component;

import com.google.common.collect.ObjectArrays;

/**
 * The starter class for the server.
 *
 * @author Shredder121
 */
@SpringBootApplication
public class GHEventApiServer {

    /**
     * The method to start the bare server.
     *
     * <p>
     * To make your {@link Component component}s known specify them under the {@code spring.main.sources } system property.
     * </p>
     *
     * Usage(add this to the configuration of the {@code spring-boot-maven-plugin}):
     * <pre>{@literal
     * <mainClass>com.github.shredder121.gh_event_api.GHEventApiServer</mainClass>
     * <arguments>
     *   <argument>--spring.main.sources=<YOUR.SOURCES.HERE></argument>
     * </arguments>
     * }</pre>
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        SpringApplication.run(GHEventApiServer.class, args);
    }

    /**
     * The method to start your {@code app} under the server.
     *
     * @param app the app that will be included
     * @param args the optional (command-line) arguments
     */
    public static void start(Class<?> app, String... args) {
        start(new Class<?>[]{app}, args);
    }

    /**
     * The method to start multiple {@code app}s under the server.
     *
     * @param app multiple apps that will be included
     * @param args the optional (command-line) arguments
     */
    public static void start(Class<?>[] app, String... args) {
        Class<?>[] apps = ObjectArrays.concat(app, GHEventApiServer.class);
        SpringApplication.run(apps, args);
    }
}

@@ -748,32 +748,154 @@
 ootApplication;%0A
+import org.springframework.context.ApplicationContext;%0Aimport org.springframework.context.ConfigurableApplicationContext;%0A
 import org.sprin
@@ -1998,32 +1998,112 @@
    *
-/%0A    public static void
+ @return the running %7B@link ApplicationContext%7D%0A     */%0A    public static ConfigurableApplicationContext
  sta
@@ -2145,16 +2145,23 @@
         
+return 
 start(ne
@@ -2396,32 +2396,112 @@
    *
-/%0A    public static void
+ @return the running %7B@link ApplicationContext%7D%0A     */%0A    public static ConfigurableApplicationContext
  sta
@@ -2613,32 +2613,39 @@
 class);%0A        
+return 
 SpringApplicatio

Return SpringApplication.run() result