title: is it possible to use GORM with Spring Data JPA and Rest?
body: <p>I'm a little bit new to the "Groovy world" and I just started to work with the language to understand syntax and characteristics. Previously I worked a lot with Java and Spring Boot and since the last one is supported by Pivotal as much as Groovy and Grails are, I wondered if it's possible to use Groovy w/o issues with Spring Boot.</p>
  
  <p>Well it works (obviously), but when I discovered the syntax of GORM and the DSL around of it I started to use it. Unfortunately it doesn't seem to fit well with Spring Data JPA and Rest, since I tried to do something like this:</p>
  
  <pre><code>@grails.persistence.Entity
  class Person {
      BigInteger id
      String firstName
      String lastName
  
      static mapping { table name: 'people' }
      static constraints { /* whatever */ }
  }
  
  @RepositoryRestResource(collectionResourceRel = "people", path = "/api/people")
  interface PersonRepository extends JpaRepository&lt;Person, BigInteger&gt; { }
  </code></pre>
  
  <p>However Spring Boot is not able to run since it throws an exception with the following statement</p>
  
  <pre><code>IllegalArgumentException: Not a managed bean Person
  </code></pre>
  
  <p>On the other side if I fix that Entity with JPA annotations (by removing the annotation of Grails then), I've got no issues at all.</p>
  
  <p>Is there any solution on this? Is it possible to use GORM somehow with Spring Data JPA and Rest, since GORM is relying on Hibernate anyway?</p>