增加es异常日志
This commit is contained in:
parent
676c432ded
commit
58ce721674
@ -542,8 +542,10 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
|
||||
goodsWords.setSort(0);
|
||||
goodsWordsService.save(goodsWords);
|
||||
}
|
||||
} catch (MyBatisSystemException e) {
|
||||
} catch (MyBatisSystemException me) {
|
||||
log.error(words + "关键字已存在!");
|
||||
} catch (Exception e) {
|
||||
log.error("关键字入库异常!", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ import cn.lili.modules.store.entity.dos.StoreGoodsLabel;
|
||||
import cn.lili.modules.store.service.StoreGoodsLabelService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -47,6 +48,7 @@ import java.util.Map;
|
||||
@RestController
|
||||
@Api(tags = "ES初始化接口")
|
||||
@RequestMapping("/manager/elasticsearch")
|
||||
@Slf4j
|
||||
public class ElasticsearchController {
|
||||
|
||||
@Autowired
|
||||
@ -133,6 +135,7 @@ public class ElasticsearchController {
|
||||
} catch (Exception e) {
|
||||
cache.put(CachePrefix.INIT_INDEX_PROCESS.getPrefix(), null);
|
||||
cache.put(CachePrefix.INIT_INDEX_FLAG.getPrefix(), false);
|
||||
log.error("初始化索引异常", e);
|
||||
}
|
||||
});
|
||||
return ResultUtil.success();
|
||||
|
Loading…
x
Reference in New Issue
Block a user