遇到一个很奇怪的问题,一段代码执行完了之后,他自己又回过头执行一遍。 有人遇到类似问题么?
注: 没有循环语句,也没有重复调用

解决方案 »

  1.   

    private void saveUserInfo(XxxRegisterRequest request, String loginName, String userName, String customerId) throws BusinessException {
            try {
                XxxCustomerRelationEntity entity = XXXService.findByMobileNo(request.getPhoneNo());
                if (entity != null) {
                    log.info("手机注册数量超限!");
                    throw new Exception;
                } else {
                    entity = new XxxCustomerRelationEntity();
                    entity.setId(Tools.getUUID());
                    entity.setCustomerId(customerId);
                    entity.setUserName(userName);
                    entity.setSsoSessionId(SecurityUtil.encrypt_SHA256(loginName+request.getUserPwd()));
                    entity.setRegIp(request.getIp());
                    entity.setRegTime(new Date());
                    entity.setMobileNo(request.getPhoneNo());
                    entity.setLoginName(loginName);
                    xxxService.save(entity);
                }
            } catch (Exception e) {
                log.info("关联本地表失败");
                throw new BusinessException(ErrorConstants.XXX_DEV_ERROR_CODE, ErrorConstants.XXX_DEV_ERROR_MSG);
            }
        }
      

  2.   

       从try开始执行完了, 然后又回到try又执行一遍~~
      

  3.   

    会不会debug?很可能是你的代码请求了两次