1. 创建Dockerfile文件FROM openjdk:8-jdk-alpine VOLUME /tmp ADD eureka-server-0.0.1-SNAPSHOT.jar app.jar RUN sh -c 'touch /app.jar' RUN echo "Asia/Shanghai" > /etc/timezone ENV JAVA_OPTS=&q...
1. docker设置开机自启systemctl enable docker.service2. docker容器设置开机自启2.1 新建容器时配置自启参数docker run --restart=always 容器id 或 容器名称2.2 已存在的容器配置自启docker update --restart=always 容器id 或 容器名称2.3 批量设置容器自启docker updat...
1. 问题centos与2021年底已经停止服务 在默认镜像中使用 yum 安装软件的时候会提示Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist2. 解决2.1 进入yum的repos目录cd /etc/yum.r...
1. 问题半个月前我在异地调试老家里的软路由想扩容 / 根目录容量然后挂载分区链接之后忘记取消路径链接了不小心输入了命令直接等同于系统炸了 但是网络等其他的服务都暂无异常 我深知自己干了什么哈哈只要老家里断电就断网 因为有人在租我的私人服务器所以我一定不能让网络出问题在昨天我就回家 等他们有时间了 晚上十一点开始重装软路由的系统我拿出笔记本后发现 我忘记带键盘了!! 我没键盘咋重装啊还好软路...
1. 问题在开发项目时,有些jar包是非maven 仓库的第三方jar 包,比如公司内部的SDK或者第三方平台的SDK 等等。在项目开发时,可以通过IDEA的 add as library添加 但是如果使用maven打包项目的时候会提示找不到xxxxx2. 解决 <dependency> <groupId>com.wanlingy...
1. 问题有个功能需要调用一个传输文件的api,使用FileSystemResource进行传输,在调用api之前使用JSONObject.toJSONString()输出一下log之后 发现每次输出log之后本地文件就会变成0KB2. 分析FileSystemResource 是spring封装的类,其实现了WritableResource接口public class FileSystem...
1. 前言由于业务变动 PDF报告分析的人口学问题需要变动为了不修改原代码结构的前提下 需要用SQL直接返回PO类 FinishCountPo/** * Created by matioyoshitoki on 2019/6/10. */ public class FinishCountPo { private String tag; private String per...
1. 问题在使用Robot来模拟键盘事件时,启动报错java.awt.AWTException: headless environment at java.awt.Robot.<init>(Robot.java:91) at ro.qwq.script.utils.RobotUtil.aut_mobs(RobotUtil.java:18) at ro.qw...
1. 问题由于以前开发人员开发websocket相关模块的时候 继承了 WebSocketConfigurer 类, 重写了该类下面的 configureMessageConverters()方法 作用是解决响应头的content-type为UTF-8接下来看代码public class WebSocketConfig extends WebMvcConfigurerAdapter impl...
1. 问题今天发现以前写的 toString() 快捷生成方法 遇到了个问题就是 属性如果是 boolean 类型的时候 他依旧使用getXXX();导致方法变红 因为快捷键生成boolean类型的 get set 方法 名称为 isXXX(); 并非 getXXX();2. 解决public java.lang.String toString() { return new org.apac...