ITeye博客

e_e的博客

e_e · 共 93 篇文章

[置顶] mysql 读写分离

mysql 读写分离 1. 引入包 <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.5.1</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.32</version> </dependency> 2. yml配置 …

2023-07-18 18:45 · mysql · springboot · 评论(0)

jmeter压测带参数

1.找到jmeter bin目录,双击jmeter.bat文件,打开jmeter 2.创建线程组 3.线程组下面创建request protocol: http Server Name or IP: api-gateway.fat-traefik.vcredi-t.com.local method : get/post path: /api/telemarket/import/calldata/flowImport content encoding : utf-8 body Data: { "productName": "豆金", "productCode": "DQ", "stage": …

2025-05-13 13:52 · java · 评论(0)

vue 导出excel

exportAll() { // 获取当前时间yyyyMMddHHmmss const now = new Date(); const year = now.getFullYear(); const month = String(now.getMonth() + 1).padStart(2, '0'); const day = String(now.getDate()).padStart(2, '0'); const hours = String(now.getHours()).padStart(2, '0'); const minutes = String(now.getMinutes()…

2025-01-15 10:29 · vue · 评论(0)

机构用户查询-扁平化

sql: CREATE TABLE `t_call_user` ( `ID` bigint unsigned NOT NULL COMMENT '主键', `NAME` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '姓名', `USER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户名', `AGENT_NO` varchar(16) CH…

2025-01-13 17:54 · java · mysql · 评论(0)

导出csv并压缩

public byte[] getCSVDataByte(MarketingStatisticsQueryDTO dto, StatisticsFileMark statisticsFileMark) { String fileName = statisticsFileMark.getName() + FILE_END; StopWatch stopWatch = new StopWatch("电销自定义报表导出" + fileName); try { log.info("CSV电销自定义报表导出{},[{}]", fileName, dto); stopWatch.start("参数处理"…

2024-07-30 13:48 · java · 评论(0)

随机数小游戏

import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class LotteryNumberGenerator { private static final int MAX_LEFT = 35; private static final int M…

2024-04-12 18:03 · java · 评论(0)

copilot-乒乓球小游戏

import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PingPongGame extends JPanel { int ballX = 0; int ballY = 0; int paddleX = 0; int caughtBalls = 0; int missedBalls = 0; public PingPongGame() { setPreferredSize(new Dimension(500, 360)); setBackground(Color.WHITE); Timer …

2024-04-12 17:28 · java · AI · 评论(0)

清理系统垃圾文件

创建文件 系统清理.bat,内容如下: @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /…

2023-12-28 17:13 · windows · 评论(0)

AI 给出两个点画一条直线

import numpy as np from matplotlib import pyplot as plt import math x1,y1 = 2,3 x2,y2 = 7,10 # p1,q1 = 4,8 # p2,q2 = 6,3 plt.plot(x1,y1,'ob') plt.plot(x2,y2,'ob') # plt.plot(p1,q1, 'or') # plt.plot(p2,q2, 'or') def get_k(x1,y1,x2,y2): k = (y1-y2)/(x1-x2) return k def get_b(x1,y1,x2,y2): b = (x1*y2-…

2023-11-30 15:58 · AI · 评论(0)

人工智能 python 画正弦图像

登录:https://colab.research.google.com import matplotlib.pyplot as plt import numpy as np x = np.linspace(0,2*np.pi, 100) y = np.sin(x) plt.plot(x,y) plt.xlabel('x') plt.ylabel('y') plt.title('Sin Function') plt.show()

2023-11-30 15:15 · AI · 评论(0)

Lock wait timeout exceeded

错误信息: org.springframework.dao.CannotAcquireLockException: ### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lockwaittimeoutexceeded; try restarting transaction 原因:表的某条记录更增操作可能在另外一个大的事务里被锁,锁的时间超过了数据库指定时间(如下图:innodb_lock_wait_timeout=10秒),导致此处获取不到这条数据…

2023-10-12 14:47 · java · mysql · 评论(0)

vue 展示 json,节点可展开,可收缩

第一步:添加包 yarn add vue-json-viewer 第二步:加入components components: { JsonViewer, }, 第三步:添加div <div v-if="showJson"> <json-viewer :value="jsonData" :expand-depth="3" copyable boxed sort > </json-viewer> </div> 第四步:控制给数据赋值并控制框是否展示 getData() { const params = { id: this.queryForm.id, }; queryId(params).then…

2023-08-28 17:28 · vue · 评论(0)

Unsupported conversion from DATE to java.lang.Long

Unsupported conversion from DATE to java.lang.Long 正解:DATE类型换成LocalDateTime 误解:去掉@Builder标签

2023-08-02 18:12 · java · mysql · springboot · 评论(0)

统计代码行数

import lombok.extern.slf4j.Slf4j; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; @Slf4j @…

2023-07-13 11:06 · java · 评论(0)

配置mysql日志打印

# 配置sql打印日志 mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl logging: level: root: info com.***.telemarket.mapper: trace 引入jar包并配置resources下的logback-spring.xml文件如下 <?xml version="1.0" encoding="UTF-8"?> <configuration> <!--获取podIp--> <conversionRule conversionWord=…

2023-07-12 16:54 · springboot · 评论(0)