So, it is not mandatory to create interfaces for Service, DAO but it is preferred if you are working on a fairly medium code base where there are multiple developers and possibly clients consuming those APIs outside of the application as well.
Should every service have an interface?
One possible reason for every service class to have an interface is that it makes interactions with sophisticated frameworks (e.g., Spring, JEE) much simpler. This is because Java can simply generate interceptor objects against interfaces (see java.
Why do we need service interface in Spring boot?
Some developers may decide to put @Service on interfaces because they want to: Explicitly show that an interface should only be used for service-level purposes. Define new service implementations and have them automatically detected as Spring beans during startup.