Demo entry 5994561

java

   

Submitted by anonymous on Sep 14, 2016 at 08:28
Language: Java. Code size: 1.0 kB.

@Controller
@RequestMapping("/hello")
public class HelloController {
    
    @Resource
    private PromotionService promotionService;
    
    /**
    * [日志记录]
    */
    private static CustomizedLogger logger = CustomizedLoggerFactory.getLogger(HelloController.class);
    
    
    /**
     * Description: 电商下单前数据校验<br>
     * 1、…<br>
     * 2、…<br>
     * Implement: <br>
     * 1、…<br>
     * 2、…<br>
     * 
     * @param promotionParamInfo
     * @return 
     * @see 
     */
    @RequestMapping(value = "/", method = RequestMethod.GET)
    public @ResponseBody PromotionReturnInfo checkService() {
        PromotionReturnInfo promotionReturnInfo  = new PromotionReturnInfo();
        promotionReturnInfo.setCode(PromotionErrorCode.SUCCESS.getCode());
        promotionReturnInfo.setMessage(PromotionErrorCode.SUCCESS.getName());
        promotionReturnInfo.setMessageDetail("服务运行正常");
        logger.info(JsonUtils.getInstance().toJson(promotionReturnInfo));
        return promotionReturnInfo;
    }  
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).