{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/519","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/519/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/519/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/519/events","html_url":"https://github.com/spring-projects/spring-boot/issues/519","id":29633110,"number":519,"title":"Service wrappers for spring boot application","user":{"login":"wizwjw","id":1625837,"avatar_url":"https://avatars.githubusercontent.com/u/1625837?v=3","gravatar_id":"","url":"https://api.github.com/users/wizwjw","html_url":"https://github.com/wizwjw","followers_url":"https://api.github.com/users/wizwjw/followers","following_url":"https://api.github.com/users/wizwjw/following{/other_user}","gists_url":"https://api.github.com/users/wizwjw/gists{/gist_id}","starred_url":"https://api.github.com/users/wizwjw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wizwjw/subscriptions","organizations_url":"https://api.github.com/users/wizwjw/orgs","repos_url":"https://api.github.com/users/wizwjw/repos","events_url":"https://api.github.com/users/wizwjw/events{/privacy}","received_events_url":"https://api.github.com/users/wizwjw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-03-18T10:16:07Z","updated_at":"2015-02-17T16:41:21Z","closed_at":null,"body":"Just like nexus(a maven proxy). Start nexus use `nexus start`,then it print little message, and run as a daemon."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/74700271","html_url":"https://github.com/spring-projects/spring-boot/issues/519#issuecomment-74700271","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/519","id":74700271,"user":{"login":"DeezCashews","id":2191352,"avatar_url":"https://avatars.githubusercontent.com/u/2191352?v=3","gravatar_id":"","url":"https://api.github.com/users/DeezCashews","html_url":"https://github.com/DeezCashews","followers_url":"https://api.github.com/users/DeezCashews/followers","following_url":"https://api.github.com/users/DeezCashews/following{/other_user}","gists_url":"https://api.github.com/users/DeezCashews/gists{/gist_id}","starred_url":"https://api.github.com/users/DeezCashews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeezCashews/subscriptions","organizations_url":"https://api.github.com/users/DeezCashews/orgs","repos_url":"https://api.github.com/users/DeezCashews/repos","events_url":"https://api.github.com/users/DeezCashews/events{/privacy}","received_events_url":"https://api.github.com/users/DeezCashews/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T16:41:21Z","updated_at":"2015-02-17T16:41:21Z","body":"Yes I'd like to use the Java API since I am using Apache Commons Daemon procrun.  So here is where it gets tricky.  `org.springframework.boot.loader.WarLauncher` creates a special classloader to allow for in place execution similar to a application container.  Its main method calls `new WarLauncher().launch(args)` which sets up the classloader to load WEB-INF/lib, etc. and finally calls your startup class, which is where I simply call `SpringApplication.run(AppConfig.class, args);`  I tried exactly what you described but I can't save the `context` because `WarLauncher` creates a new instance of itself everytime and thus a whole new classloader.  If `WarLauncher` kept the classloader as a static variable I think your method would work.  I could easily write a wrapper class for `WarLauncher` instead of using it directly but unfortunately Spring Boot Maven Plugin's `spring-boot:repackage` goal doesn't have any options for adding classes to the \"parent classloader\"."}}