| 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 | |
|
| 11 | |
|
| 12 | |
|
| 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 | |
} |