Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2014 the original author or authors.
  * 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
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
Generic Spring Boot org.springframework.boot.SpringApplication class which can be used as a main class if only requirement from an application is to pass arguments into,java.lang.String[])

Usual use case for this would be to define this class as Main-Class when creating i.e. executable jars using Spring Boot maven or gradle plugins. User can always create a similar dummy main class within a packaged application and let Spring Boot maven or gradle plugin to find it during the creating of an executable jar.

Care must be taken into account that if used, this class will enable a system with

Janne Valkealahti
@link org.springframework.boot.autoconfigure.EnableAutoConfiguration}. If there is a need to exclude any automatic auto-configuration, user should define a custom class.
public class SpringYarnBootApplication {
	public static void main(String[] args) {;
New to GrepCode? Check out our FAQ X