Nacos适配人大金仓国产数据库

nacos版本2.2.0

人大金仓版本8.6.0

一、相关文件

Nacos官方文档-数据源插件icon-default.png?t=N6B9https://nacos.io/zh-cn/docs/v2/plugin/datasource-plugin.html


Nacos2.2.0源码icon-default.png?t=N6B9https://github.com/alibaba/nacos/archive/refs/tags/2.2.0.zip

 人大金仓驱动icon-default.png?t=N6B9https://download.csdn.net/download/qq_36802726/88165221

 二、Nacos源码修改

1.配置人大金仓依赖

下载源码与驱动。

源码打开后,如果项目依赖下载太慢可以换成阿里的:可以打开maven的setting.xml文件,把内容换成以下内容:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
</settings>

 引入人大金仓驱动,先用maven 安装kingbase8.8.6.0.jar:

//打开命令行,使用以下命令安装本地jar
mvn install:install-file -Dfile=D:\library\kingbase8.8.6.0.jar -DgroupId=com.kingbase -DartifactId=kingbase8 -Dversion=8.6.0 -Dpackaging=jar

引入依赖,打开项目父pom文件 nacos-all

 <!--人大金仓 -->
        <dependency>
            <groupId>com.kingbase</groupId>
            <artifactId>kingbase8</artifactId>
            <version>8.6.0</version>
        </dependency>

 2、源码修改

 2.1.找到DataSourceConstant.java,增加kingbase数据常量

 


public class DataSourceConstant {
    public static final String MYSQL = "mysql";
    
    public static final String DERBY = "derby";

    public static final String KINGBASE = "kingbase";
}

 2.2、新建人大金仓数据源插件

 2.2.1、ConfigInfoAggrMapperByKingbase
/*
 * Copyright 1999-2022 Alibaba Group Holding Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.alibaba.nacos.plugin.datasource.impl.kingbase;

import com.alibaba.nacos.plugin.datasource.constants.DataSourceConstant;
import com.alibaba.nacos.plugin.datasource.impl.base.BaseConfigInfoAggrMapper;

/**
 * The derby implementation of ConfigInfoAggrMapper.
 *
 * @author zc
 **/

public class ConfigInfoAggrMapperByKingbase  extends BaseConfigInfoAggrMapper {
    
    @Override
    public String getDataSource() {
        return DataSourceConstant.KINGBASE;
    }
}

 

 2.2.2、ConfigInfoBetaMapperByKingbase.java
 2.2.3、ConfigInfoMapperByKingbase.java
 2.2.4、ConfigInfoTagMapperByKingbase.java
 2.2.5、ConfigInfoTagsRelationMapperByKingbase.java
 2.2.6、GroupCapacityMapperByKingbase.java
 2.2.7、HistoryConfigInfoMapperByKingbase.java
 2.2.8、TenantCapacityMapperByKingbase.java
 2.2.9、TenantInfoMapperByKingbase.java

2.3、plugin/datasource/src/main/resources/META-INF/services 下增加以下数据

 

#
# Copyright 1999-2022 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

com.alibaba.nacos.plugin.datasource.impl.mysql.ConfigInfoAggrMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.ConfigInfoBetaMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.ConfigInfoMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.ConfigInfoTagMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.ConfigTagsRelationMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.HistoryConfigInfoMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.TenantInfoMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.TenantCapacityMapperByMySql
com.alibaba.nacos.plugin.datasource.impl.mysql.GroupCapacityMapperByMysql

com.alibaba.nacos.plugin.datasource.impl.derby.ConfigInfoAggrMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.ConfigInfoBetaMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.ConfigInfoMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.ConfigInfoTagMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.ConfigInfoTagsRelationMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.HistoryConfigInfoMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.TenantInfoMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.TenantCapacityMapperByDerby
com.alibaba.nacos.plugin.datasource.impl.derby.GroupCapacityMapperByDerby

com.alibaba.nacos.plugin.datasource.impl.kingbase.ConfigInfoAggrMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.ConfigInfoBetaMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.ConfigInfoMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.ConfigInfoTagMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.ConfigInfoTagsRelationMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.GroupCapacityMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.HistoryConfigInfoMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.TenantCapacityMapperByKingbase
com.alibaba.nacos.plugin.datasource.impl.kingbase.TenantInfoMapperByKingbase

 

 2.4、修改配置文件连接数据库

 

