diff --git a/pom.xml b/pom.xml index 2191465..e69eec7 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ com.loafle.overflow commons-java - 1.0.85-SNAPSHOT + 1.0.86-SNAPSHOT diff --git a/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAO.java b/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAO.java index 4f9a318..5971a31 100644 --- a/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAO.java +++ b/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAO.java @@ -2,7 +2,6 @@ package com.loafle.overflow.central.module.meta.dao; import java.util.List; -import com.loafle.overflow.model.meta.MetaInfraType; import com.loafle.overflow.model.meta.MetaTargetType; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @@ -14,5 +13,5 @@ import org.springframework.stereotype.Repository; public interface MetaTargetTypeDAO extends JpaRepository { MetaTargetType findByKey(String key); - List findAllByMetaInfraType(MetaInfraType metaInfraType); + List findAllByMetaInfraTypeKey(String key); } diff --git a/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaTargetTypeService.java b/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaTargetTypeService.java index 94a1a65..63186f4 100644 --- a/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaTargetTypeService.java +++ b/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaTargetTypeService.java @@ -36,7 +36,7 @@ public class CentralMetaTargetTypeService implements MetaTargetTypeService { } @Override - public List readAllByMetaInfraType(MetaInfraType metaInfraType) throws OverflowException { - return this.metaTargetTypeDAO.findAllByMetaInfraType(metaInfraType); + public List readAllByMetaInfraTypeKey(String key) throws OverflowException { + return this.metaTargetTypeDAO.findAllByMetaInfraTypeKey(key); } } diff --git a/src/test/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAOTest.java b/src/test/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAOTest.java index fd40e05..25a2744 100644 --- a/src/test/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAOTest.java +++ b/src/test/java/com/loafle/overflow/central/module/meta/dao/MetaTargetTypeDAOTest.java @@ -1,16 +1,8 @@ package com.loafle.overflow.central.module.meta.dao; -import static org.junit.Assert.assertNotNull; - -import java.util.List; - import com.loafle.overflow.central.spring.AppConfigTest; -import com.loafle.overflow.model.meta.MetaInfraType; -import com.loafle.overflow.model.meta.MetaTargetType; -import org.junit.Test; import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -21,15 +13,4 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration(classes = { AppConfigTest.class }) public class MetaTargetTypeDAOTest { - @Autowired - private MetaTargetTypeDAO metaTargetTypeDAO; - - @Test - public void findAllByMetaInfraType() throws Exception { - - List metaTargetTypes = this.metaTargetTypeDAO - .findAllByMetaInfraType(MetaInfraType.Enum.SERVICE.to()); - assertNotNull(metaTargetTypes); - } - }