##### Coverage Report - com.ctrip.apollo.biz.service.ConfigService

Classes in this File | Line Coverage | Branch Coverage | Complexity
ConfigService |
100% | 3/3
N/A | N/A
| 1.0;1

1 |  |
     package com.ctrip.apollo.biz.service;
2 |  |
3 |  |
     import com.ctrip.apollo.biz.entity.Release;
4 |  |
     import com.ctrip.apollo.biz.repository.ReleaseRepository;
5 |  |
6 |  |
     import org.springframework.beans.factory.annotation.Autowired;
7 |  |
     import org.springframework.stereotype.Service;
8 |  |
9 |  |
     /**
10 |  |
      * Config Service
11 |  |
      *
12 |  |
      * @author Jason Song(song_s@ctrip.com)
13 |  |
      */
14 |  |
     @Service
15 | 3 |
     public class ConfigService {
16 |  |
17 |  |
       @Autowired
18 |  |
       private ReleaseRepository releaseRepository;
19 |  |
20 |  |
       public Release findRelease(String appId, String clusterName, String namespaceName) {
21 | 2 |
         Release release = releaseRepository.findFirstByAppIdAndClusterNameAndNamespaceNameOrderByIdDesc(
22 |  |
             appId, clusterName, namespaceName);
23 | 2 |
         return release;
24 |  |
       }
25 |  |
     }