- 博客(34)
- 收藏
- 关注
原创 java常用正则表达式
4、这表示一个0或者一个可能为负的开头不为0的数字.让用户以0开头好了.把负号的也去掉,因为钱总不能是负的吧。8、1到3个数字,后面跟着任意个 逗号+3个数字,逗号成为可选,而不是必须:^([0-9]+|[0-9]{1,3}(,[0-9]{3})2、这表示任意一个不以0开头的数字,但是,这也意味着一个字符"0"不通过,所以我们采用下面的形式:^(0|[1-9][0-9]){1,3}$ 或 ^+?[1-9][0-9]下面我们该考虑数字中的逗号了。$ 或 ^-[1-9]\d。一、校验数字的表达式。
2023-03-31 18:44:10
1310
原创 Disconnected from the target VM, address: ‘127.0.0.1:62414‘, transport: ‘socket‘解决方式
Disconnected from the target VM, address: '127.0.0.1:62414', transport: 'socket'
2023-03-05 12:17:39
2371
原创 mysql数据库存储过程与函数
mysql数据库存储过程与函数存储过程create procedure batchInstert(in args int)begindeclare i int default 1;start transaction;while i <= args doinsert into car(carId,carName) value (i,concat("微笑着面对它-",i));set i=i+1;end while;commit;end运行语句call batchInster
2022-05-28 10:34:21
268
原创 CountDownLatch 线程计数器
CountDownLatch 线程计数器public static void main(String[] args) throws InterruptedException { int count = 5; //线程计数器 CountDownLatch countDownLatch = new CountDownLatch(count); for (int i = 0; i < count; i++) { lon
2022-05-10 22:56:30
182
原创 ThreadPoolExecutor 手动创建线程池
ThreadPoolExecutor 手动创建线程池ThreadPoolExecutor 手动创建线程池ThreadPoolExecutor:最原始的创建线程池的方式ThreadPoolExecutor 最多可以设置 7 个参数:7 个参数代表的含义如下:corePoolSize:核心线程数,线程池中始终存活的线程数。maximumPoolSize:最大线程数,线程池中允许的最大线程数,当线程池的任务队列满了之后可以创建的最大线程数。keepAliveTime:最大线程数
2022-05-10 22:42:09
5494
原创 初识java多线程
初识多线程线程创建方式继承Thread类重写run()方法,调用start开启线程实现Runnable接口重写run方法,执行线程需要丢入runnable接口实现类,调用start方法实现Callable接口可以定义返回值,可以抛出异常,结合线程池使用线程状态线程池线程池的优点:1.复用线程:不必频繁创建销毁线程2.也提供了任务队列和拒绝策略1.Executors 创建线程池(六种)Executors.newFixedThreadPool:创建一个固定大小的线程池,
2022-05-10 21:05:23
200
转载 Spring Security
转载自:https://shimo.im/docs/vpHYCRCtDgPxqtwH/read 感谢军哥核心功能认证(身份校验,你是谁),授权(你能干什么),攻击防护(防止伪造身份)认证过程:核心组件SecurityContextHolder类SecurityContextHolder 是最基本的对象,它负责存储当前安全上下文信息。即保存着当前用户是什么,是否已经通过认证,拥有哪些权限。。。等等。SecurityContextHolder默认使用ThreadLocal策略来存
2021-11-08 16:41:41
152
原创 springboot整合Mybatisplus+数据源配置
1.引入相关jar包<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> <version>8.0.27</version></dependency><dependency> .
2021-11-04 11:12:34
195
原创 解析html中的内容并已id赋值
解析html中的内容并已id赋值//策略模式@Resource private ApplicationContext applicationContext;@Override public String fillingHTMLStr(String file, Map<String,Object> map) throws Exception { org.jsoup.nodes.Document doc = Jsoup.connect(file).get().
2021-07-08 16:47:55
703
原创 springboot分开配置application
spring: # 环境 dev:开发环境|test:测试环境|pro:生产环境 profiles: active: '@profiles.active@' #激活配置文件pom配置 <profiles> <profile> <id>dev</id> <properties> <!-- 环境标识,需要与配置文件的名称相对应 --> <profiles.act
2021-07-06 11:04:25
165
原创 通过地址获取文件
通过地址获取文件远程服务器上的文件地址public static byte[] urlTobyte(String url) throws MalformedURLException { URL ur = new URL(url); BufferedInputStream in = null; ByteArrayOutputStream out = null; try { in = new BufferedInputStream(ur.o
2021-07-05 14:12:47
270
原创 PDF转换工具类(byte[]转PDF并生成文件)
PDF转换工具类(byte[]转PDF并生成文件)对html转为标准的xhtml public byte[] transferHtml2XHtml(byte[] html) { Tidy tidy = new Tidy(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); tidy.setQuiet(true); tidy.setInputEncoding("utf-8"); tidy.
2021-07-05 10:42:14
3331
原创 springboot打包找不到maven中的实体jar包
springboot打包找不到maven中的实体jar包解决方案在resources下创建一个lib包,将打好的jar包放入例:需在pom中引入打的实体jar包地址<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>项目名</artifactId> <version
2021-03-08 16:57:06
319
原创 使用idea将springboot项目打jar包,并放入另一个项目中调用
springboot项目打jar包,并放入另一个项目中调用更换plugin,原来使用的是springboot的打包插件,这里改成maven插件<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-b
2021-02-24 11:32:17
891
原创 java 图片转pdf
java图片转pdf加入配置包 <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> <version>1.7.1</version> </dependency> <dependency
2021-02-03 18:42:53
271
2
原创 项目创建公用枚举
枚举样例package com.test.utils;public enum SystemEnum { ABC("1","ABC"), DEF("2","DEF"); private String code; private String message; SystemEnum(String code, String message) { this.code = code; this.message = message
2021-02-03 18:31:42
118
原创 定时任务
启动类package com.sixnoble.modules.evaluation.comment.service;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Configuration;import org.springframework.scheduling.annotation.EnableScheduling;impo
2020-11-03 18:51:54
216
1
原创 mongodb增删改查
mongodb增删改查 /** * 插入数据 * @param bzEvaluationReportSummary */ public void insert(BzEvaluationReportSummary bzEvaluationReportSummary){ if(bzEvaluationReportSummary.getEvaluationReportId() == null){ bzEvaluationRepo
2020-10-28 11:08:11
80
原创 jeesite框架二级联动最全代码
jeesite框架页面二级联动<div class="row"> <div class="col-xs-6"> <div class="form-group"> <label class="control-label col-sm-4" title="${text('监控内容')}">${text('监控内容')}:<i class="fa icon-question"></i></labe
2020-09-10 19:16:19
573
原创 数据库更改表或字段编码格式脚本
更改表编码格式alter table 表名 default character set utf8mb4 collate=utf8mb4_0900_ai_ci;更改字段编码格式ALTER TABLE js_sys_office convert to CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
2020-09-09 20:00:17
212
原创 mysql数据库当中 表新增字段脚本
添加varcher类型ALTER TABLE 表名 ADD 字段名 varchar(32);不允许为空ALTER TABLE 表名 ADD 字段名 varchar(32) NOT NULL;double类型ALTER TABLE 表名 ADD 字段名 DOUBLE(10,2);
2020-09-09 19:56:31
881
原创 前台动态判断
前台动态判断<div class="row"> <div class="col-xs-6"> <div class="form-group"> <label class="control-label col-sm-4" title=""> <span class="required ">*</span> ${text('发送方式')}:<i class="fa icon-que
2020-09-04 10:05:27
126
原创 mysql数据库表更改编码格式sql
alter table js_sys_office default character set utf8mb4 collate=utf8mb4_0900_ai_ci;ALTER TABLE js_sys_office convert to CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;utf8mb4_general_ci //无用编码格式
2020-09-01 18:25:44
198
原创 java实用小技巧
实用小技巧1.返回上一层页面<a class="btn btn-default" onclick="window.history.back(-1);" >上一步</a>页面小技巧location.history.gohttps://blog.youkuaiyun.com/hao1993015/article/details/811278242.判难内容当中的值是否大于0if (bzEvaluationTemplate_image.size()>0){ bzEva
2020-09-01 18:11:32
213
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人