- 博客(65)
- 资源 (16)
- 收藏
- 关注
原创 linux备份mysql
或者 编辑定时任务 vim /var/spool/cron/root。手动启动脚本命令,到当前文件目录,执行./脚本名称.sh。输入crontab -e,开始编辑定时任务。输入:wq 保存退出。
2023-06-26 19:39:12
472
原创 java 连接 ftp和sftp的方式
连接工具可用java 连接ftp的方式FtpConfiguration 配置文件package com.goboo.common.config;import lombok.Data;import org.springframework.boot.context.properties.ConfigurationProperties;import org.springframework.stereotype.Component;/** * @author Administrator.
2022-03-28 10:45:10
3310
原创 java 多线程写入文件处理
# 1. ***多线程的配置文件 AsyncConfiguration*** /** @author lsx @Classname Async## 标题Configuration @Description TODO @Date 2022-03-21 16:39 */@Configuration@EnableAsyncpublic class AsyncConfiguration { @Bean("doExecutor") public Executor doE.
2022-03-28 10:26:22
2724
转载 java 动态定时任务开启
工具类package com.goboo.modules.job.task;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Lazy;import org.springframework.scheduling.Trigger;
2022-03-28 10:18:48
462
原创 java 文件的复制或者删除
源文件夹路径 : D:/upload/目标文件夹路径 : D:/backup/File directory = new File(bdcImportConfig.getSourceDirectory()); if(!directory.exists()){ log.error("目录不存在:{}" + bdcImportConfig.getSourceDirectory()); return; } if
2022-03-21 11:08:27
660
1
原创 java 防抖注解处理
第一步 创建 CurrentLimi注释 @Target(ElementType.METHOD)@Retention(RetentionPolicy.RUNTIME)public @interface CurrentLimit { /** * 请求次数 * @return */ int number(); /** * 时间限制 * * @return */ long time();}第二步
2022-03-18 17:50:49
931
转载 Mysql中怎样创建和使用存储过程
1、什么是存储过程 存储过程,带有逻辑的sql语句2、存储过程特点 1)执行效率非常快!存储过程是在数据库的服务器端执行 2)移植性很差!不同的数据库的存储过程是不能移植的。3、存储过程语法 -- 创建存储过程 DELIMITER $ --声明存储过程的结束符 CREATE PROCEDURE stu_test() --存储过程名称(参数列表) BEGIN --开始 -- 可以写多个sql语句 -- sql语句+流程控制
2022-03-16 16:49:55
1649
原创 java 读取本地json文件
File filePath = new File("D:\\json.json");String input = FileUtils.readFileToString(filePath, "UTF-8"); JSONObject object = JSON.parseObject(input); System.out.println(object);
2021-12-03 16:17:36
484
原创 springBoot 集成nacos、Sentinel
首先引入依赖: springBootVersion = '2.3.0.RELEASE' springCloudVersion = 'Greenwich.SR2' compile 'com.alibaba.boot:nacos-discovery-spring-boot-starter:0.2.4' compile 'com.alibaba.boot:nacos-config-spring-boot-starter:0.2.4'注:springBoot的版本和nacos的版本是要对应的
2021-09-15 10:19:58
622
原创 @JsonSerialize的使用
工具类:public class MySerializerUtils extends JsonSerializer<Integer> { @Override public void serialize(Integer value, JsonGenerator jsonGenerator, SerializerProvider serializers) throws IOException { String statusStr = ""; swit
2021-07-27 15:51:58
742
转载 格式化 “#.00“;“######0.00“ 保留俩位小数
// 数字格式化测试 @Test public void numberFormat (){{ BigDecimal figureOne = BigDecimal.valueOf(0.59354); String format1 = new DecimalFormat("#.0000000").format(figureOne);// log.info(format1);//结果:.5935400 String form...
2021-07-22 17:12:08
1270
原创 mysql 获取分类统计后 获取最早/最迟的第一条数据
【问题】 获取用户最近一次记录的如下表:select min(create_date) create_date From (select project_id,create_date from t where project_id is not null and record_type= 1 and create_date is not null and flag_delete = 0 order by create_date asc ) min group by project_id注:如果想
2021-07-02 09:44:40
1088
原创 mysql根据某个字段切割并分组,在统计
参考博主网址mysql根据某个字段切割并分组,再统计mysql根据某个字段切割并分组,再统计数据库表字段结构类似如下所示:注:此sql不和上面的表结构相对应select pcu.user_name userName, IFNULL(sum(investment_rmb_fee), 0) investmentRmbFee from (SELECT o.investment_rmb_fee, SUBSTRING_INDEX( SUBSTRING_INDEX( pcp.principal_by,
2021-06-28 11:32:48
1654
原创 用EasyExcel将数据写入流、导出工具类,设置样式说明
import com.alibaba.excel.EasyExcel;import com.alibaba.excel.write.metadata.style.WriteCellStyle;import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;import org.apache.poi.ss.usermodel.BorderStyle;import org.apache.poi.ss.usermodel.Horizonta
2021-06-04 16:31:26
3145
转载 Redirecting to /bin/systemctl start mysqld.service Failed to start mysqld.service: Unit not found.
转载https://blog.youkuaiyun.com/weixin_43303530/article/details/103713915
2021-05-19 15:22:25
1382
原创 调用第三方接口的工具类post方式
public JSONObject post(String url, Map<String, Object> params) throws RestClientException { HttpEntity<?> httpEntity = getHttpEntity(params); String body = JSONObject.toJSONString(httpEntity.getBody()); SysServiceLog sys
2021-05-10 11:40:28
338
转载 Spring-boot RestTemplate使用过程中返回结果不是200的异常处理
使用RestTemplate过程中, 如果接口返回的不是200状态,则会抛出异常报错。但在实际接口对接中,可能希望获取接口返回的异常信息做返回。因此可以自定义RestTemplate异常的处理,在使用之前首先添加异常处理,如下:第一种 : restTemplate.setErrorHandler(new ResponseErrorHandler(){ @Override public boolean hasError(ClientHttpResponse
2021-03-19 17:20:36
2097
原创 List集合转换成树结构
//把评论List转成树结构返回给前端 List<CmsComments> buidTree(List<CmsComments> list,Long parentTop){ List<CmsComments> tree=new ArrayList<>(); for(CmsComments CmsComments:list){ if(CmsComments.getParentId() == par.
2021-01-20 15:57:27
221
PowerDesigner.rar
2021-09-08
easypoi jar包.rar
2020-03-11
mycat实战笔记-1.doc
2020-03-07
mycat技术分享 .ppt
2020-03-07
utorrent.rar
2020-03-07
FSCapture.rar
2020-03-07
apache-tomcat-8.0.28.tar.gz
2020-03-06
sqlite-autoconf-3080800.tar.gz
2019-12-20
securcrt.rar
2019-12-19
axurerp8_bdald.rar
2019-12-19
jenkins-2.164.3-1.1.noarch.rpm
2019-12-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人