### kingbase:
spring.sql.init.platform=kingbase
db.num=1
db.url.0=jdbc:kingbase8://192.168.0.1:54321/nacos?currentSchema=nacos&allowEncodingChanges=true&clientEncoding=UTF8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
db.user.0=nacos
db.password.0=nacos
db.pool.config.driverClassName=com.kingbase8.Driver

 需要注意url的第一个nacos代表数据库名,参数currentSchema后面是数据库的模式名。

2.5、手动增加数据源

不然后面启动项目会报错

Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure :
No DataSource set

在ExternalDataSourceServiceImpl 

找到方法public void init() 追加

  if(Objects.isNull(jt.getDataSource())){
            jt.setDataSource(dataSourceList.get(0));
        }

完整方法

    @Override
        public void init() {
        queryTimeout = ConvertUtils.toInt(System.getProperty("QUERYTIMEOUT"), 3);
        jt = new JdbcTemplate();
        // Set the maximum number of records to prevent memory expansion
        jt.setMaxRows(50000);
        jt.setQueryTimeout(queryTimeout);
        
        testMasterJT = new JdbcTemplate();
        testMasterJT.setQueryTimeout(queryTimeout);
        
        testMasterWritableJT = new JdbcTemplate();
        // Prevent the login interface from being too long because the main library is not available
        testMasterWritableJT.setQueryTimeout(1);
        
        //  Database health check
        
        testJtList = new ArrayList<>();
        isHealthList = new ArrayList<>();
        
        tm = new DataSourceTransactionManager();
        tjt = new TransactionTemplate(tm);
        
        // Transaction timeout needs to be distinguished from ordinary operations.
        tjt.setTimeout(TRANSACTION_QUERY_TIMEOUT);
        
        dataSourceType = DatasourcePlatformUtil.getDatasourcePlatform(defaultDataSourceType);
        
        if (PropertyUtil.isUseExternalDB()) {
            try {
                reload();
            } catch (IOException e) {
                FATAL_LOG.error("[ExternalDataSourceService] datasource reload error", e);
                throw new RuntimeException(DB_LOAD_ERROR_MSG, e);
            }
            
            if (this.dataSourceList.size() > DB_MASTER_SELECT_THRESHOLD) {
                ConfigExecutor.scheduleConfigTask(new SelectMasterTask(), 10, 10, TimeUnit.SECONDS);
            }
            ConfigExecutor.scheduleConfigTask(new CheckDbHealthTask(), 10, 10, TimeUnit.SECONDS);
        }
        if(Objects.isNull(jt.getDataSource())){
            jt.setDataSource(dataSourceList.get(0));
        }
    }

 

2.6、配置调试

maven执行 mvn install

如果控制台显示

java: 程序包com.alibaba.nacos.consistency.entity不存在java: 程序包com.alibaba.nacos.consistency.entity不存在 

 可以执行

 然后刷新一下maven在执行 mvn install

成功后进行运行配置

-Dnacos.standalone=true 代表单例运行 

 这说明项目启动成功

3、人大金仓数据库

CREATE SCHEMA nacos AUTHORIZATION nacos;
CREATE TABLE config_info (
  id bigint NOT NULL,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  tenant_id varchar(128) default '',
  app_name varchar(128),
  content text,
  md5 varchar(32) DEFAULT NULL,
  gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
  gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
  src_user varchar(128) DEFAULT NULL,
  src_ip varchar(20) DEFAULT NULL,
  c_desc varchar(256) DEFAULT NULL,
  c_use varchar(64) DEFAULT NULL,
  effect varchar(64) DEFAULT NULL,
  type varchar(64) DEFAULT NULL,
  c_schema text DEFAULT NULL,
  ENCRYPTED_DATA_KEY varchar(100) DEFAULT NULL,
  constraint configinfo_id_key PRIMARY KEY (id),
  constraint uk_configinfo_datagrouptenant UNIQUE (data_id,group_id,tenant_id));
 
CREATE INDEX configinfo_dataid_key_idx ON config_info(data_id);
CREATE INDEX configinfo_groupid_key_idx ON config_info(group_id);
CREATE INDEX configinfo_dataid_group_key_idx ON config_info(data_id, group_id);
CREATE SEQUENCE config_info_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table config_info  alter column id set default nextval('config_info_id_seq'); 
 
 
 
CREATE TABLE his_config_info (
  id bigint NOT NULL,
  nid bigint NOT NULL,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  tenant_id varchar(128) default '',
  app_name varchar(128),
  content text,
  md5 varchar(32) DEFAULT NULL,
  gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
  gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
  src_user varchar(128),
  src_ip varchar(20) DEFAULT NULL,
  op_type char(10) DEFAULT NULL,
  ENCRYPTED_DATA_KEY varchar(100) DEFAULT NULL,
  constraint hisconfiginfo_nid_key PRIMARY KEY (nid));
 
 
CREATE INDEX hisconfiginfo_dataid_key_idx ON his_config_info(data_id);
CREATE INDEX hisconfiginfo_gmt_create_idx ON his_config_info(gmt_create);
CREATE INDEX hisconfiginfo_gmt_modified_idx ON his_config_info(gmt_modified);  
 
CREATE SEQUENCE his_config_info_nid_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table his_config_info  alter column nid set default nextval('his_config_info_nid_seq'); 
 
 
CREATE TABLE config_info_beta (
  id bigint NOT NULL ,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  tenant_id varchar(128) default '',
  app_name varchar(128),
  content text,
  beta_ips varchar(1024),
  md5 varchar(32) DEFAULT NULL,
  gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
  gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
  src_user varchar(128),
  src_ip varchar(20) DEFAULT NULL,
  constraint configinfobeta_id_key PRIMARY KEY (id),
  constraint uk_configinfobeta_datagrouptenant UNIQUE (data_id,group_id,tenant_id));
 
CREATE SEQUENCE config_info_beta_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table config_info_beta  alter column id set default nextval('config_info_beta_id_seq'); 
 
 
CREATE TABLE config_info_tag (
  id bigint NOT NULL ,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  tenant_id varchar(128) default '',
  tag_id varchar(128) NOT NULL,
  app_name varchar(128),
  content text,
  md5 varchar(32) DEFAULT NULL,
  gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
  gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
  src_user varchar(128),
  src_ip varchar(20) DEFAULT NULL,
  constraint configinfotag_id_key PRIMARY KEY (id),
  constraint uk_configinfotag_datagrouptenanttag UNIQUE (data_id,group_id,tenant_id,tag_id));
CREATE SEQUENCE config_info_tag_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table config_info_tag  alter column id set default nextval('config_info_tag_id_seq'); 
 
 
 
CREATE TABLE config_info_aggr (
  id bigint NOT NULL ,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  tenant_id varchar(128) default '',
  datum_id varchar(255) NOT NULL,
  app_name varchar(128),
  content text,
  gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
  constraint configinfoaggr_id_key PRIMARY KEY (id),
  constraint uk_configinfoaggr_datagrouptenantdatum UNIQUE (data_id,group_id,tenant_id,datum_id));
 
CREATE SEQUENCE config_info_aggr_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table config_info_aggr  alter column id set default nextval('config_info_aggr_id_seq'); 
 
 
CREATE TABLE app_list (
 id bigint NOT NULL ,
 app_name varchar(128) NOT NULL,
 is_dynamic_collect_disabled smallint DEFAULT 0,
 last_sub_info_collected_time timestamp DEFAULT '1970-01-01 08:00:00.0',
 sub_info_lock_owner varchar(128),
 sub_info_lock_time timestamp DEFAULT '1970-01-01 08:00:00.0',
 constraint applist_id_key PRIMARY KEY (id),
 constraint uk_appname UNIQUE (app_name));
CREATE SEQUENCE app_list_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table app_list  alter column id set default nextval('app_list_id_seq'); 
 
 
CREATE TABLE app_configdata_relation_subs (
  id bigint NOT NULL ,
  app_name varchar(128) NOT NULL,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
  constraint configdatarelationsubs_id_key PRIMARY KEY (id),
  constraint uk_app_sub_config_datagroup UNIQUE (app_name, data_id, group_id));
CREATE SEQUENCE app_configdata_relation_subs_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table app_configdata_relation_subs  alter column id set default nextval('app_configdata_relation_subs_id_seq'); 
 
 
 
CREATE TABLE app_configdata_relation_pubs (
  id bigint NOT NULL ,
  app_name varchar(128) NOT NULL,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
  constraint configdatarelationpubs_id_key PRIMARY KEY (id),
  constraint uk_app_pub_config_datagroup UNIQUE (app_name, data_id, group_id));
CREATE SEQUENCE app_configdata_relation_pubs_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table app_configdata_relation_pubs  alter column id set default nextval('app_configdata_relation_pubs_id_seq'); 
 
 
CREATE TABLE config_tags_relation (
  id bigint NOT NULL,
  tag_name varchar(128) NOT NULL,
  tag_type varchar(64) DEFAULT NULL,
  data_id varchar(255) NOT NULL,
  group_id varchar(128) NOT NULL,
  tenant_id varchar(128) DEFAULT '',
  nid bigint NOT NULL,
  constraint config_tags_id_key PRIMARY KEY (nid),
  constraint uk_configtagrelation_configidtag UNIQUE (id, tag_name, tag_type));
 
CREATE INDEX config_tags_tenant_id_idx ON config_tags_relation(tenant_id);
CREATE SEQUENCE config_tags_relation_pubs_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table config_tags_relation  alter column id set default nextval('config_tags_relation_pubs_id_seq'); 
 
 
 
CREATE TABLE group_capacity (
  id bigint NOT NULL ,
  group_id varchar(128) DEFAULT '',
  quota int DEFAULT 0,
  usage int DEFAULT 0,
  max_size int DEFAULT 0,
  max_aggr_count int DEFAULT 0,
  max_aggr_size int DEFAULT 0,
  max_history_count int DEFAULT 0,
  gmt_create timestamp DEFAULT '2010-05-05 00:00:00',
  gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
  constraint group_capacity_id_key PRIMARY KEY (id),
  constraint uk_group_id UNIQUE (group_id));
CREATE SEQUENCE group_capacity_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table group_capacity  alter column id set default nextval('group_capacity_id_seq'); 
 
 
CREATE TABLE tenant_capacity (
  id bigint NOT NULL ,
  tenant_id varchar(128) DEFAULT '',
  quota int DEFAULT 0,
  usage int DEFAULT 0,
  max_size int DEFAULT 0,
  max_aggr_count int DEFAULT 0,
  max_aggr_size int DEFAULT 0,
  max_history_count int DEFAULT 0,
  gmt_create timestamp DEFAULT '2010-05-05 00:00:00',
  gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
  constraint tenant_capacity_id_key PRIMARY KEY (id),
  constraint uk_tenant_id UNIQUE (tenant_id));
CREATE SEQUENCE tenant_capacity_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table tenant_capacity  alter column id set default nextval('tenant_capacity_id_seq'); 
 
 
CREATE TABLE tenant_info (
  id bigint NOT NULL ,
  kp varchar(128) NOT NULL,
  tenant_id varchar(128)  DEFAULT '',
  tenant_name varchar(128)  DEFAULT '',
  tenant_desc varchar(256)  DEFAULT NULL,
  create_source varchar(32) DEFAULT NULL,
  gmt_create bigint NOT NULL,
  gmt_modified bigint NOT NULL,
  constraint tenant_info_id_key PRIMARY KEY (id),
  constraint uk_tenant_info_kptenantid UNIQUE (kp,tenant_id));
CREATE INDEX tenant_info_tenant_id_idx ON tenant_info(tenant_id);
 
CREATE SEQUENCE tenant_info_id_seq 
    START WITH 1    
    INCREMENT BY 1  
    NO MINVALUE 
    NO MAXVALUE 
    CACHE 1; 
alter table tenant_info  alter column id set default nextval('tenant_info_id_seq'); 
 
 
 
CREATE TABLE users (
    username varchar(50) NOT NULL PRIMARY KEY,
    password varchar(500) NOT NULL,
    enabled boolean NOT NULL
);
 
CREATE TABLE roles (
    username varchar(50) NOT NULL,
    role varchar(50) NOT NULL
);
 
INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', true);
 
INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');

三、 构建打包

mvn -Prelease-nacos -Dmaven.test.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true  clean install

或者

mvn -Prelease-nacos clean package install -Dmaven.test.skip=true

成功后在distribution的target下生成两个包

nacos-server-2.2.0.tar.gz 是linux环境的

nacos-server-2.2.0.zip 是windows环境的

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/60761.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

树的层次遍历

层次遍历简介 广度优先在面试里出现的频率非常高&#xff0c;整体属于简单题。而广度优先遍历又叫做层次遍历&#xff0c;基本过程如下&#xff1a; 层次遍历就是从根节点开始&#xff0c;先访问根节点下面一层全部元素&#xff0c;再访问之后的层次&#xff0c;类似金字塔一样…

nginx部署以及反向代理多域名实现HTTPS访问

nginx部署以及反向代理多域名实现 1.nginx部署 1.1 编写nginx部署文件 docker-compose.yml version: 3 services: nginx:restart: always image: nginx:1.20container_name: nginx-mainports:- 80:80- 443:443volumes: # 基础配置- /opt/nginx_main/nginx-info/nginx.conf:/…

商城-学习整理-基础-商品服务API-品牌管理(六)

目录 一、使用逆向工程生成前后端代码1、新增品牌管理菜单2、使用生成的前端代码 二、优化逆向生成的品牌管理页面1、显示状态开关优化2、品牌上传优化&#xff08;使用阿里云存储&#xff09;1&#xff09;阿里云对象存储-普通上传方式2&#xff09;阿里云对象存储-服务端签名…

Linux系统部署Python语言开发运行环境

目录 Ubuntu自带python Debian安装python 安装 pip 库列表 安装第三方库 使用国内镜像站 实装 tkinter 库 编写运行代码 测试代码1 1. 创建项目 2. 创建源码文件 3. 写入源代码 4. 修改权限 5. 运行代码 测试代码2 本文的使用环境是Windows的Linux 子系统&…

基于fpga_EP4CE6F17C8_秒表计数器

文章目录 前言实验手册一、实验目的二、实验原理1&#xff0e;理论原理2&#xff0e;硬件原理 三、系统架构设计四、模块说明1&#xff0e;模块端口信号列表dig_driver(数码管驱动模块)key(按键消抖模块)top(顶层模块) 2&#xff0e;状态转移图3&#xff0e;时序图五、仿真波形…

Windows 本地安装 Mysql8.0

前言 看了网上许多关于Windows 本地安装mysql的很多教程&#xff0c;基本上大同小异。但是安装软件有时就可能因为一个细节安装失败。我也是综合了很多个教程才安装好的&#xff0c; 所以本教程可能也不是普遍适合的。现我将自己本地安装的步骤总结如下&#xff0c;如有不对的…

高级web前端开发工程师的职责说明(合集)

高级web前端开发工程师的职责说明1 职责&#xff1a; 1、根据需求文档&#xff0c;完成PC端、移动端页面及交互的开发&#xff0c;并保证兼容性和确保产品具有优质的用户体验; 2、熟练使用 HTML 、 CSS 、 JS 、 Ajax 等技术&#xff0c;能解决各种浏览器兼容性问题&#xff…

boost beast http server 测试

boost beast http client boost http server boost beast 是一个非常好用的库&#xff0c;带上boost的协程&#xff0c;好很多东西是比较好用的&#xff0c;以下程序使用四个线程开启协程处理进入http协议处理。协议支持http get 和 http post #include <boost/beast/cor…

关于盐雾试验

盐雾实验一般被称为盐雾试验&#xff0c;是一种主要利用盐雾试验设备所创造的人工模拟盐雾环境条件来考核产品或金属材料耐腐蚀性能的环境试验。 盐雾实验的主要目的是考核产品或金属材料的耐盐雾腐蚀性能&#xff0c;盐雾试验结果也是对产品质量的判定&#xff0c;是正确衡量…

mongodb-win32-x86_64-2008plus-3.4.24-signed.msi

Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。C:\Users\Administrator>cd C:\MongoDB\Server\3.4\binC:\MongoDB\Server\3.4\bin>C:\MongoDB\Server\3.4\bin>mongod --help Options:General options:-h [ --help ] …

