title: add spring boot to existing project without changing the main(args[]) method
body: <p>currently I am trying to add spring boot to an existing project.<br>
  This project is a standalone jar that successfully uses spring jpa and hibernate. But because the application must be able to receive and send json files, I thought that spring boot would be the best option.  </p>
  
  <p>Therefore I added the following dependency to my <code>pom.xml</code>  </p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;version&gt;1.4.0.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>And set up a little RequestMapping as a test  </p>
  
  <pre><code>@Controller
  public class RequestMappingController {
      @RequestMapping("/")
      @ResponseBody
      public String myAction() {
          return "Hello World !";
      }
  }
  </code></pre>
  
  <p>Now I have the problem, that all my sources (<a href="http://mnkartik.github.io/spring-boot/spring-boot-hello-world-standalone-application" rel="nofollow">this</a>, <a href="http://www.java-allandsundry.com/2014/02/spring-integration-standalone.html" rel="nofollow">this</a> and <a href="https://www.youtube.com/watch?v=VS8W-tEqIiw" rel="nofollow">this</a>) are telling me to set up the main method next.<br>
  Something like  </p>
  
  <pre><code>public static void main(String[] args) {
      SpringApplication.run(Main.class, args);
  }
  </code></pre>
  
  <p>But I am not able to change that method. My architecture uses a main jar file that loads components and plugins as jar files. And the main jar file is downloaded and is not programmed by me.  </p>
  
  <pre><code>main.jar          (downloaded)
  |- plugin1.jar    (programmed by me)
  |- plugin2.jar    (programmed by me)
  |- ...
  </code></pre>
  
  <p>I am not using any xml files (except the <code>pom.xml file of course) to configure spring. In my</code>plugin1.jar<code>there is a JpaConfig Class with all the important spring enabling annotations (</code>@EnableScheduling<code>,</code>@EnableAsync<code>, transactionmanagement, component scan,</code>@Configuration<code>, jpa repository enabling, ...)<br>
  I recognices that there is also a annotation</code>@SpringBootConfiguration` and because my plugin1 is able to activate all current implemented spring components in this Configuration class, maybe I can set up spring boot there as well? (is there a way? or some other way with a second configuration class?)  </p>
  
  <p>And that is my question: how can I enable spring boot within this existing project structure without changing the <code>main(String[] args)</code> method?  </p>