当前位置: 首页 > news >正文

网络舆论与网络舆情/优化最狠的手机优化软件

网络舆论与网络舆情,优化最狠的手机优化软件,wordpress社交模板,网站建设项目经验怎么写环境&#xff1a; springboot&#xff1a;2.5.2 数据库&#xff1a;Kingbase金仓V8R6 依赖&#xff1a; <dependency><groupId>org.apache.shardingsphere</groupId><artifactId>sharding-jdbc-spring-boot-starter</artifactId></depende…

环境:

springboot:2.5.2

数据库:Kingbase金仓V8R6

依赖:

        <dependency><groupId>org.apache.shardingsphere</groupId><artifactId>sharding-jdbc-spring-boot-starter</artifactId></dependency><dependency><groupId>com.kingbase8</groupId><artifactId>kingbase8</artifactId><version>8.6.0</version></dependency>

思路一:获取Connection执行存储过程

折腾了多种方式(EntityManager、DataSource、JdbcTemplate等),发现在shardingsphere环境下,始终不支持存储过程。

原因未知,没有深究出来。

可能是shardingsphere本身就不支持存储过程分片;

也就可能跟shardingsphere版本有问题;

还有可能是跟jdbc驱动包有关系(由于shardingsphere不适配金仓,jdbc驱动依然用的是org.postgresql.Driver);

... ...

shardingjdbc数据源配置

spring:shardingsphere:datasource:app100:driver-class-name: org.postgresql.Driverjdbc-url: jdbc:postgresql://IP:端口/数据库?serverTimezone=Asia/Shanghai&useSSL=falsepassword: type: com.zaxxer.hikari.HikariDataSourceusername: connection-timeout: 30000minimum-idle: 10maximum-pool-size: 1000idle-timeout: 30000pool-name: hikari-100max-lifetime: 60000connection-test-query: SELECT 1leak-detection-threshold: 50000app101:driver-class-name: org.postgresql.Driverjdbc-url: jdbc:postgresql://IP:端口/数据库?serverTimezone=Asia/Shanghai&useSSL=falsepassword: type: com.zaxxer.hikari.HikariDataSourceusername: connection-timeout: 30000minimum-idle: 10maximum-pool-size: 1000idle-timeout: 30000pool-name: hikari-101max-lifetime: 60000connection-test-query: SELECT 1leak-detection-threshold: 50000app102:driver-class-name: org.postgresql.Driverjdbc-url: jdbc:postgresql://IP:端口/数据库?serverTimezone=Asia/Shanghai&useSSL=falsepassword: type: com.zaxxer.hikari.HikariDataSourceusername: connection-timeout: 30000minimum-idle: 10maximum-pool-size: 1000idle-timeout: 30000pool-name: hikari-102max-lifetime: 60000connection-test-query: SELECT 1leak-detection-threshold: 50000


换种思路:动态数据源

配置

spring:datasource:multiPrimary:pool-name: 100type: com.zaxxer.hikari.HikariDataSourceconnection-timeout: 30000minimum-idle: 50maximum-pool-size: 1000idle-timeout: 30000max-lifetime: 60000connection-test-query: SELECT 1username: password: jdbc-url: jdbc:kingbase8://IP:端口/数据库driver-class-name: com.kingbase8.DrivermultiSecondarys:- secondary-101:pool-name: 101type: com.zaxxer.hikari.HikariDataSourceconnection-timeout: 30000minimum-idle: 50maximum-pool-size: 1000idle-timeout: 30000max-lifetime: 60000connection-test-query: SELECT 1username: password: jdbc-url: jdbc:kingbase8://IP:端口/数据库driver-class-name: com.kingbase8.Driver- secondary-102:pool-name: 102type: com.zaxxer.hikari.HikariDataSourceconnection-timeout: 30000minimum-idle: 50maximum-pool-size: 1000idle-timeout: 30000max-lifetime: 60000connection-test-query: SELECT 1username: password: jdbc-url: jdbc:kingbase8://IP:端口/数据库driver-class-name: com.kingbase8.Driver

相关配置类源码

public class MultDataSourceUtil {private static final ThreadLocal<String> DATASOURCE_KEY = new ThreadLocal<>();public static void setDataSourceRoutingKey(String key) {DATASOURCE_KEY.set(key);}public static String getDataSourceRoutingKey() {return DATASOURCE_KEY.get();}public static void clearDataSourceRoutingKey() {DATASOURCE_KEY.remove();}
}

