{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/3300","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/3300/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/3300/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/3300/events","html_url":"https://github.com/spring-projects/spring-boot/issues/3300","id":89892168,"number":3300,"title":"Multiple Spring boot apps sharing classpath / class-loader.","user":{"login":"flozano","id":1159291,"avatar_url":"https://avatars.githubusercontent.com/u/1159291?v=3","gravatar_id":"","url":"https://api.github.com/users/flozano","html_url":"https://github.com/flozano","followers_url":"https://api.github.com/users/flozano/followers","following_url":"https://api.github.com/users/flozano/following{/other_user}","gists_url":"https://api.github.com/users/flozano/gists{/gist_id}","starred_url":"https://api.github.com/users/flozano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flozano/subscriptions","organizations_url":"https://api.github.com/users/flozano/orgs","repos_url":"https://api.github.com/users/flozano/repos","events_url":"https://api.github.com/users/flozano/events{/privacy}","received_events_url":"https://api.github.com/users/flozano/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2015-06-21T10:12:51Z","updated_at":"2016-10-17T09:07:29Z","closed_at":"2015-06-23T18:10:24Z","body":"I am looking at how to migrate my current setup to Spring boot and I am blocked by this.\r\n\r\nIn my current setup, I have several micro service apps. During integration tests, these services share the same class-loader, as I bring them up inside tests.\r\n\r\nPseudocode:\r\n```java\r\npublic class MyTest {\r\n\r\n\tService1 s1;\r\n\tService2 s2;\r\n\r\n\t@Before\r\n\tpublic void setUp() {\r\n\t\ts1 = new Service1();\r\n\t\ts2 = new Service2(s1);\r\n\t}\r\n\r\n\t@Test\r\n\tpublic void test1() {\r\n\t\ton(s2).get(\"/something\");\r\n\t\tverify(s1).received(\"/somethingElse\");\r\n\t}\r\n}\r\n```\r\n\r\nAFAIK Spring boot discovers everything from classpath, therefore having multiple spring boot apps up and running inside same class-loader would therefore be very conflictive. Is there any way to prevent them from colliding or loading the wrong configurations?\r\n\r\nBTW I asked this to @joshlong during Spring I/O 15, but I'm not sure I explained properly..."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/254153214","html_url":"https://github.com/spring-projects/spring-boot/issues/3300#issuecomment-254153214","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/3300","id":254153214,"user":{"login":"flozano","id":1159291,"avatar_url":"https://avatars.githubusercontent.com/u/1159291?v=3","gravatar_id":"","url":"https://api.github.com/users/flozano","html_url":"https://github.com/flozano","followers_url":"https://api.github.com/users/flozano/followers","following_url":"https://api.github.com/users/flozano/following{/other_user}","gists_url":"https://api.github.com/users/flozano/gists{/gist_id}","starred_url":"https://api.github.com/users/flozano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flozano/subscriptions","organizations_url":"https://api.github.com/users/flozano/orgs","repos_url":"https://api.github.com/users/flozano/repos","events_url":"https://api.github.com/users/flozano/events{/privacy}","received_events_url":"https://api.github.com/users/flozano/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T09:07:29Z","updated_at":"2016-10-17T09:07:29Z","body":"It's supported but it was really painful, having to use separate class-loaders and replicate the current assignation configurationArtifact->service (this class contains configuration that I want to load in this service) at the class-loader level (this jar is allowed for this service, this jar is not).\r\n\r\nThis solution was therefore not suitable for me, but I understand this is consequence of the core design of spring boot, and nothing can be done easily.\r\n\r\nI want to revisit this when Java 9 is available, maybe easier with jigsaw."}}
{"actor":{"display_login":"flozano"}}