class ShopService{ def grailsApplication def test(){ grailsApplication.mainContext.getBean('myService') } }