sample.controller.PermissionController Maven / Gradle / Ivy
The newest version!
package sample.controller;
import com.envision.annotation.MarsApiController;
import com.envision.annotation.Processor;
import com.envision.core.MarsController;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import sample.domain.Permission;
import sample.model.RequestPermission;
import java.util.List;
/**
* @author qiweishi
* @date 2018/3/22
*/
@MarsApiController("actor")
@Processor("simple.processor.PermissionProcessor")
public class PermissionController extends MarsController {
@RequestMapping
public ResponseEntity> permission(RequestPermission requestPermission) {
try {
return super.handle(requestPermission);
} catch (Exception e) {
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
}