diff --git a/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java b/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java index 5063eec..d883485 100644 --- a/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java +++ b/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java @@ -41,7 +41,7 @@ public class GenerateUtil { return resultMap; } - resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler); + resultMap = this.metaSensorItemKeyService.readAllMapByCrawler(metaCrawler); this.mappingMap.put(metaCrawler.getId(), resultMap); return resultMap; diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java index 3e3bb44..75610bf 100644 --- a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java @@ -13,15 +13,18 @@ import java.util.Map; /** * Created by snoop on 17. 8. 29. */ -@Service +@Service("MetaSensorItemKeyService") public class MetaSensorItemKeyService { @Autowired private MetaSensorItemKeyDAO metaSensorItemKeyDAO; + public List readAllByCrawler(MetaCrawler metaCrawler) { + return this.metaSensorItemKeyDAO.findAllByCrawler(metaCrawler); + } - public Map readAllByCrawler(MetaCrawler metaCrawler) { + public Map readAllMapByCrawler(MetaCrawler metaCrawler) { Map resultMap = new HashMap<>(); diff --git a/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java b/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java index 948f3e7..074a196 100644 --- a/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java @@ -28,7 +28,7 @@ public class MetaSensorItemKeyServiceTest { MetaCrawler metaCrawler = new MetaCrawler(); metaCrawler.setId((short)11); - Map resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler); + Map resultMap = this.metaSensorItemKeyService.readAllMapByCrawler(metaCrawler); Assert.assertNotEquals(resultMap.size(), 0);