{"action":"created","issue":{"url":"https://api.github.com/repos/oasp/oasp4j/issues/281","labels_url":"https://api.github.com/repos/oasp/oasp4j/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/oasp/oasp4j/issues/281/comments","events_url":"https://api.github.com/repos/oasp/oasp4j/issues/281/events","html_url":"https://github.com/oasp/oasp4j/issues/281","id":93246176,"number":281,"title":"Change Spring context includes to separate concerns","user":{"login":"amarinso","id":9352103,"avatar_url":"https://avatars.githubusercontent.com/u/9352103?v=3","gravatar_id":"","url":"https://api.github.com/users/amarinso","html_url":"https://github.com/amarinso","followers_url":"https://api.github.com/users/amarinso/followers","following_url":"https://api.github.com/users/amarinso/following{/other_user}","gists_url":"https://api.github.com/users/amarinso/gists{/gist_id}","starred_url":"https://api.github.com/users/amarinso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarinso/subscriptions","organizations_url":"https://api.github.com/users/amarinso/orgs","repos_url":"https://api.github.com/users/amarinso/repos","events_url":"https://api.github.com/users/amarinso/events{/privacy}","received_events_url":"https://api.github.com/users/amarinso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-06T10:41:25Z","updated_at":"2015-07-06T20:52:37Z","closed_at":null,"body":"Reviewing the sample application for the #278 (CORS filter) I came to this tree of spring/context xml file dependencies/inclusions\r\n\r\n![oasp4j context order](https://cloud.githubusercontent.com/assets/9352103/8520551/85656880-23db-11e5-8987-4bcfe250b74e.png)\r\n\r\n\r\nHere I think beans-services is taking too much responsibility and also we have common beans loaded by dataaccess context.\r\n\r\nI would rather separate this to match this other picture:\r\n\r\n![oasp4j context order proposal](https://cloud.githubusercontent.com/assets/9352103/8520573/b277c6b0-23db-11e5-9eb4-b335cd376c72.png)\r\n\r\nI've already issued a PR #280 in order to address this.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/oasp/oasp4j/issues/comments/118994773","html_url":"https://github.com/oasp/oasp4j/issues/281#issuecomment-118994773","issue_url":"https://api.github.com/repos/oasp/oasp4j/issues/281","id":118994773,"user":{"login":"amarinso","id":9352103,"avatar_url":"https://avatars.githubusercontent.com/u/9352103?v=3","gravatar_id":"","url":"https://api.github.com/users/amarinso","html_url":"https://github.com/amarinso","followers_url":"https://api.github.com/users/amarinso/followers","following_url":"https://api.github.com/users/amarinso/following{/other_user}","gists_url":"https://api.github.com/users/amarinso/gists{/gist_id}","starred_url":"https://api.github.com/users/amarinso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarinso/subscriptions","organizations_url":"https://api.github.com/users/amarinso/orgs","repos_url":"https://api.github.com/users/amarinso/repos","events_url":"https://api.github.com/users/amarinso/events{/privacy}","received_events_url":"https://api.github.com/users/amarinso/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T20:52:37Z","updated_at":"2015-07-06T20:52:37Z","body":"My motivation was driven by reviewing the sample application logic without realizing about the test.\r\n\r\nFor example, having a context called `beans-commons` and have it loaded by the `beans-dataaccess` doesn't seem logical to me. If it is says common in its name it suggests to be the place to put beans shared through the application, related to all layers.\r\n\r\nThe other change was to extract the `beans-logic` from the `beans-service`. I recon that it's difficult to have a web application with logic not published with a service layer but having it separated seemed more logical to me... first instantiate the logic, then wrap with service layer... and while writing this I realize that may lead to extract also the dataaccess prior to defining the logic....\r\n\r\nSo the `beans-applications` should contain the following in order:\r\n\r\n- beans-common\r\n- beans-dataacess\r\n- beans-logic\r\n- beans-services\r\n\r\nOn the other side, having Spring Boot will get rid of the context files but I suppose that it will bring also some kind of ordering for what to scan/include/instantiate... so maybe the discussion is also valid for this case.\r\n\r\nIn either case I think that we should properly document why are we organizing the code the way it is. Your comment about the tests using the right context file is spot-on.\r\n\r\nDoes any of this make sense or do we leave it as it is?\r\n\r\n"}}