Mapping with Hibernate Annotations in Grails 3.0.1
问题 How can I map a domain class with annotations in Grails 3.0.1? The following steps didn't work for me. Step 1 . I have created a new application with Grails 3.0.1 ( grails create-app books ). Step 2 . As described in Mapping with Hibernate Annotations I have created a new class in src/main/com/books/Book.groovy (tried src/main/groovy/com/books/Book.groovy as well) package com.books; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity