自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 java 将一段内容写成文件形式

String certFileContent = "" + "-----BEGIN CERTIFICATE-----\n" + 地方的付付过过过过或或或或+ "-----END CERTIFICATE-----";String cerStr ="/cert/"+userName+".cer";FileUtils.write(new File(cerStr), certFileContent, StandardCharsets.UTF

2023-05-24 15:06:53 90

原创 网络文件转流

URL url = new URL(urls);HttpURLConnection conn = (HttpURLConnection) url.openConnection();conn.setRequestMethod("GET");conn.setConnectTimeout(5 * 1000);if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) { InputStream inputStream = conn.getIn

2023-05-24 14:57:13 120

原创 Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded dataso

springBoot 报错“Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.”原因是缺少配置参数

2020-12-08 10:19:17 120

原创 多域名访问同一个项目

<Host name="www.xxxx.com" appBase="webapps" unpackWARs="false" autoDeploy="true"> <Alias>www.xxxx.com</Alias> <Alias>xxxx.com</Alias> <!-- 设置默认项目名称 --> <Context path="" docBase="ProjectName" reloadable="true" /> &l

2020-10-29 11:03:51 209

原创 linux 下日志分割

按照字节大小进行分割split -b 2m mgr-0815.log -d newfile_ --verbose![以每个文件2mb分割,]

2020-08-15 18:08:48 144

原创 MySQL 自连接 update

UPDATE `user` AS uINNER JOIN ( SELECT id FROM `user` ) AS u1ON u.id = u1.id SET u.parent_id = u1.id WHERE u.parent_id = 0;

2020-08-01 16:14:53 642

原创 linux下安装字体

一、我们需要先安装相关的软件包。yum install -y fontconfig mkfontscale找到window下的字体把MSYH.TTF复制到/usr/share/fonts/目录下然后建立字体索引信息,更新字体缓存,使用如下命令:cd /usr/share/fonts/mkfontscalemkfontdirfc-cache字体已经安装完毕。现在我们再来查看微软雅黑字体,是否安装成功,使用如下命令:fc-list :lang=z...

2020-07-10 16:34:57 721

原创 生成的图片黑色底

用这个会显示黑色底BufferedImage bufferedImage = new BufferedImage(x, y, BufferedImage.TYPE_INT_RGB);改成下面:BufferedImage bufferedImage = new BufferedImage(x, y, BufferedImage.TYPE_4BYTE_ABGR);

2020-07-06 16:31:30 300

原创 junit所需jar

junit所需要的jar包hamcrest-core-1.1.jarjunit-4.12.jarhttps://mvnrepository.com/artifact/org.hamcrest/hamcrest-corehttps://mvnrepository.com/artifact/junit/junit

2020-06-29 14:17:25 326

原创 nginx 清理日志

1、删除日志2、执行 ./nginx -s reopen 调用nginx -s reopen用来打开日志文件

2020-01-03 11:58:29 1568

原创 java main验签成功 放在程序中验签失败

调用第三方支付 验签一直失败如果有中文并且第三方支付的加密解密程序中用到了str.getBytes() 方法 就和tomcat运行环境的编码有关了。如果用的是 str.getBytes(charsetName) 方法就与运行环境无关了。改成一下方式 直接验签通过...

2019-07-27 18:03:57 735 1

原创 服务报错500 Internal Server Error

只要上传图片就失败 找了好久 才发现原来是nginx 所在服务器磁盘满了 ,nginx 日志太大了 占满磁盘解决方法如下:删除日志 然后重新加载配置文件./nginx -s reopen完美解决...

2019-07-23 09:36:07 500

原创 tomcat 启动 java.io.StreamCorruptedException: invalid type code: 3F

 org.apache.catalina.session.StandardManager doLoadSEVERE: IOException while loading persisted sessions: java.io.StreamCorruptedException: invalid type code: 3Fjava.io.StreamCorruptedException: inva...

2018-12-24 16:03:57 1188

原创 tomcat 启动很卡

很多人肯定都用tomcat容器来启动项目,但可能有些时候启动时间特别长,甚至达到了几万毫秒至几十万毫秒,下面提供一种优化方式:1、找到jdk的这个文件22、打开文件 将 securerandom.source=file:/dev/random 替换成下面的3、重启tomcat ...

2018-09-30 15:03:37 673

原创 Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

/js/plug/ueditor/jsp/controller.jsp?action=uploadvideo&amp;encode=utf-8 Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)本地测试没问题 放服务器上之后报错 原因:用了ngin...

2018-09-10 19:59:18 308

原创 在IntelliJ IDEA中配置maven

打开-File-Settings 创建maven项目成功的标识

2017-02-17 11:27:57 269

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除