import com.zaxxer.hikari.HikariDataSource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;import java.util.HashMap;
import java.util.Map;@Slf4j
@ConfigurationProperties("spring.datasource")
@Configuration
public class DataSourceConfig {private HikariDataSource multiPrimary;private Map<String, HikariDataSource> multiSecondarys = new HashMap<>();@Bean@Primarypublic DynamicDataSource falsDynamicDataSource() {Map<Object, Object> targetDataSources = new HashMap<>();multiSecondarys.forEach((key, secondary) -> {targetDataSources.put(secondary.getPoolName(), secondary);});targetDataSources.put(multiPrimary.getPoolName(), multiPrimary);DynamicDataSource dynamicDataSource = new DynamicDataSource(multiPrimary, targetDataSources);dynamicDataSource.afterPropertiesSet();return dynamicDataSource;}public HikariDataSource getMultiPrimary() {return multiPrimary;}public void setMultiPrimary(HikariDataSource multiPrimary) {this.multiPrimary = multiPrimary;}public Map<String, HikariDataSource> getMultiSecondarys() {return multiSecondarys;}public void setMultiSecondarys(Map<String, HikariDataSource> multiSecondarys) {this.multiSecondarys = multiSecondarys;}
}

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;import javax.sql.DataSource;
import java.util.Map;public class DynamicDataSource extends AbstractRoutingDataSource {public DynamicDataSource() {super();}public DynamicDataSource(DataSource defaultTargetDataSource, Map<Object, Object> targetDataSources) {super.setDefaultTargetDataSource(defaultTargetDataSource);super.setTargetDataSources(targetDataSources);super.afterPropertiesSet();}@Overrideprotected Object determineCurrentLookupKey() {return MultDataSourceUtil.getDataSourceRoutingKey();}
}

业务类代码

