Preview:
    @Override
    public List<HumanAgent> findByBotIdAndStatus(String botId, String status) {
        List<HumanAgent> humanAgents = new ArrayList<>();
        try {
            Query query = new Query().addCriteria(Criteria.where("bot_id").is(botId))
                    .addCriteria(Criteria.where("status").is(status));
            humanAgents = mongoTemplate.find(query, HumanAgent.class);
            log.info("find HumanAgent by botId {}, status {},  have size {}",
                    botId, status, humanAgents.size());
        }catch (Exception ex){
            log.error("ERROR {}", ExceptionUtils.getStackTrace(ex));
        }
        return humanAgents;
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter