for example:class
Book {
static mapping = {
batchSize 10
}
}
could be:
@Configration(batchSize=10)
class Book {
...
}
for example:class
Book {
static mapping = {
batchSize 10
}
}
could be:
@Configration(batchSize=10)
class Book {
...
}
Maybe because they can be changed that way? And annotations are set in stone.
The main reason is that Grails was developed for Groovy 1.1 which didn't support annotations. I guess one of the next versions will support annotations but as alamar said, annotations can't be changed at runtime. Therefore, the current approach is more flexible.