UML-构件图

目录 1.概述 2.构件的类型 3.构件和类 4.构件图 1.概述 构件图主要用于描述各种软件之间的依赖关系&#xff0c;例如&#xff0c;可执行文件和源文件之间的依赖关系&#xff0c;所设计的系统中的构件的表示法及这些构件之间的关系构成了构件图 构件图从软件架构的角度来描述…

Docker极速安装Jenkins

安装 Jenkins 是一个常见的任务&#xff0c;使用 Docker 进行安装可以简化该过程并确保环境一致性。以下是在 Docker 中安装 Jenkins 的详细步骤&#xff1a; 安装 Docker: 首先&#xff0c;请确保您已在目标机器上安装了 Docker。根据您的操作系统&#xff0c;可以在 Docker 官…

【Spring框架】Spring事务

目录 Spring中事务的实现编程式事务声明式事务Transactional 作⽤范围Transactional 参数说明注意事项Transactional ⼯作原理 MySQL 事务隔离级别Spring 事务隔离级别事务传播机制 Spring中事务的实现 Spring中事务操作分为两类&#xff1a; 1.编程式事务 2.声明式事务 编程…

meanshift算法通俗讲解【meanshift实例展示】

meanshift算法原理 meanshift算法的原理很简单。假设你有一堆点集&#xff0c;还有一个小的窗口&#xff0c;这个窗口可能是圆形的&#xff0c;现在你可能要移动这个窗口到点集密度最大的区域当中。 如下图&#xff1a; 最开始的窗口是蓝色圆环的区域&#xff0c;命名为C1。蓝…

一百四十四、Kettle——Linux上安装的kettle8.2连接MySQL数据库

一、目的 在Linux上安装好kettle&#xff0c;然后用kettle连接MySQL数据库 注意&#xff1a;kettle版本是8.2 二、实施步骤 &#xff08;一&#xff09;到kettle安装目录下启动Linux的kettle服务 # cd /opt/install/data-integration/ # ./spoon.sh &#xff08;二&#x…

SpringCloud深度学习(在更)

微服务简介 微服务是什么&#xff1f; 微服务是一种架构风格&#xff0c;将一个大型应用程序拆分为一组小型、自治的服务。每个服务都运行在自己独立的进程中&#xff0c;使用轻量级的通信机制&#xff08;通常是HTTP或消息队列&#xff09;进行相互之间的通信。这种方式使得…

springboot-mybatis的增删改查

目录 一、准备工作 二、常用配置 三、尝试 四、增删改查 1、增加 2、删除 3、修改 4、查询 五、XML的映射方法 一、准备工作 实施前的准备工作&#xff1a; 准备数据库表 创建一个新的springboot工程&#xff0c;选择引入对应的起步依赖&#xff08;mybatis、mysql驱动…

TP DP PP 并行训练方法介绍

这里写目录标题 张量并行TP流水线并行 PPnaive模型并行GPipePipeDream 数据并行DPFSDP 张量并行TP 挖坑 流水线并行 PP 经典的流水线并行范式有Google推出的Gpipe&#xff0c;和微软推出的PipeDream。两者的推出时间都在2019年左右&#xff0c;大体设计框架一致。主要差别为…

细讲一个 TCP 连接能发多少个 HTTP 请求(二)

第三个问题&#xff1a;一个 TCP 连接中 HTTP 请求发送可以一起发送么&#xff08;比如一起发三个请求&#xff0c;再三个响应一起接收&#xff09;&#xff1f; HTTP/1.1 存在一个问题&#xff0c;单个 TCP 连接在同一时刻只能处理一个请求&#xff0c;意思是说&#xff1a;两…

[Docker实现测试部署CI/CD----相关服务器的安装配置(2)]

目录 6、Jenkins安装配置安装jdk安装maven拉取镜像启动jenkins修改数据卷权限浏览器访问安装插件配置jenkins移动JDK和Maven配置JDK和Maven 6、Jenkins安装配置 Jenkins 是一个开源软件项目&#xff0c;是基于 Java 开发的一种持续集成工具&#xff0c;用于监控持续重复的工作&…