import com.alibaba.fastjson.JSONObject;
import com.zaxxer.hikari.HikariDataSource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.sql.DataSource;
import java.sql.*;
import java.util.Date;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;@Slf4j
@Service
public class 业务ServiceImpl implements 业务Service {@Resourceprivate DataSource dataSource;@PersistenceContextprivate EntityManager em;@Overridepublic Map<String, String> zjjhpld(String paramStr) {Map<String, String> result = new HashMap<>();String msg = "";try {String orgId = "00320000000000000000";// regionQuery query = em.createNativeQuery(" SELECT 字段 FROM 表 where 字段=:orgId AND tenantId=:tenantId ");query.setParameter("orgId", orgId);query.setParameter("tenantId", tenantId);String treeinfoPath = (String) query.getSingleResult();System.out.println(treeinfoPath);// endregionMap<Object, DataSource> dataSourceMap = ((DynamicDataSource) dataSource).getResolvedDataSources();for (Map.Entry<Object, DataSource> entry : dataSourceMap.entrySet()) {String k = (String) entry.getKey();if ("100".equals(k)) {continue;}DataSource v = entry.getValue();HikariDataSource hikariDataSource = (HikariDataSource) v;Connection conn = hikariDataSource.getConnection();CallableStatement callableStatement = conn.prepareCall("{ call 存储过程(?, ?) }");callableStatement.setString(1, orgId);callableStatement.registerOutParameter(2, Types.REF_CURSOR);callableStatement.execute();ResultSet resultSet = (ResultSet) callableStatement.getObject(2);while (resultSet.next()) {System.out.println();}conn.close();}} catch (Exception e) {log.error("出现异常:", e);}return result;}
}

注意:

存储过程可以正常执行了,但是有个问题,第一个查询sql不走shardingjdbc的分库了。

发现获取的数据源已经变成了动态数据源,而不是shardingjdbc的数据源,这样不符合我们的需求。


再换个思路,去掉动态,只留下组装好的数据源

配置类代码:

import com.zaxxer.hikari.HikariDataSource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
import java.util.Map;@Slf4j
@ConfigurationProperties("spring.datasource")
@Configuration
public class DataSourceConfig {private HikariDataSource multiPrimary;private Map<String, HikariDataSource> multiSecondarys = new HashMap<>();public HikariDataSource getMultiPrimary() {return multiPrimary;}public void setMultiPrimary(HikariDataSource multiPrimary) {this.multiPrimary = multiPrimary;}public Map<String, HikariDataSource> getMultiSecondarys() {return multiSecondarys;}public void setMultiSecondarys(Map<String, HikariDataSource> multiSecondarys) {this.multiSecondarys = multiSecondarys;}
}

业务代码:

import com.alibaba.fastjson.JSONObject;
import com.zaxxer.hikari.HikariDataSource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.stereotype.Service;import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.sql.DataSource;
import java.sql.*;
import java.util.Date;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;@Slf4j
@Service
public class 业务ServiceImpl implements 业务Service {@Resourceprivate DefaultListableBeanFactory beanFactory;@Resourceprivate DataSourceConfig dataSourceConfig;@Resourceprivate DataSource dataSource;@PersistenceContextprivate EntityManager em;@Overridepublic Map<String, String> 业务(String paramStr) {Map<String, String> result = new HashMap<>();String msg = "";try {String orgId = "";String jhqj = "";HikariDataSource multiPrimary = dataSourceConfig.getMultiPrimary();Map<String, HikariDataSource> multiSecondarys = dataSourceConfig.getMultiSecondarys();/*HikariDataSource dataSource = new HikariDataSource();dataSource.setDriverClassName("com.mysql.jdbc.Driver");dataSource.setJdbcUrl("jdbc:mysql://localhost:3306/db3?characterEncoding=utf8");dataSource.setUsername("root");dataSource.setPassword("123456");dataSource.getConnection();System.out.println("db3 创建完成!");beanFactory.registerSingleton("db3", dataSource);*/// regionQuery query = em.createNativeQuery(" SELECT 字段 FROM 表 where 条件=:orgId AND tenantId=:tenantId ");query.setParameter("orgId", orgId);query.setParameter("tenantId", tenantId);String val = (String) query.getSingleResult();// endregionfor (Map.Entry<String, HikariDataSource> entry : multiSecondarys.entrySet()) {String k = entry.getKey();if ("100".equals(k)) {continue;}DataSource v = entry.getValue();HikariDataSource hikariDataSource = (HikariDataSource) v;Connection conn = hikariDataSource.getConnection();CallableStatement callableStatement = conn.prepareCall("{ call 存储过程(?, ?) }");callableStatement.setString(1, orgId);callableStatement.registerOutParameter(2, Types.REF_CURSOR);callableStatement.execute();ResultSet resultSet = (ResultSet) callableStatement.getObject(2);while (resultSet.next()) {System.out.println();}conn.close();}} catch (Exception e) {log.error("出现异常:", e);}return result;}
}

第一个查询依然走shardingjdbc,存储过程可以可以正常执行。

但是执行起来特别慢,暂时无解。


其他分享

动态数据源:集成JPA + MP,具体参考《动态数据源》

JPA配置类

import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.SharedEntityManagerCreator;
import org.springframework.transaction.PlatformTransactionManager;import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import java.util.Map;@Configuration
@EnableConfigurationProperties(JpaProperties.class)
@EntityScan("com.**.entity")
@EnableJpaRepositories("com.**.repository")
public class JpaExtConfiguration {@Resourceprivate JpaProperties jpaProperties;@Resourceprivate DynamicDataSource dynamicDataSource;@Beanpublic LocalContainerEntityManagerFactoryBean entityManagerFactoryBean(EntityManagerFactoryBuilder builder) {Map<String, String> properties = jpaProperties.getProperties();properties.put("hibernate.physical_naming_strategy", "org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy");return builder.dataSource(dynamicDataSource).properties(properties).packages("com.**.entity").build();}@Primary@Beanpublic EntityManagerFactory entityManagerFactory(LocalContainerEntityManagerFactoryBean entityManagerFactoryBean) {return entityManagerFactoryBean.getObject();}@Primary@Beanpublic PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {return new JpaTransactionManager(entityManagerFactory);}@Primary@Beanpublic EntityManager entityManager(EntityManagerFactory entityManagerFactory) {return SharedEntityManagerCreator.createSharedEntityManager(entityManagerFactory);}
}

MP配置类

import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.core.config.GlobalConfig;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;import javax.sql.DataSource;@MapperScan(sqlSessionFactoryRef = "dynamicDataSourceSqlSessionFactory")
@Configuration
@Slf4j
public class MpExtConfiguration {@Bean@ConfigurationProperties(prefix = "mybatis-plus.global-config")public GlobalConfig globalConfig() {return new GlobalConfig();}@Bean@ConfigurationProperties(prefix = "mybatis-plus.configuration")public MybatisConfiguration mybatisConfiguration() {return new MybatisConfiguration();}@Beanpublic SqlSessionFactory dynamicDataSourceSqlSessionFactory(@Qualifier("dynamicDataSource") DataSource dynamicDataSource, GlobalConfig globalConfig, MybatisConfiguration mybatisConfiguration) throws Exception {MybatisSqlSessionFactoryBean sqlSessionFactoryBean = new MybatisSqlSessionFactoryBean();sqlSessionFactoryBean.setDataSource(dynamicDataSource);sqlSessionFactoryBean.setGlobalConfig(globalConfig);sqlSessionFactoryBean.setConfiguration(mybatisConfiguration);return (SqlSessionFactory) sqlSessionFactoryBean.getObject();}
}

MP配置

mybatis-plus:global-config:enable-sql-runner: trueconfiguration:log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

相关文章:

在shardingsphere执行存储过程

环境&#xff1a; springboot&#xff1a;2.5.2 数据库&#xff1a;Kingbase金仓V8R6 依赖&#xff1a; <dependency><groupId>org.apache.shardingsphere</groupId><artifactId>sharding-jdbc-spring-boot-starter</artifactId></depende…...

1.文件目录操作

目录 &#x1f34c; ls - 列出目录内容 &#x1f349;cp - 复制文件或目录 &#x1f347;mv - 移动或重命名文件 &#x1f353; cd - 切换目录 &#x1f348; pwd - 打印工作目录 &#x1f352;mkdir - 创建目录 &#x1f351; rmdir - 删除空目录 &#x1f96d; touc…...

Vue单页面应用和多页面应用

在 Vue.js 中&#xff0c;“单页面”&#xff08;SPA&#xff0c;Single Page Application&#xff09;和"多页面"&#xff08;MPA&#xff0c;Multi Page Application&#xff09;是两种不同的应用结构&#xff0c;它们的差异主要体现在页面的加载方式、路由的使用、…...

Lombok :简化 Java 编程的得力工具

在 Java 开发过程中&#xff0c;常常需要编写大量的样板代码&#xff0c;例如构造函数、Getter 和 Setter 方法、equals 和 hashCode 方法等。这些代码虽然逻辑相对固定&#xff0c;但编写起来却较为繁琐且容易出错&#xff0c;并且会使代码显得冗长。Lombok 应运而生&#xff…...

AIGC引领金融大模型革命:未来已来

文章目录 金融大模型的应用场景1. **金融风险管理**2. **量化交易**3. **个性化投资建议**4. **金融欺诈检测和预防**5. **智能客户服务** 金融大模型开发面临的挑战应对策略《金融大模型开发基础与实践》亮点内容简介作者简介获取方式 在AIGC&#xff08;Artificial Intellige…...

DBA面试题-1

面临失业&#xff0c;整理一下面试题&#xff0c;找下家继续搬砖 主要参考&#xff1a;https://www.csdn.net/?spm1001.2101.3001.4476 略有修改 一、mysql有哪些数据类型 1&#xff0c; 整形 tinyint,smallint,medumint,int,bigint&#xff1b;分别占用1字节、2字节、3字节…...

用go语言写一个小服务

文章目录 简介重新想到go 小服务main.go部署测试 结束语 简介 golang的优势 响应速度&#xff1a; Go > Java > Python 内存占用&#xff1a; Go < Java < Python 从java转go&#xff0c;然后go又转java&#xff0c;感觉就是go虽然在编译、内存占用都强于java&am…...

亚马逊开发视频人工智能模型,The Information 报道

根据《The Information》周三的报道&#xff0c;电子商务巨头亚马逊&#xff08;AMZN&#xff09;已开发出一种新的生成式人工智能&#xff08;AI&#xff09;&#xff0c;不仅能处理文本&#xff0c;还能处理图片和视频&#xff0c;从而减少对人工智能初创公司Anthropic的依赖…...

WordCloud参数的用法:

-------------词云图集合------------- 用WordcloudPyQt5写个词云图生成器1.0 WordCloud去掉停用词&#xff08;fit_wordsgenerate&#xff09;的2种用法 通过词频来绘制词云图&#xff08;jiebaWordCloud&#xff09; Python教程95&#xff1a;去掉停用词词频统计jieba.toke…...

qml调用c++类内函数的三种方法

一.方法一&#xff1a;使用 Q_INVOKABLE 宏声明成员函数 1.第一步&#xff1a;依然需要新建一个类NetworkHandler: #include <QObject> class NetworkHandler : public QObject { Q_OBJECT public: explicit NetworkHandler(QObject *parent nullptr); Q_INVOKAB…...

NLP任务四大范式的进阶历程:从传统TF-IDF到Prompt-Tuning(提示词微调)

引言&#xff1a;从TF-IDF到Prompt-Tuning&#xff08;提示词微调&#xff09;&#xff0c;NLP的四次变革 自然语言处理&#xff08;NLP&#xff09;技术从最早的手工特征设计到如今的Prompt-Tuning&#xff0c;经历了四个重要阶段。随着技术的不断发展&#xff0c;我们的目标…...

GAMES101:现代计算机图形学入门-笔记-09

久违的101图形学回归咯 今天的话题应该是比较轻松的&#xff1a;聊一聊在渲染中比较先进的topics Advanced Light Transport 首先是介绍一系列比较先进的光线传播方法&#xff0c;有无偏的如BDPT&#xff08;双向路径追踪&#xff09;&#xff0c;MLT&#xff08;梅特罗波利斯…...

【Db First】.NET开源 ORM 框架 SqlSugar 系列

.NET开源 ORM 框架 SqlSugar 系列 【开篇】.NET开源 ORM 框架 SqlSugar 系列【入门必看】.NET开源 ORM 框架 SqlSugar 系列【实体配置】.NET开源 ORM 框架 SqlSugar 系列【Db First】.NET开源 ORM 框架 SqlSugar 系列【Code First】.NET开源 ORM 框架 SqlSugar 系列 &#x1f…...

MySQL聚合查询分组查询联合查询

#对应代码练习 -- 创建考试成绩表 DROP TABLE IF EXISTS exam; CREATE TABLE exam ( id bigint, name VARCHAR(20), chinese DECIMAL(3,1), math DECIMAL(3,1), english DECIMAL(3,1) ); -- 插入测试数据 INSERT INTO exam (id,name, chinese, math, engli…...

告别照相馆!使用AI证件照工具HivisionIDPhotos打造在线证件照制作软件

文章目录 前言1. 安装Docker2. 本地部署HivisionIDPhotos3. 简单使用介绍4. 公网远程访问制作照片4.1 内网穿透工具安装4.2 创建远程连接公网地址 5. 配置固定公网地址 前言 本文主要介绍如何在Linux系统使用Docker快速部署一个AI证件照工具HivisionIDPhotos&#xff0c;并结合…...

通信原理第三次实验

实验目的与内容 实验操作与结果 5.1 刚开始先不加入白噪声&#xff0c;系统设计如下&#xff1a; 正弦波参数设置如下&#xff1a; FM设计如下&#xff1a; 延迟设计如下&#xff1a; 两个滤波器设计参数如下&#xff1a; 输出信号频谱为&#xff08;未加入噪声&#xff09;&a…...

【halcon】Metrology工具系列之 get_metrology_object_result_contour

get_metrology_object_result_contour (操作员) 名称 get_metrology_object_result_contour — 查询测量对象的结果轮廓。 签名 get_metrology_object_result_contour( : Contour : MetrologyHandle, Index, Instance, Resolution : ) 描述 get_metrology_object_result_…...

A052-基于SpringBoot的酒店管理系统

&#x1f64a;作者简介&#xff1a;在校研究生&#xff0c;拥有计算机专业的研究生开发团队&#xff0c;分享技术代码帮助学生学习&#xff0c;独立完成自己的网站项目。 代码可以查看文章末尾⬇️联系方式获取&#xff0c;记得注明来意哦~&#x1f339; 赠送计算机毕业设计600…...

NLP信息抽取大总结:三大任务(带Prompt模板)

信息抽取大总结 1.NLP的信息抽取的本质&#xff1f;2.信息抽取三大任务&#xff1f;3.开放域VS限定域4.信息抽取三大范式&#xff1f;范式一&#xff1a;基于自定义规则抽取&#xff08;2018年前&#xff09;范式二&#xff1a;基于Bert下游任务建模抽取&#xff08;2018年后&a…...

python常见问题-pycharm无法导入三方库

1.运行环境 python版本&#xff1a;Python 3.9.6 需导入的greenlet版本&#xff1a;greenlet 3.1.1 2.当前的问题 由于需要使用到greenlet三方库&#xff0c;所以进行了导入&#xff0c;以下是我个人导入时的全过程 ①首先尝试了第1种导入方式&#xff1a;使用pycharm进行…...

迅为RK3588开发板Android系统开发笔记-使用ADB工具

1 使用 ADB 工具 ADB 英文名叫 Android debug bridge &#xff0c;是 Android SDK 里面的一个工具&#xff0c;用这个工具可以操作管理 Android 模拟器或者真实的 Android 设备&#xff0c;主要的功能如下所示&#xff1a;  在 Android 设备上运行 shell 终端&#xff0c;用命…...

什么是分布式数据库?

随着现代互联网应用和大数据时代的到来&#xff0c;分布式数据库成为了解决大规模数据存储和高并发处理的核心技术之一。本文将通过深入浅出的方式&#xff0c;带你全面理解分布式数据库的概念、工作原理以及底层实现技术。无论你是刚刚接触分布式数据库的开发者&#xff0c;还…...

Leetcode 3363. Find the Maximum Number of Fruits Collected

Leetcode 3363. Find the Maximum Number of Fruits Collected 1. 解题思路2. 代码实现 题目链接&#xff1a;3363. Find the Maximum Number of Fruits Collected 1. 解题思路 这一题是一道陷阱题…… 乍一眼看过去&#xff0c;由于三人的路线完全可能重叠&#xff0c;因此…...

【数据仓库 | Data Warehouse】数据仓库的四大特性

1. 前言 数据仓库是用于支持管理和决策的数据集合&#xff0c;它汇集了来自不同数据源的历史数据&#xff0c;以便进行多维度的分析和报告。数据仓库的四大特点是&#xff1a;主题性&#xff0c;集成性&#xff0c;稳定性&#xff0c;时变性。 2. 主题性(Subject-Oriented) …...

springboot配置多数据源mysql+TDengine保姆级教程

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、pom文件二、yamlDataSourceConfigServiceMapper.xml测试总结 前言 Mybatis-plus管理多数据源&#xff0c;数据库为mysql和TDengine。 一、pom文件 <de…...

dns实验2:反向解析

启动服务&#xff1a; 给虚拟机网卡添加IP地址&#xff1a; 查看有几个IP地址&#xff1a; 打开配置文件&#xff1a; 重启服务&#xff0c;该宽松模式&#xff0c;关闭防火墙&#xff1a; 本机测试&#xff1a; windows测试&#xff1a;&#xff08;本地shell&#xff09;...

ZooKeeper 基础知识总结

先赞后看&#xff0c;Java进阶一大半 ZooKeeper 官网这样介绍道&#xff1a;ZooKeeper 是一种集中式服务&#xff0c;用于维护配置信息、命名、提供分布式同步和提供组服务。 各位hao&#xff0c;我是南哥&#xff0c;相信对你通关面试、拿下Offer有所帮助。 ⭐⭐⭐一份南哥编写…...

npm库xss依赖的使用方法和vue3 中Web富文本编辑器 wangeditor 使用xss库解决 XSS 攻击的方法

npm库xss依赖的使用方法和vue3 中Web富文本编辑器 wangeditor 使用xss库解决 XSS 攻击的方法 1. npm库xss依赖的使用方法1.1 xss库定义1.2 xss库功能 2. vue3 中 wangeditor 使用xss库解决 XSS 攻击的方法和示例2.1 在终端执行如下命令安装 xss 依赖2.2 在使用 wangeditor 的地…...

微信小程序蓝牙writeBLECharacteristicValue写入数据返回成功后,实际硬件内信息查询未存储?

问题&#xff1a;连接蓝牙后&#xff0c;调用小程序writeBLECharacteristicValue&#xff0c;返回传输数据成功&#xff0c;查询硬件响应发现没有存储进去&#xff1f; 解决&#xff1a;一直以为是这个write方法的问题&#xff0c;找了很多相关贴&#xff0c;后续进行硬件日志…...

5G NR:带宽与采样率的计算

100M 带宽是122.88Mhz sampling rate这是我们都知道的&#xff0c;那它是怎么来的呢&#xff1f; 采样率 子载波间隔 * 采样长度 38.211中对于Tc的定义&#xff0c; 在LTE是定义了Ts&#xff0c;在NR也就是5G定义了Tc。 定义这个单位会对我们以后工作中的计算至关重要。 就是在…...