上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: if(e instanceof SQLIntegrityConstraintViolationException) { //RunTimeException异常抛出了事务会回滚 throw new BaseRuntimeException("用户不能多重角色,如果需要请联系管理员!"); } els 阅读全文
posted @ 2020-12-17 17:34 动力起点 阅读(556) 评论(0) 推荐(0)
摘要: 1.导入maven <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>0.9.1</version> </dependency> <dependency> <groupId>c 阅读全文
posted @ 2020-12-17 17:15 动力起点 阅读(267) 评论(0) 推荐(0)
摘要: @Slf4j @RefreshScope @Component public class DingUtil { @Value("${ding.token}") private String token; public void sendMsg(String applicationName,Strin 阅读全文
posted @ 2020-12-02 17:22 动力起点 阅读(242) 评论(0) 推荐(0)
摘要: //按照某个字段去重 public static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) { Map<Object, Boolean> seen = new ConcurrentHashMap<>(); 阅读全文
posted @ 2020-11-15 17:00 动力起点 阅读(164) 评论(0) 推荐(0)
摘要: list = list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection( () -> new TreeSet<>(Comparator.comparing(o -> o.getNewsId() + "#" + 阅读全文
posted @ 2020-11-15 16:50 动力起点 阅读(226) 评论(0) 推荐(0)
摘要: SELECT n.pk_id, count( DISTINCT r.user_id ) forwardNum FROM news_info n INNER JOIN news_info_record r ON r.type = 1 AND r.news_id = n.pk_id AND r.data 阅读全文
posted @ 2020-11-11 22:25 动力起点 阅读(2310) 评论(0) 推荐(1)
摘要: package com.huqi.exception; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; i 阅读全文
posted @ 2020-09-07 20:32 动力起点 阅读(6052) 评论(0) 推荐(0)
摘要: 1.添加配置类 package com.huqi.config; import com.alibaba.csp.sentinel.command.handler.ModifyParamFlowRulesCommandHandler; import com.alibaba.csp.sentinel.d 阅读全文
posted @ 2020-09-07 20:31 动力起点 阅读(1293) 评论(0) 推荐(0)
摘要: package org.huqi.demo; import java.io.IOException; import java.util.List; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperEx 阅读全文
posted @ 2020-08-30 13:53 动力起点 阅读(110) 评论(0) 推荐(0)
摘要: 1.导入jar包 <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring</artifactId> <version>1.4.0</version> </dependency> 2.编写配置类 package 阅读全文
posted @ 2020-08-15 21:39 动力起点 阅读(168) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页