codeconsole opened a new pull request, #15118:
URL: https://github.com/apache/grails-core/pull/15118

   Introduce `@CreatedDate` and `@LastModifiedDate` similar to [Spring Data 
JPA](https://docs.spring.io/spring-data/jpa/reference/auditing.html)
   
   Introduce grails.importGrailsAnnotations to automatically import common 
grails annotations.
   
   build.gradle
   ```gradle
   grails {
       importJavaTime = true
       importGrailsAnnotations = true
   }
   ```
   
   allows the following with no imports
   ```groovy
   class User implements UserDetails {
       String firstName
       String lastName
       String email
       @CreatedDate Instant created
       @LastModifiedDate Instant modified
   }
   ```
   
   ```groovy
   @Scaffold(domain = User)
   class UserService {}
   ```
   
   ```groovy
   import grails.plugin.scaffolding.RestfulServiceController
   
   @Scaffold(RestfulServiceController<User>)
   class UserController {}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to