{"action":"created","issue":{"url":"https://api.github.com/repos/xdoo/vaadin-demo/issues/62","labels_url":"https://api.github.com/repos/xdoo/vaadin-demo/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/xdoo/vaadin-demo/issues/62/comments","events_url":"https://api.github.com/repos/xdoo/vaadin-demo/issues/62/events","html_url":"https://github.com/xdoo/vaadin-demo/issues/62","id":102310924,"number":62,"title":"Rest Interface auf Spring JPA Repository abschalten","user":{"login":"xdoo","id":712911,"avatar_url":"https://avatars.githubusercontent.com/u/712911?v=3","gravatar_id":"","url":"https://api.github.com/users/xdoo","html_url":"https://github.com/xdoo","followers_url":"https://api.github.com/users/xdoo/followers","following_url":"https://api.github.com/users/xdoo/following{/other_user}","gists_url":"https://api.github.com/users/xdoo/gists{/gist_id}","starred_url":"https://api.github.com/users/xdoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xdoo/subscriptions","organizations_url":"https://api.github.com/users/xdoo/orgs","repos_url":"https://api.github.com/users/xdoo/repos","events_url":"https://api.github.com/users/xdoo/events{/privacy}","received_events_url":"https://api.github.com/users/xdoo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xdoo/vaadin-demo/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/xdoo/vaadin-demo/labels/major","name":"major","color":"bfd4f2"},{"url":"https://api.github.com/repos/xdoo/vaadin-demo/labels/SERVICE","name":"SERVICE","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"peter-mueller","id":9094815,"avatar_url":"https://avatars.githubusercontent.com/u/9094815?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-mueller","html_url":"https://github.com/peter-mueller","followers_url":"https://api.github.com/users/peter-mueller/followers","following_url":"https://api.github.com/users/peter-mueller/following{/other_user}","gists_url":"https://api.github.com/users/peter-mueller/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-mueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-mueller/subscriptions","organizations_url":"https://api.github.com/users/peter-mueller/orgs","repos_url":"https://api.github.com/users/peter-mueller/repos","events_url":"https://api.github.com/users/peter-mueller/events{/privacy}","received_events_url":"https://api.github.com/users/peter-mueller/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/xdoo/vaadin-demo/milestones/2","html_url":"https://github.com/xdoo/vaadin-demo/milestones/Pre%20Release","labels_url":"https://api.github.com/repos/xdoo/vaadin-demo/milestones/2/labels","id":1228889,"number":2,"title":"Pre Release","description":"","creator":{"login":"xdoo","id":712911,"avatar_url":"https://avatars.githubusercontent.com/u/712911?v=3","gravatar_id":"","url":"https://api.github.com/users/xdoo","html_url":"https://github.com/xdoo","followers_url":"https://api.github.com/users/xdoo/followers","following_url":"https://api.github.com/users/xdoo/following{/other_user}","gists_url":"https://api.github.com/users/xdoo/gists{/gist_id}","starred_url":"https://api.github.com/users/xdoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xdoo/subscriptions","organizations_url":"https://api.github.com/users/xdoo/orgs","repos_url":"https://api.github.com/users/xdoo/repos","events_url":"https://api.github.com/users/xdoo/events{/privacy}","received_events_url":"https://api.github.com/users/xdoo/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":16,"state":"open","created_at":"2015-07-28T08:02:51Z","updated_at":"2015-08-25T06:46:15Z","due_on":"2015-08-27T22:00:00Z","closed_at":null},"comments":3,"created_at":"2015-08-21T06:37:55Z","updated_at":"2015-08-25T07:00:12Z","closed_at":null,"body":"Laut LOG werden Rest Endpunkte auf die Repositories erzeugt:\r\n\r\n<pre>\r\n...\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}/{property}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable,java.lang.String,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws java.lang.Exception\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}/{property}/{propertyId}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable,java.lang.String,java.lang.String,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws java.lang.Exception\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}/{property}],methods=[DELETE],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<? extends org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.deletePropertyReference(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable,java.lang.String) throws java.lang.Exception\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}/{property}],methods=[GET],params=[],headers=[],consumes=[],produces=[application/x-spring-data-compact+json || text/uri-list],custom=[]}\" onto public org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReferenceCompact(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable,java.lang.String,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws java.lang.Exception\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}/{property}],methods=[PATCH || PUT],params=[],headers=[],consumes=[application/json || application/x-spring-data-compact+json || text/uri-list],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<? extends org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.createPropertyReference(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.http.HttpMethod,org.springframework.hateoas.Resources<java.lang.Object>,java.io.Serializable,java.lang.String) throws java.lang.Exception\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}/{property}/{propertyId}],methods=[DELETE],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.deletePropertyReferenceId(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable,java.lang.String,java.lang.String) throws java.lang.Exception\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/schema],methods=[GET],params=[],headers=[],consumes=[],produces=[application/schema+json],custom=[]}\" onto public org.springframework.http.HttpEntity<org.springframework.data.rest.webmvc.json.JsonSchema> org.springframework.data.rest.webmvc.RepositorySchemaController.schema(org.springframework.data.rest.webmvc.RootResourceInformation)\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}],methods=[OPTIONS],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<?> org.springframework.data.rest.webmvc.RepositoryEntityController.optionsForItemResource(org.springframework.data.rest.webmvc.RootResourceInformation)\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}],methods=[HEAD],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<?> org.springframework.data.rest.webmvc.RepositoryEntityController.headForItemResource(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable) throws org.springframework.web.HttpRequestMethodNotSupportedException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<org.springframework.hateoas.Resource<?>> org.springframework.data.rest.webmvc.RepositoryEntityController.getItemResource(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws org.springframework.web.HttpRequestMethodNotSupportedException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}],methods=[PUT],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<? extends org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryEntityController.putItemResource(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.data.rest.webmvc.PersistentEntityResource,java.io.Serializable,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws org.springframework.web.HttpRequestMethodNotSupportedException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}],methods=[PATCH],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryEntityController.patchItemResource(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.data.rest.webmvc.PersistentEntityResource,java.io.Serializable,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws org.springframework.web.HttpRequestMethodNotSupportedException,org.springframework.data.rest.webmvc.ResourceNotFoundException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}/{id}],methods=[DELETE],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<?> org.springframework.data.rest.webmvc.RepositoryEntityController.deleteItemResource(org.springframework.data.rest.webmvc.RootResourceInformation,java.io.Serializable) throws org.springframework.data.rest.webmvc.ResourceNotFoundException,org.springframework.web.HttpRequestMethodNotSupportedException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}],methods=[OPTIONS],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<?> org.springframework.data.rest.webmvc.RepositoryEntityController.optionsForCollectionResource(org.springframework.data.rest.webmvc.RootResourceInformation)\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}],methods=[HEAD],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<?> org.springframework.data.rest.webmvc.RepositoryEntityController.headCollectionResource(org.springframework.data.rest.webmvc.RootResourceInformation) throws org.springframework.web.HttpRequestMethodNotSupportedException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.hateoas.Resources<?> org.springframework.data.rest.webmvc.RepositoryEntityController.getCollectionResource(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.data.rest.webmvc.support.DefaultedPageable,org.springframework.data.domain.Sort,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws org.springframework.data.rest.webmvc.ResourceNotFoundException,org.springframework.web.HttpRequestMethodNotSupportedException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}],methods=[GET],params=[],headers=[],consumes=[],produces=[application/x-spring-data-compact+json || text/uri-list],custom=[]}\" onto public org.springframework.hateoas.Resources<?> org.springframework.data.rest.webmvc.RepositoryEntityController.getCollectionResourceCompact(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.data.rest.webmvc.support.DefaultedPageable,org.springframework.data.domain.Sort,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws org.springframework.data.rest.webmvc.ResourceNotFoundException,org.springframework.web.HttpRequestMethodNotSupportedException\r\n2015-08-21 08:02:29 [main] INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped \"{[/{repository}],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}\" onto public org.springframework.http.ResponseEntity<org.springframework.hateoas.ResourceSupport> org.springframework.data.rest.webmvc.RepositoryEntityController.postCollectionResource(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.data.rest.webmvc.PersistentEntityResource,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws org.springframework.web.HttpRequestMethodNotSupportedException\r\n\r\n...\r\n</pre>\r\nEs muss geprüft werden, ob das ein Sicherheitsrisiko ist und ob wir dieses Feature benötigen. Ich tendiere dazu, es abzuschalten."},"comment":{"url":"https://api.github.com/repos/xdoo/vaadin-demo/issues/comments/134504648","html_url":"https://github.com/xdoo/vaadin-demo/issues/62#issuecomment-134504648","issue_url":"https://api.github.com/repos/xdoo/vaadin-demo/issues/62","id":134504648,"user":{"login":"peter-mueller","id":9094815,"avatar_url":"https://avatars.githubusercontent.com/u/9094815?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-mueller","html_url":"https://github.com/peter-mueller","followers_url":"https://api.github.com/users/peter-mueller/followers","following_url":"https://api.github.com/users/peter-mueller/following{/other_user}","gists_url":"https://api.github.com/users/peter-mueller/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-mueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-mueller/subscriptions","organizations_url":"https://api.github.com/users/peter-mueller/orgs","repos_url":"https://api.github.com/users/peter-mueller/repos","events_url":"https://api.github.com/users/peter-mueller/events{/privacy}","received_events_url":"https://api.github.com/users/peter-mueller/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T07:00:12Z","updated_at":"2015-08-25T07:00:12Z","body":"Die Endpunkte sind nur mit der initialen authentifizierung abgesichert. Rollen und Rechte kennen die Repositories nicht.\r\n\r\n- **Möglichkeit 1:**\r\n  `Mapped \"{[/{repository}/{id}/{property}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}\"` steht dann trotzdem da, es werden aber keine Endpunkte mehr erzeugt falls alle mit der Annotation abgesichert sind.\r\n\r\n- **Möglichkeit 2**\r\n  Spring Data Rest erstellt automatisch einen Controller über alle Entitäten, Relationen, HATEOAS... der funktioniert auch ootb schon (Siehe Screenshot: URL ist /buerger**s**/... also nicht von unserem Controller) \r\n\r\n  Man könnte diesen vorgenerierten Controller in Struktur so übernehmen und  entsprechende endpunkte überschreiben (Rechte und Rollen hinzufügen, Logic, usw... ). "}}