Browse Source

use GrailsCompileStatic for all Grails artefact classes

Lari Hotari 10 years ago
parent
commit
766aa1c9e5

+ 2 - 2
frameworks/Groovy/grails/hello/grails-app/controllers/hello/HelloController.groovy

@@ -1,13 +1,13 @@
 package hello
 package hello
 
 
+import grails.compiler.GrailsCompileStatic
 import grails.converters.JSON
 import grails.converters.JSON
-import groovy.transform.CompileStatic
 
 
 import java.util.concurrent.ThreadLocalRandom
 import java.util.concurrent.ThreadLocalRandom
 
 
 import org.hibernate.Session
 import org.hibernate.Session
 
 
-@CompileStatic
+@GrailsCompileStatic
 class HelloController {
 class HelloController {
 
 
     def index() {
     def index() {

+ 3 - 0
frameworks/Groovy/grails/hello/grails-app/domain/hello/Fortune.groovy

@@ -1,5 +1,8 @@
 package hello
 package hello
 
 
+import grails.compiler.GrailsCompileStatic
+
+@GrailsCompileStatic
 class Fortune {
 class Fortune {
     Integer id
     Integer id
     String message
     String message

+ 3 - 0
frameworks/Groovy/grails/hello/grails-app/domain/hello/World.groovy

@@ -1,5 +1,8 @@
 package hello
 package hello
 
 
+import grails.compiler.GrailsCompileStatic
+
+@GrailsCompileStatic
 class World {
 class World {
     Integer id
     Integer id
     Integer randomNumber
     Integer randomNumber