In Grails 3.3.3, when I run generate-all
for a domain class, a Service Interface is generates (versus the actual Service Class from Grails 2.x). I actually didn't notice it until I tried to add a method to my service.
The interface gets placed in the services folder where the service would live. I actually do like the interface but I still want the service and the default implementations. How can I have both an interface and implementation live in the services folder if the interface already has the name of the service? (Ex the interface gets named ClientService.groovy
so the implementation would have the same name)
Here is an example of an interface that get's generated
package project
import grails.gorm.services.Service
@Service(Client)
interface ClientService {
Client get(Serializable id)
List<Client> list(Map args)
Long count()
void delete(Serializable id)
Client save(Client client)
}