![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
Xu_Yang.
这个作者很懒,什么都没留下…
展开
-
JAVA-企业微信报警工具类
企业微信报警工具类,可用于项目内告警信息通知。原创 2023-02-21 11:05:18 · 443 阅读 · 0 评论 -
java下载网络文件
import java.net.HttpURLConnection;import java.net.URL;private void readNetFile(String fileUrl) { // fileUrl为http或https链接 InputStream inputStream = null; HttpURLConnection conn = null; URL url; try { url = ne原创 2022-03-24 09:28:45 · 2541 阅读 · 0 评论 -
linux启动jar包指定最大内存
nohup java -jar -Xms128m -Xmx512m -XX:PermSize=128M -XX:MaxPermSize=512M XXX.jar & Xms — 堆内存初始大小Xmx — 堆内存最大值PermSize — 永久内存初始大小MaxPermSize — 永久内存最大值原创 2022-01-21 09:27:23 · 4870 阅读 · 0 评论 -
SpringBoot通过AOP实现自定义注解验证Token
本文有点长,请耐心看完,重点都会有注释。该方法采用元注解+AOP方式进行编写。首先引入AOP(必要)依赖及JSON解析依赖(非必要) <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.67</version> </dependency> <原创 2021-06-22 16:55:13 · 1342 阅读 · 0 评论 -
.bat启动windows中.exe应用
年后上班第一天,开机后需要打开很多软件,就想搞一个一键启动软件,不用点那么多图标解释及使用步骤:在start后的引号是用来打开路径中带有空格的软件如第三行和第四行这种路径。但如第一种的去掉引号却会直接打开cmd窗口,却不启动应用。目前这种是直接可以用的直接创建txt文档,复制-粘贴-修改txt后缀为bat。双击即可@echo offstart "" "D:\WeChat\WeChat.exe"start "" "D:\JetBrains\IntelliJ IDEA 2019.1\bin\i原创 2021-02-19 15:49:15 · 3225 阅读 · 0 评论 -
SpringBoot配置跨域请求
import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.CorsConfiguration;import org.springframework.web.cors.UrlBasedCorsConfigurationSource;import org.springf.原创 2021-02-05 16:49:10 · 172 阅读 · 0 评论 -
JAVA十进制转二进制
String result = Integer.toBinaryString(16);记录一下,方便以后调阅原创 2021-01-15 17:33:05 · 1231 阅读 · 0 评论 -
查看端口PID及结束进程
根据端口号查看Pidnetstat -aon | findstr 1078根据pid结束进程taskkill /pid 2516 -f原创 2021-01-12 14:15:12 · 234 阅读 · 1 评论 -
@DateTimeFormat 接收不到时分秒,转换时报类型异常
报错信息如下 nopaexpiretimeFailed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'nopaexpiretime'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type原创 2020-12-23 14:56:47 · 2953 阅读 · 0 评论 -
mybatis 传参list批量update时出错
业务需求中 需要批量修改数据 数量在60条左右。报错是 语法错误原sql,update传参使用list<update id="updateList" parameterType="java.util.List"> <foreach collection="list" item="item" index="index" open="" close="" separator=";"> UPDATE febs_base.xfjc_setting原创 2020-11-30 17:46:30 · 1532 阅读 · 0 评论 -
JRS-303用法
项目中用到数据校验了,网上搜了些资料,整理下 方便自己查阅JRS-303 是做数据校验的导入依赖<!--JSR-303数据校验开始--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <原创 2020-09-07 13:43:40 · 466 阅读 · 0 评论 -
BigDecimal运算
记录一下 供以后查阅使用BigDecimal bignum1 = new BigDecimal(“10”);BigDecimal bignum2 = new BigDecimal(“5”);BigDecimal bignum3 = null;//加法bignum3 = bignum1.add(bignum2);System.out.println(“和 是:” + bignum3);//减法bignum3 = bignum1.subtract(bignum2);System.out.pr原创 2020-08-13 15:54:08 · 426 阅读 · 0 评论 -
上传文件及删除本地文件utils
记录工作中所用。配置信息file.uploadImageFolder=D:/upload/images/file.uploadFile=D:/upload/file/file.uploadContractTemplateFile=D:/upload/templatefile/spring.servlet.multipart.enabled=truespring.servlet.multipart.max-file-size=5MBspring.servlet.multipart.max-re原创 2020-08-06 13:20:14 · 1549 阅读 · 0 评论