![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
qq_34716528
adsf
展开
-
Mybatis数据库连接报错:对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾
Mybatis数据库连接报错:对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾一、问题描述Java代码 Exception in thread "main" org.mybatis.generator.exception.XMLParserException: XML Parser Error on line 17: 对实体 "characterEnc...转载 2018-11-14 17:51:23 · 236 阅读 · 0 评论 -
自定义字段验证
1.定义@interfacepackage com.jwt.jwt.inter;import javax.validation.Constraint;import javax.validation.Payload;import java.lang.annotation.Documented;import java.lang.annotation.Retention;import j...原创 2019-07-19 10:08:31 · 158 阅读 · 0 评论 -
curator操作zookeeper
<dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-framework</artifactId> <version>2.11.0</version> ...原创 2019-06-03 11:49:31 · 81 阅读 · 0 评论 -
curator实现分布式锁
转https://blog.csdn.net/liyiming2017/article/details/83896169 [转自](https://blog.csdn.net/liyiming2017/article/details/83896169)目录:zookeeper介绍与核心概念 安装和使用 ZooKeeper分布式锁实现 Zo...转载 2019-06-06 11:02:32 · 391 阅读 · 0 评论 -
java序列化&反序列化
public static void seria(){ try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File("person"))); Person person = new Person(); ...原创 2019-05-28 15:30:44 · 75 阅读 · 0 评论 -
java8根据两个字段排序(一正序一倒叙)
List<Student> collect2 = list.stream() .sorted(Comparator.comparing(Student::getAge).reversed().thenComparing(Student::getScore)) .collect(Collectors.toList());原创 2019-04-24 16:39:21 · 12993 阅读 · 0 评论 -
搭建Maven私服
https://blog.csdn.net/sdksdk0/article/details/52190619转载 2019-04-18 14:55:52 · 66 阅读 · 0 评论 -
mvn控制不同的发布环境
项目目录pom配置在主pom中添加 <profiles> <profile> <id>dev</id> <properties> <profiles.active>dev</profiles.activ...原创 2019-04-18 11:02:15 · 137 阅读 · 0 评论 -
mvn插件
spotbugs 代码检查 <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> <vers...原创 2019-04-17 17:32:18 · 194 阅读 · 0 评论 -
java 对文件内容进行替换工作
读取文件代码如下: File file = new File("C:/Users/Administrator/Desktop/test1.json"); try { String content = FileUtils.readFileToString(file, "utf-8"); System...转载 2019-01-23 10:38:02 · 744 阅读 · 0 评论 -
使用多线程处理逻辑
@GetMapping("/order")public Callable order(){Callable callable = new Callable() {@Overridepublic UserTest call() throws Exception {logger.info(“副线程开始”);Thread.sleep(1000);UserTest usr = new Use...原创 2019-01-23 10:10:32 · 259 阅读 · 0 评论 -
获取()内的字符串
获取()内的字符串 Pattern pattern = Pattern.compile("(?<=\\()(.+?)(?=\\))"); Matcher matcher = pattern.matcher(匹配的内容); while(matcher.find()){ 字符串= matcher.group(); }...原创 2018-12-21 13:16:15 · 222 阅读 · 0 评论 -
关于org.apache.http包中的HttpClient报错问题
转:https://blog.csdn.net/u014740342/article/details/53057200 在前一段时间工作中接触到了HttpClient,之前都没听过,也就不知道怎么使用,是同事帮忙把相关的内容写出来,我才知道怎么使用能实现从网站中拿到想要的数据。 &nbs...转载 2019-07-26 15:09:10 · 1083 阅读 · 1 评论