001package voyeur;
002/*-
003 * ##########################################################################
004 * Local Area Network Voyeur
005 * $Id$
006 * $HeadURL$
007 * %%
008 * Copyright (C) 2019 - 2020 Allen D. Ball
009 * %%
010 * Licensed under the Apache License, Version 2.0 (the "License");
011 * you may not use this file except in compliance with the License.
012 * You may obtain a copy of the License at
013 *
014 *      http://www.apache.org/licenses/LICENSE-2.0
015 *
016 * Unless required by applicable law or agreed to in writing, software
017 * distributed under the License is distributed on an "AS IS" BASIS,
018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019 * See the License for the specific language governing permissions and
020 * limitations under the License.
021 * ##########################################################################
022 */
023import lombok.NoArgsConstructor;
024import lombok.ToString;
025import lombok.extern.log4j.Log4j2;
026import org.springframework.boot.SpringApplication;
027import org.springframework.boot.autoconfigure.SpringBootApplication;
028import org.springframework.boot.builder.SpringApplicationBuilder;
029import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
030
031/**
032 * {@link SpringApplication} {@link Launcher}.
033 *
034 * @author {@link.uri mailto:ball@hcf.dev Allen D. Ball}
035 * @version $Revision$
036 */
037@SpringBootApplication
038@NoArgsConstructor @ToString @Log4j2
039public class Launcher extends SpringBootServletInitializer {
040
041    /**
042     * Standard {@link SpringApplication} {@code main(String[])}
043     * entry point.
044     *
045     * @param   argv            The command line argument vector.
046     *
047     * @throws  Exception       If the function does not catch
048     *                          {@link Exception}.
049     */
050    public static void main(String[] argv) throws Exception {
051        SpringApplication application = new SpringApplication(Launcher.class);
052
053        application.run(argv);
054    }
055
056    @Override
057    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
058        return application.sources(Launcher.class);
059    }
060}