xufenglei
2018-05-14 c0d88c1f82394c0374d2d592f4d2bca951d6334e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.moral.controller;
 
import com.moral.common.bean.ResultBean;
import com.moral.entity.Profession;
import com.moral.service.ProfessionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.List;
 
@RestController
@RequestMapping("profession")
public class ProfessionController {
      @Resource
      ProfessionService professionService;
      @GetMapping(value = "getall")
     public ResultBean<List<Profession>> getALL(){
          return  new ResultBean<>(professionService.getProfessiontList());
      }
}