##### Coverage Report - com.ctrip.apollo.portal.controller.EnvController

Classes in this File | Line Coverage | Branch Coverage | Complexity
EnvController |
50% | 1/2
N/A | N/A
| 1.0;1

1 |  |
     package com.ctrip.apollo.portal.controller;
2 |  |
3 |  |
     import com.ctrip.apollo.core.enums.Env;
4 |  |
     import com.ctrip.apollo.portal.PortalSettings;
5 |  |
6 |  |
     import org.springframework.beans.factory.annotation.Autowired;
7 |  |
     import org.springframework.web.bind.annotation.RequestMapping;
8 |  |
     import org.springframework.web.bind.annotation.RequestMethod;
9 |  |
     import org.springframework.web.bind.annotation.RestController;
10 |  |
11 |  |
     import java.util.List;
12 |  |
13 |  |
     @RestController
14 |  |
     @RequestMapping("/envs")
15 | 1 |
     public class EnvController {
16 |  |
17 |  |
       @Autowired
18 |  |
       private PortalSettings portalSettings;
19 |  |
20 |  |
       @RequestMapping(value = "", method = RequestMethod.GET)
21 |  |
       public List<Env> envs(){
22 | 0 |
         return portalSettings.getEnvs();
23 |  |
       }
24 |  |
25 |  |
     }