package com.mooctest.crowd.domain.controller; import com.mooctest.crowd.domain.constants.ResponseConstant; import com.mooctest.crowd.domain.data.ResponseMessage; import com.mooctest.crowd.domain.data.dto.IndexDTO; import com.mooctest.crowd.domain.service.CommonService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; /** * @Author: xuexb * @Date: 2019.7.22 16:51 */ @RestController public class CommonController { @Autowired private CommonService commonService; @RequestMapping(value = "/index", method = RequestMethod.GET) public ResponseMessage index(){ return new ResponseMessage<>(ResponseConstant.OK, ResponseConstant.REQUEST_SUCCESS, commonService.getIndexInfo()); } }