随笔分类 -  JAVA

1 2 3 4 5 ··· 16 下一页
JAVA
摘要:Java LoadBalanceUtil 负载均衡、轮询加权 https://www.cnblogs.com/vipsoft/p/19728820 Java - 加权随机算法--Demo: https://www.cnblogs.com/vipsoft/p/19741845 示例 VideoInfo 阅读全文
posted @ 2026-03-20 10:20 VipSoft 阅读(7) 评论(0) 推荐(0)
摘要:Java LoadBalanceUtil 负载均衡、轮询加权 https://www.cnblogs.com/vipsoft/p/19728820 Java - 加权随机算法 - 示例:https://www.cnblogs.com/vipsoft/p/19742349 A 权重 1 、B 权重 2 阅读全文
posted @ 2026-03-20 08:24 VipSoft 阅读(7) 评论(0) 推荐(0)
摘要:权重随机算法:https://www.cnblogs.com/vipsoft/p/19741845 负载均衡、轮询加权 LoadBalanceUtil @Component public class LoadBalanceUtil { private List<Node> nodes; /** * 阅读全文
posted @ 2026-03-17 11:59 VipSoft 阅读(4) 评论(0) 推荐(0)
摘要:在Java生态中,获取IP地域信息主要有以下几种方案: 方案优点缺点适用场景IP2Region离线查询,速度快,免费数据更新需要下载新库高并发,离线环境MaxMind GeoIP2数据准确,功能丰富商业版收费,需要更新数据库商业应用,需要精确数据在线API服务无需维护数据库,使用简单依赖网络,有速率 阅读全文
posted @ 2026-03-10 17:15 VipSoft 阅读(30) 评论(0) 推荐(0)
摘要:SpringBoot Scheduled 常见用法: https://www.cnblogs.com/vipsoft/p/15751660.html import cn.hutool.core.date.DateUtil; import org.slf4j.Logger; import org.sl 阅读全文
posted @ 2026-01-08 08:54 VipSoft 阅读(61) 评论(0) 推荐(0)
摘要:Java 部署脚本 Java Sprintboot jar 项目启动、停止脚本:https://www.cnblogs.com/vipsoft/p/15952112.html SpringBoot 不同的环境,打不同的包名: https://www.cnblogs.com/vipsoft/p/185 阅读全文
posted @ 2026-01-04 17:14 VipSoft 阅读(53) 评论(0) 推荐(0)
摘要:MySQL 统计每个时间段的数量:https://www.cnblogs.com/vipsoft/p/19195343 在Mybatis中不建实体类,可以通过以下几种方式返回数据给前端: Mapper接口 public interface VipSoftOrderMapper { List<Map< 阅读全文
posted @ 2025-11-06 09:51 VipSoft 阅读(21) 评论(0) 推荐(0)
摘要:Webservice 调用带用户名密码的接口 ,CXF中 the namespace on the "definitions" element, is not a valid SOAP version报错!:https://www.cnblogs.com/vipsoft/p/19135628 CXF 阅读全文
posted @ 2025-10-23 15:05 VipSoft 阅读(20) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/vipsoft/p/17272728.html org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [SftpPool [max 阅读全文
posted @ 2025-10-20 12:38 VipSoft 阅读(23) 评论(0) 推荐(0)
摘要:CXF中 the namespace on the "definitions" element, is not a valid SOAP version报错! 阅读全文
posted @ 2025-10-11 17:40 VipSoft 阅读(21) 评论(0) 推荐(0)
摘要:String str="A\n" + "B\n" + "C"; 在Java中,有多种方式可以一行一行地读取文本。以下是几种常用的方法: 1. 使用 BufferedReader + FileReader String str = "A\n" + "B\n" + "C"; // 方法1:从字符串读取 阅读全文
posted @ 2025-09-30 15:34 VipSoft 阅读(295) 评论(0) 推荐(0)
摘要:设计一个问卷调查数据库时,需要考虑以下几个关键要素:问卷、问题、选项、用户回答等。以下是一个基本的数据库设计方案,使用关系型数据库(如MySQL、PostgreSQL)来实现。 1. 数据库表设计 1.1 问卷表 (surveys) 存储问卷的基本信息。 字段名 数据类型 描述 survey_id 阅读全文
posted @ 2025-09-08 16:40 VipSoft 阅读(216) 评论(0) 推荐(0)
摘要:目录Spring Boot 的配置加载顺序规则1. 格式优先级高于Profile2. 配置加载顺序配置方案参数形式使用配置文件(推荐,最清晰、最易维护)使用Shell脚本或Batch文件(Windows批处理)使用环境变量最佳实践建议 Spring Boot 的配置加载顺序规则 Spring Boo 阅读全文
posted @ 2025-08-22 10:12 VipSoft 阅读(559) 评论(2) 推荐(0)
摘要:# # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 2476656 bytes fo 阅读全文
posted @ 2025-07-18 12:20 VipSoft 阅读(101) 评论(0) 推荐(0)
摘要:weixin-java-miniapp 中的 commons-io 版本过低 cn.idev.excel.exception.ExcelGenerateException: java.lang.NoSuchMethodError: org.apache.commons.io.output.Unsyn 阅读全文
posted @ 2025-06-27 21:22 VipSoft 阅读(171) 评论(0) 推荐(0)
摘要:无实体对象,构建返回 List HomeMapper.xml 返回 Map <select id="getSummary" resultType="java.util.Map"> SELECT 'orgCount' AS name, count(1) as value FROM sys_organi 阅读全文
posted @ 2025-06-26 09:26 VipSoft 阅读(49) 评论(0) 推荐(0)
摘要:确保小程序抽奖概率准确性的方案 在小程序中实现抽奖功能并确保概率准确性,需要从前后端多个方面进行设计和控制。以下是完整的解决方案: 1. 核心原则 必须由服务端计算抽奖结果,前端只负责展示动画效果,不能参与实际抽奖逻辑计算。 2. 后端实现方案 2.1 概率控制算法(Java示例) @RestCon 阅读全文
posted @ 2025-06-11 22:07 VipSoft 阅读(302) 评论(0) 推荐(0)
摘要:使用别名算法(Alias Method)实现抽奖 别名算法是一种高效的概率抽样算法,特别适合处理具有不同概率的离散事件。下面我将基于你提供的奖品数据,实现一个完整的别名算法抽奖方案。 1. 别名算法实现 import java.util.*; public class AliasMethod { p 阅读全文
posted @ 2025-06-11 21:29 VipSoft 阅读(157) 评论(0) 推荐(0)
摘要:在 Java 生态中,除了 Guava 的 RateLimiter,还有多种限流方案可供选择。以下是几种常见的替代方案: 1. Spring Cloud Gateway / Spring Cloud Alibaba Sentinel 适用于: Spring Cloud 微服务架构 // 在Sprin 阅读全文
posted @ 2025-06-06 13:14 VipSoft 阅读(157) 评论(0) 推荐(0)
摘要:ava后台实现微信小程序不同人员生成不同小程序码并追踪扫码来源,实现推广 下面我将详细介绍如何使用Java后台实现这一功能。 一、整体架构设计 前端:微信小程序 后端:Java (Spring Boot) 数据库:MySQL/其他 微信接口:调用微信小程序码生成API 二、数据库设计 1. 推广人员 阅读全文
posted @ 2025-06-04 13:36 VipSoft 阅读(835) 评论(0) 推荐(0)

1 2 3 4 5 ··· 16 下一页