| | |
| | | package com.java110.web.controller; |
| | | |
| | | import com.java110.common.constant.CommonConstant; |
| | | import com.java110.common.exception.SMOException; |
| | | import com.java110.common.factory.ApplicationContextFactory; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.base.controller.BaseController; |
| | |
| | | import com.java110.web.smo.impl.LoginServiceSMOImpl; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | |
| | | responseEntity = (ResponseEntity<String>)cMethod.invoke(componentInstance,pd); |
| | | |
| | | |
| | | }catch (SMOException e){ |
| | | MultiValueMap<String, String> headers = new HttpHeaders(); |
| | | headers.add("code",e.getResult().getCode()); |
| | | responseEntity = new ResponseEntity<>(e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR); |
| | | }catch (Exception e){ |
| | | responseEntity = new ResponseEntity<>("调用组件失败"+e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR); |
| | | responseEntity = new ResponseEntity<>(e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR); |
| | | }finally { |
| | | logger.debug("组件调用返回信息为{}",responseEntity); |
| | | return responseEntity; |