Results 1 to 4 of 4

Thread: 1.0.0.rc3

  1. #1
    Join Date
    Aug 2006
    Posts
    129

    Default 1.0.0.rc3

    updating to this version does not expose any repository,

    output :
    Code:
    {
    
        "links": [ ],
        "content": [ ]
    
    }
    log:
    Code:
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}],methods=[GET],params=
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/],methods=[GET],params=[],headers=[],con
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}],methods=[GET],params=[],he
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/search],methods=[GET],param
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}],methods=[PUT],params=
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}],methods=[DELETE],para
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}/{property}],methods=[G
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}/{property}],methods=[P
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}/{property}],methods=[D
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}/{property}/{linkedId}]
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/{id}/{property}/{linkedId}]
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}],methods=[POST],params=[],h
    INFO  o.s.d.r.w.RepositoryRestHandlerMapping - Mapped "{[/{repository}/search/{query}],methods=[GE

    Code:
    DEBUG o.s.d.r.w.RepositoryRestExporterServlet - DispatcherServlet with name 'exporter' processing GET request for [/hateos/exported/]
    DEBUG o.s.d.r.w.RepositoryRestHandlerMapping - Looking up handler method for path /
    DEBUG o.s.d.r.w.RepositoryRestHandlerMapping - Returning handler method [public org.springframework.http.ResponseEntity<?> org.springfra
    DEBUG o.s.d.r.w.RepositoryRestExporterServlet - Last-Modified value for [/hateos/exported/] is: -1
    INFO  b.m.c.e.r.s.HandlerPermissionEvaluetor -  request method : GET
    INFO  b.m.c.e.r.s.HandlerPermissionEvaluetor -  request handler : public org.springframework.http.ResponseEntity<?> org.springframework.
    DEBUG o.s.d.r.w.RepositoryRestExporterServlet - Null ModelAndView returned to DispatcherServlet with name 'exporter': assuming HandlerAd
    DEBUG o.s.d.r.w.RepositoryRestExporterServlet - Successfully completed request
    only extra update was spring-hateos:0.3.0.BUILD-SNAPSHOT

  2. #2
    Join Date
    Aug 2006
    Posts
    129

    Default spring-data-rest-webmvc-app

    this happens to the example as well : spring-data-rest-webmvc-app

  3. #3
    Join Date
    Jul 2006
    Location
    Lamar, Missouri USA
    Posts
    36

    Default

    I just did a "./gradlew jettyRun" from the example directory and am getting exposed repositories:

    Code:
    < HTTP/1.1 200 OK
    < Content-Type: application/json
    < Content-Length: 275
    < Server: Jetty(6.1.25)
    < 
    {
      "links" : [ {
        "rel" : "address",
        "href" : "http://localhost:8080/data/address"
      }, {
        "rel" : "people",
        "href" : "http://localhost:8080/data/people"
      }, {
        "rel" : "profile",
        "href" : "http://localhost:8080/data/profile"
      } ],
      "content" : [ ]
    }
    The configuration is sensitive to the order in which ApplicationContexts are loaded. If you look in the web.xml in the example app [1] or the Servlet 3.0 example in the Spring Data Book [2], you'll see two different ways to ensure your Repository definitions are loaded before the exporter servlet.

    Otherwise, the controller is being initialized before the JPA repositories, so they won't be exported.

    An example configuration class is discussed in the wiki: [3]

    [1] - https://github.com/SpringSource/spri...EB-INF/web.xml
    [2] - https://github.com/SpringSource/spri...itializer.java
    [3] - https://github.com/SpringSource/spri...-REST-Exporter
    Jon Brisbin
    SpringSource
    http://www.springsource.com

  4. #4
    Join Date
    Jun 2010
    Posts
    22

    Default

    Hi!

    I do have exactly the same problem. Just posted about it here:
    http://forum.springsource.org/showth...rces-available

    Jon, could you please elaborate a little bit about the order in which stuff is loaded?
    If you have a look at my project (see link) you will see, that I initialize my app like your examples...

    Thanks
    Dominik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •