grails service class not recognized
Hi all,
I have a grails application, everything runs fine. I just went to create my first service class and Intellij doesn't recognize it when I create an instance of it. It works, created a test method to do so. Is there any fix for this to let it recognize service classes? Thanks.
请先登录再写评论。
What do you mean by the word "to recognize"?
so I do the code
def test = new MyMethod()
test.testme();
This works however MyMethod gives an intellij error (not a grails error) of "Cannot resolve symbol MyMethod" and similarly for testme
Do you have MyMethod in the imports?
Sorry for the delay.
No, but if the import wasn't there shouldn't it error out? (which it didn't)
The service class and test class are in same package?
No, the service class is being called from a controller.
Please, attach a small sample project.
I don't understand how you can access to the service from a controller when service and controller are in different packages and service class is not declared in imports.