diff --git a/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/dao/FooDao.java b/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/dao/FooDao.java index a497d14dd4..a59bb30f48 100644 --- a/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/dao/FooDao.java +++ b/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/dao/FooDao.java @@ -3,7 +3,7 @@ package org.baeldung.spring.persistence.dao; import org.springframework.stereotype.Repository; @Repository -public class FooDao { +public class FooDao implements IFooDao { public FooDao() { super(); diff --git a/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/dao/IFooDao.java b/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/dao/IFooDao.java new file mode 100644 index 0000000000..91d44f5f6b --- /dev/null +++ b/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/dao/IFooDao.java @@ -0,0 +1,5 @@ +package org.baeldung.spring.persistence.dao; + +public interface IFooDao { + // +} diff --git a/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/service/FooService.java b/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/service/FooService.java new file mode 100644 index 0000000000..cda31a0e86 --- /dev/null +++ b/spring-hibernate-dao/src/main/java/org/baeldung/spring/persistence/service/FooService.java @@ -0,0 +1,19 @@ +package org.baeldung.spring.persistence.service; + +import org.baeldung.spring.persistence.dao.IFooDao; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class FooService { + + @Autowired + private IFooDao fooDao; + + public FooService() { + super(); + } + + // API + +}