How to access Grails domain classes in Java service layer?

后端 未结 3 1385
难免孤独
难免孤独 2021-01-07 00:46

How can I use grails domain classes (which is in groovy) in service layer which is in Java/Spring.

When using the grails MVC, everything is fine as I can use contro

3条回答
  •  佛祖请我去吃肉
    2021-01-07 01:08

    org.codehaus.groovy.runtime.InvokerHelper makes this pretty straightforward; see this mailing list thread: http://grails.1312388.n4.nabble.com/Calling-Dynamic-Finders-on-Domain-Class-via-the-MetaClass-td1596496.html

提交回复
热议问题