# 自研-数据开发与治理平台 **Repository Path**: data-development_1/Proprietary-Data-Development-and-Governance-Platform ## Basic Information - **Project Name**: 自研-数据开发与治理平台 - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-15 - **Last Updated**: 2026-05-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 项目说明 srt-cloud 是采用 Vue3,Ts,Spring Cloud Alibaba、SpringSecurity、Spring Cloud Gateway、SpringBoot、Nacos、Redis、Mybatis-Plus,Tidb,Flink,Hadoop 等最新技术,开发的全新数睿通数据中台,包含数据集成,数据开发,数据治理,数据资产,数据服务,数据集市等模块,解决数据孤岛问题,实现数据统一口径标准,自定义数据开发任务,帮助企业,政府等解决数据问题! ## 功能模块说明 - 数据集成 - 数据库管理 — 管理用户添加的数据源,支持 MYSQL/ORACLE/SQLSERVER/POSTGRESQL/GREENPLUM/MARIADB/DB2/DM/OSCAR/KINGBASE8/OSCAR/GBASE8A/HIVE/SQLITE3/SYBASE/DORIS/MONGODB/HIVE/CLICKHOUSE/TDengine ,支持库表查询,测试连接等 - api管理 — 管理api类型的数据源 - 文件管理 — 管理用户上传的文件数据 - 数据接入 - dbswtich 接入— 底层使用 dbswtich 进行数据接入 - seatunnel 接入 — 底层使用 seatunnel 进行数据接入 - api 接入 — 接入api类型的数据 - 数据填报 - 填报表 — 自定义填报表单和字段 - 录入查询 — 填报数据和查询 - 贴源数据 — 查看接入到ods层的数据表和数据,可查看每张表的同步记录 - 可视化 ETL - 工具箱 — 查看常用的 ETL 工具箱组件 - 生产流程 — 以拖拉拽组件的方式构建流程,执行流程,支持多种常用组件,可以进行数据抽取,合并,清洗,过滤,加密,解密,脱敏等功能 - 流程日志—可以查看流程日志,停止运行中的流程 - 可视化 BI - 大屏配置 — 查看大屏列表,支持可视化大屏编辑,克隆,复制链接等操作 - 数据开发 - 数据表 — 查看数仓分层数据,查看表信息,支持 sql 控制台 - 数据生产 — 对数据进行作业代码化编辑,自行 DDL 建模,运行,调试等 - 数据指标 - 指标管理 — 以指标分类树组织指标资产,支持按指标编码、指标名称、指标类型、状态筛选查询;支持维护基础指标和复合指标,配置英文段名、数据类型、聚合类型、启用状态等信息;支持新增、编辑、删除、启停指标,并可通过 AI 创建生成指标草稿后人工确认保存。 - 指标模型 — 管理面向指标计算落地的模型配置,支持维护模型编码、模型名称、宽表名称、宽表表名、刷新类型、调度类型和状态;支持 AI 创建指标模型,启用后生成宽表并按模型配置产出数据,支持手动执行、周期调度、取消执行、禁用、查看模型和删除;支持查看模型执行记录、执行 SQL、执行日志、耗时、记录数和错误信息。 - 调度中心 - 调度管理 — 对生产作业进行流程编辑,可视化调度 - 调度记录 — 查看调度结果,日志等 - 运维中心 — 对作业执行运维管理 - 资源中心 - Flink 集群实例 — 管理 FLink 资源 - Hadoop 集群配置 — 管理 Hadoop 资源 - Jar 包管理 - 管理用户上传的 Flink 任务 Jar 包 - 配置中心 — 管理 FlinkSql 执行配置 - 数据任务链 - 任务链管理 — 提供任务链的查询与分页列表;支持新增/编辑/删除、发布/取消发布、手动执行;支持按步骤编排顺序执行(步骤可启停、排序、删除),步骤可串联数据集成-DBSwitch、数据集成-Seatunnel、数据集成-API、ETL、数据开发调度等任务;支持按任务类型分页查询并批量添加到步骤,自动去重并做必填与至少一个步骤校验。 - 执行记录 — 提供任务链执行记录的查询与分页列表(支持按任务链名称、触发类型、运行状态、时间范围筛选);支持批量删除记录、运行中停止;支持查看执行详情(总执行日志、各节点实际状态与节点日志),并支持刷新定位问题。 - 数据服务 - API 目录 — 用户自定义 API 目录,动态生成 API,对外提供服务 - API 权限 — 对私有 API 进行授权操作 - API 日志 — 查看 API 调用日志 - 数据治理 - 元数据 - 元模型 — 描述元数据的元数据,主要定义了元数据的属性,通常元模型都是系统内置的,如表元模型,字段元模型等 - 元数据采集 — 根据定义的元模型对元数据进行采集,通常是每一种元模型有自己内置的采集逻辑,可以设置采集周期等 - 元数据管理 — 对采集的元数据进行查看和管理 - 数据血缘 — 通过数据接入,数据生产流程之间的关系自动构建数据血缘关系图,追溯数据流向 - 数据标准 - 标准管理 — 管理数据标准 - 标准清洗 — 配置清洗方式 - 标准日志 — 清洗产生的日志 - 数据质量 - 质量规则 — 质量规则维护 - 检测日志 —检测日志查看 - 错误主题库 — 错误结果查看和修正 - 主数据管理 - 主数据模型 — 主数据建模,发布,维护 - 主数据派发 — 建立派发任务,派发主数据到下游系统接口,消息对接,数据表 - 数据标签 - 标签类型 — 自定义标签类型 - 标签实体 —自定义标签对象实体,标签的数据载体 - 标签类目 — 管理标签类目,创建标签 - 即席查询 — 根据标签即席查询,导出 - 数据推送 - 推送配置 — 自定义数据推送配置,设置推送任务的 SDK 代码类路径 - 推送任务 — 查看推送任务执行情况和日志 - 数据预警 - 预警指标 —新增预警指标,设置预警日志,监测脚本等 - 预警通知 — 查看预警通知,处理通知,查看实证数据等 - 数据资产 - 资源管理 — 自定义资源目录,在每个目录下自定义资源,挂在数据库,api等 - 资产总览 — 对中台资源做一个总的统计概览 - 数据集市 - 资源目录 — 中台资源目录以及目录下资源的查看,可对资源进行申请操作 - API 目录 — 中台 API 目录以及目录下 API 的查看,可对 API 进行申请 - 我的申请 — 可以查看自己的申请记录,审批结果 - 服务审批 — 管理员对其他角色的申请做出审批,若审批通过,申请人便可以收到审批通过的消息,使用自己申请的服务资源 - 数据安全 - 安全等级 — 内置四种安全等级:公开,内部,机密,绝密,支持自定义安全等级,设置表和字段的访问权限 - 脱敏规则 — 自定义字段脱敏规则,脱敏类型有掩码,替换,加密,哈希四种 - 数据权限 — 用于配置数据表和字段的访问权限,配置生效后将对以下场景进行权限控制: 数据集成的贴源数据查询、数据集成-数据填报的录入查询、数据开发的数据表访问、数据治理-数据标签的即席查询、数据服务的API查询结果 - 全局管理 - 数据项目管理 — 中台项目(租户)的管理,每个项目下可以关联用户,用户只能查看自己关联的项目下的数据,选择自己的数据仓库,所有的模块数据都会有所属项目 - 数仓分层展示 — 对中台数仓的分成做展示说明 - 应用管理 - 消息管理 - 短信平台 — 集成短信平台,支持阿里,腾讯等常用的短信平台 - 短信日志 — 调用短信所产生的日志 - 日志管理 - 登录日志 — 系统登录产生的日志 - 审计日志 — 记录用户在平台产生的操作日志 - 系统管理 - 用户管理 — 对系统用户进行管理 - 菜单管理 — 对系统菜单进行管理,用于实现动态菜单 - 定时任务 — 可自定义定时任务,调度执行 - 数据字典 — 系统的字典数据 - 机构管理 — 机构数据,若各模块中的数据有所属机构概念,可用于数据权限管理 - 岗位管理 — 岗位的管理 - 角色管理 — 角色管理,可以为每个角色自定义菜单查看权限以及机构级的数据权限 - 附件管理 — 系统附件管理,可以上传下载 - AI 助手 — 本地部署的 AI 助手,可以与之交流对话,解决问题 ## 系统核心技术栈 前台: - vue3 - vite - typeScript - element-plus - pinia - 。。。 后台: - Spring Cloud Alibaba - SpringSecurity - Spring Cloud Gateway - SpringBoot - Nacos2.5.1 - Redis5.x - Mybatis-Plus - mysql8.0 - tidb - doris - flink - flink cdc - flink sql - neo4j - langchain4j - 。。。 ## 系统运行方式 ### 下载Nacos 需要从GitHub下载Nacos,下载地址:https://github.com/alibaba/nacos/releases 下载2.5.1版本,因为本项目使用的是Nacos 2.5.1,如果版本号对应不上,后面项目启动可能会出错。 也可以直接从我分享的网盘链接中下载:数睿通相关安装包\nacos安装包 ### 修改Nacos的配置文件 直接将【conf/application.properties】文件全量替换成如下内容: ```bash # # Copyright 1999-2021 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. # #*************** Spring Boot Related Configurations ***************# ### Default web context path: server.servlet.contextPath=/nacos ### Include message field server.error.include-message=ALWAYS ### Default web server port: server.port=8848 #*************** Network Related Configurations ***************# ### If prefer hostname over ip for Nacos server addresses in cluster.conf: # nacos.inetutils.prefer-hostname-over-ip=false ### Specify local server's IP: nacos.inetutils.ip-address=127.0.0.1 #*************** Config Module Related Configurations ***************# ### If use MySQL as datasource: ### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced. # spring.datasource.platform=mysql # spring.sql.init.platform=mysql ### Count of DB: # db.num=1 ### Connect URL of DB: # db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC # db.user.0=nacos # db.password.0=nacos ### Connection pool configuration: hikariCP db.pool.config.connectionTimeout=30000 db.pool.config.validationTimeout=10000 db.pool.config.maximumPoolSize=20 db.pool.config.minimumIdle=2 ### the maximum retry times for push nacos.config.push.maxRetryTime=50 #*************** Naming Module Related Configurations ***************# ### If enable data warmup. If set to false, the server would accept request without local data preparation: # nacos.naming.data.warmup=true ### If enable the instance auto expiration, kind like of health check of instance: # nacos.naming.expireInstance=true ### Add in 2.0.0 ### The interval to clean empty service, unit: milliseconds. # nacos.naming.clean.empty-service.interval=60000 ### The expired time to clean empty service, unit: milliseconds. # nacos.naming.clean.empty-service.expired-time=60000 ### The interval to clean expired metadata, unit: milliseconds. # nacos.naming.clean.expired-metadata.interval=5000 ### The expired time to clean metadata, unit: milliseconds. # nacos.naming.clean.expired-metadata.expired-time=60000 ### The delay time before push task to execute from service changed, unit: milliseconds. # nacos.naming.push.pushTaskDelay=500 ### The timeout for push task execute, unit: milliseconds. # nacos.naming.push.pushTaskTimeout=5000 ### The delay time for retrying failed push task, unit: milliseconds. # nacos.naming.push.pushTaskRetryDelay=1000 ### Since 2.0.3 ### The expired time for inactive client, unit: milliseconds. # nacos.naming.client.expired.time=180000 #*************** CMDB Module Related Configurations ***************# ### The interval to dump external CMDB in seconds: # nacos.cmdb.dumpTaskInterval=3600 ### The interval of polling data change event in seconds: # nacos.cmdb.eventTaskInterval=10 ### The interval of loading labels in seconds: # nacos.cmdb.labelTaskInterval=300 ### If turn on data loading task: # nacos.cmdb.loadDataAtStart=false #***********Metrics for tomcat **************************# server.tomcat.mbeanregistry.enabled=true #***********Expose prometheus and health **************************# #management.endpoints.web.exposure.include=prometheus,health ### Metrics for elastic search management.metrics.export.elastic.enabled=false #management.metrics.export.elastic.host=http://localhost:9200 ### Metrics for influx management.metrics.export.influx.enabled=false #management.metrics.export.influx.db=springboot #management.metrics.export.influx.uri=http://localhost:8086 #management.metrics.export.influx.auto-create-db=true #management.metrics.export.influx.consistency=one #management.metrics.export.influx.compressed=true #*************** Access Log Related Configurations ***************# ### If turn on the access log: server.tomcat.accesslog.enabled=true ### file name pattern, one file per hour server.tomcat.accesslog.rotate=true server.tomcat.accesslog.file-date-format=.yyyy-MM-dd-HH ### The access log pattern: server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i ### The directory of access log: server.tomcat.basedir=file:. #*************** Access Control Related Configurations ***************# ### If enable spring security, this option is deprecated in 1.2.0: #spring.security.enabled=false ### The ignore urls of auth nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/** ### The auth system to use, currently only 'nacos' and 'ldap' is supported: nacos.core.auth.system.type=nacos ### If turn on auth system: nacos.core.auth.enabled=true ### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay. nacos.core.auth.caching.enabled=true ### Since 1.4.1, Turn on/off white auth for user-agent: nacos-server, only for upgrade from old version. nacos.core.auth.enable.userAgentAuthWhite=false ### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false. ### The two properties is the white list for auth and used by identity the request from other server. nacos.core.auth.server.identity.key=nacos nacos.core.auth.server.identity.value=srtnacos ### worked when nacos.core.auth.system.type=nacos ### The token expiration in seconds: nacos.core.auth.plugin.nacos.token.cache.enable=false nacos.core.auth.plugin.nacos.token.expire.seconds=18000 ### The default token (Base64 String): nacos.core.auth.plugin.nacos.token.secret.key=YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwYWJjZGVmZ2hpams= ### worked when nacos.core.auth.system.type=ldap,{0} is Placeholder,replace login username #nacos.core.auth.ldap.url=ldap://localhost:389 #nacos.core.auth.ldap.basedc=dc=example,dc=org #nacos.core.auth.ldap.userDn=cn=admin,${nacos.core.auth.ldap.basedc} #nacos.core.auth.ldap.password=admin #nacos.core.auth.ldap.userdn=cn={0},dc=example,dc=org #nacos.core.auth.ldap.filter.prefix=uid #nacos.core.auth.ldap.case.sensitive=true #nacos.core.auth.ldap.ignore.partial.result.exception=false #*************** Control Plugin Related Configurations ***************# # plugin type #nacos.plugin.control.manager.type=nacos # local control rule storage dir, default ${nacos.home}/data/connection and ${nacos.home}/data/tps #nacos.plugin.control.rule.local.basedir=${nacos.home} # external control rule storage type, if exist #nacos.plugin.control.rule.external.storage= #*************** Config Change Plugin Related Configurations ***************# # webhook #nacos.core.config.plugin.webhook.enabled=false # It is recommended to use EB https://help.aliyun.com/document_detail/413974.html #nacos.core.config.plugin.webhook.url=http://localhost:8080/webhook/send?token=*** # The content push max capacity ,byte #nacos.core.config.plugin.webhook.contentMaxCapacity=102400 # whitelist #nacos.core.config.plugin.whitelist.enabled=false # The import file suffixs #nacos.core.config.plugin.whitelist.suffixs=xml,text,properties,yaml,html # fileformatcheck,which validate the import file of type and content #nacos.core.config.plugin.fileformatcheck.enabled=false #*************** Istio Related Configurations ***************# ### If turn on the MCP server: nacos.istio.mcp.server.enabled=false #*************** Core Related Configurations ***************# ### set the WorkerID manually # nacos.core.snowflake.worker-id= ### Member-MetaData # nacos.core.member.meta.site= # nacos.core.member.meta.adweight= # nacos.core.member.meta.weight= ### MemberLookup ### Addressing pattern category, If set, the priority is highest # nacos.core.member.lookup.type=[file,address-server] ## Set the cluster list with a configuration file or command-line argument # nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809 ## for AddressServerMemberLookup # Maximum number of retries to query the address server upon initialization # nacos.core.address-server.retry=5 ## Server domain name address of [address-server] mode # address.server.domain=jmenv.tbsite.net ## Server port of [address-server] mode # address.server.port=8080 ## Request address of [address-server] mode # address.server.url=/nacos/serverlist #*************** JRaft Related Configurations ***************# ### Sets the Raft cluster election timeout, default value is 5 second # nacos.core.protocol.raft.data.election_timeout_ms=5000 ### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute # nacos.core.protocol.raft.data.snapshot_interval_secs=30 ### raft internal worker threads # nacos.core.protocol.raft.data.core_thread_num=8 ### Number of threads required for raft business request processing # nacos.core.protocol.raft.data.cli_service_thread_num=4 ### raft linear read strategy. Safe linear reads are used by default, that is, the Leader tenure is confirmed by heartbeat # nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe ### rpc request timeout, default 5 seconds # nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000 #*************** Distro Related Configurations ***************# ### Distro data sync delay time, when sync task delayed, task will be merged for same data key. Default 1 second. # nacos.core.protocol.distro.data.sync.delayMs=1000 ### Distro data sync timeout for one sync data, default 3 seconds. # nacos.core.protocol.distro.data.sync.timeoutMs=3000 ### Distro data sync retry delay time when sync data failed or timeout, same behavior with delayMs, default 3 seconds. # nacos.core.protocol.distro.data.sync.retryDelayMs=3000 ### Distro data verify interval time, verify synced data whether expired for a interval. Default 5 seconds. # nacos.core.protocol.distro.data.verify.intervalMs=5000 ### Distro data verify timeout for one verify, default 3 seconds. # nacos.core.protocol.distro.data.verify.timeoutMs=3000 ### Distro data load retry delay when load snapshot data failed, default 30 seconds. # nacos.core.protocol.distro.data.load.retryDelayMs=30000 ### enable to support prometheus service discovery #nacos.prometheus.metrics.enabled=true ### Since 2.3 #*************** Grpc Configurations ***************# ## sdk grpc(between nacos server and client) configuration ## Sets the maximum message size allowed to be received on the server. #nacos.remote.server.grpc.sdk.max-inbound-message-size=10485760 ## Sets the time(milliseconds) without read activity before sending a keepalive ping. The typical default is two hours. #nacos.remote.server.grpc.sdk.keep-alive-time=7200000 ## Sets a time(milliseconds) waiting for read activity after sending a keepalive ping. Defaults to 20 seconds. #nacos.remote.server.grpc.sdk.keep-alive-timeout=20000 ## Sets a time(milliseconds) that specify the most aggressive keep-alive time clients are permitted to configure. The typical default is 5 minutes #nacos.remote.server.grpc.sdk.permit-keep-alive-time=300000 ## cluster grpc(inside the nacos server) configuration #nacos.remote.server.grpc.cluster.max-inbound-message-size=10485760 ## Sets the time(milliseconds) without read activity before sending a keepalive ping. The typical default is two hours. #nacos.remote.server.grpc.cluster.keep-alive-time=7200000 ## Sets a time(milliseconds) waiting for read activity after sending a keepalive ping. Defaults to 20 seconds. #nacos.remote.server.grpc.cluster.keep-alive-timeout=20000 ## Sets a time(milliseconds) that specify the most aggressive keep-alive time clients are permitted to configure. The typical default is 5 minutes #nacos.remote.server.grpc.cluster.permit-keep-alive-time=300000 ## open nacos default console ui #nacos.console.ui.enabled=true ``` ### 启动Nacos ```bash Windows: startup.cmd -m standalone Linux: sh startup.sh -m standalone ``` 访问Nacos管理界面(http://localhost:8848/nacos) ,初次登录,输入用户名/密码 nacos/srtnacos,会自动将输入的密码设置为初始密码,如果你输入的密码不是 srtnacos,记下来,每个服务的 bootstrap.yml 文件需要配置 nacos 的用户名和密码,需要逐个修改成你自己输入的密码,默认配置的是 nacos/srtnacos ### 创建系统数据库 创建 `srt_cloud` 数据库,数据库编码为`utf8mb4` 执行`db/srt_cloud.sql`文件,初始化数据库脚本 ### 导入Nacos配置文件 导入Nacos配置文件,配置文件在项目里,文件名为:【deploy/nacos_config.zip】,如下所示: ![nacos-config](/images/nacos-config.png) 导入配置文件后,还需要在Nacos里,修改application-dev.yml,如:Redis(提前装好)、MySQL(提前装好)信息等 ## IDEA Maven 构建异常说明 ### 偶发出现“无法访问 BaseService”等类访问错误 在 IDEA 的 Maven 面板中执行 `mvn clean install -P jar` 时,如果偶发出现类似下面的编译错误: ```text 无法访问 BaseService ``` 并且报错位置可能在不同模块之间变化,例如: - `srt-cloud-develop-data-chain` 中调用 `DataProductionScheduleService` 时报错; - `srt-cloud-system` 中调用 `SysAuditLogService` 时报错; - 源码中对应类实际存在,重新构建后又可能换成其他类报错。 这类问题通常不是源码缺类,也不是简单的 POM 依赖缺失。当前项目是多模块 Maven 工程,内部模块版本统一为 `2.0.0`,IDEA 触发 Maven 构建时,Maven compiler 的增量编译判断有时会使用不完整或过期的编译状态,导致下游模块编译时出现“类明明存在但无法访问”的假性错误。 建议在 IDEA 中关闭 Maven compiler 的增量编译: ```text Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Runner -> VM Options ``` 添加参数: ```text -Dmaven.compiler.useIncrementalCompilation=false ``` 同时确认 `JRE` 使用项目 JDK 17。 命令行构建时也可以显式添加该参数: ```bash mvn -P jar -DskipTests -Dmaven.compiler.useIncrementalCompilation=false clean install ``` 如果只是验证某个模块及其上游依赖,可以从 `srt-cloud` 目录执行: ```bash mvn -P jar -DskipTests -Dmaven.compiler.useIncrementalCompilation=false -pl srt-cloud-system -am compile ``` 其中: - `-pl` 指定要构建的模块; - `-am` 会同时构建该模块依赖的上游模块; - `-Dmaven.compiler.useIncrementalCompilation=false` 用于关闭 Maven compiler 增量编译判断,提高多模块构建稳定性。 如果已经多次失败,可以先删除本地 Maven 仓库中的内部模块产物后再重新构建,例如: ```text D:\maven-repository\net\srt ``` 注意:`mvn clean` 只会清理当前工程各模块的 `target` 目录,不会清理本地 Maven 仓库。 ## AI 助手配置 本版本的 AI 助手公共代码已移动到 `srt-cloud-framework/srt-cloud-common` 模块下,核心接口和实现包括: - `net.srt.framework.common.ai.AiChatService` - `net.srt.framework.common.ai.AiProperties` - `net.srt.framework.common.ai.impl.AiChatServiceImpl` 当前支持两种 AI 接入方式: - `ollama`:本地 Ollama 模型服务; - `openai`:OpenAI API 或 OpenAI 兼容接口。 AI 助手不再要求必须下载或创建固定的 `srt:2.0` 模型,只需要配置一个可用的模型即可。模型可以是本地 Ollama 模型,也可以是 OpenAI 或其他 OpenAI 兼容服务提供的模型。 AI 配置可以写在 `srt-cloud-framework/srt-cloud-common/src/main/resources/application.yml` 中,也可以在 Nacos 中配置同名配置项。Nacos 配置优先级更高,适合不同环境分别配置模型地址、密钥和超时时间。 ### 配置项说明 ```yaml ai: # AI 类型:ollama/openai type: openai # Ollama 地址或 OpenAI 兼容接口地址 baseUrl: https://api.openai.com/v1 # 模型名称,配置为当前服务可用的模型即可 modelName: gpt-4o-mini # OpenAI 或 OpenAI 兼容接口密钥;ollama 可不填 apiKey: ${OPENAI_API_KEY:} # 最大上下文长度 maxTokens: 100000 # 请求超时时间,单位秒 timeoutSeconds: 120 ``` ### OpenAI 或兼容接口 如果使用 OpenAI API 或 OpenAI 兼容接口,需要配置: ```yaml ai: type: openai baseUrl: https://api.openai.com/v1 modelName: gpt-4o-mini apiKey: your-api-key ``` `baseUrl` 可以替换为兼容 OpenAI 协议的模型服务地址,`modelName` 配置为该服务实际支持的模型名称。 ### Ollama 本地模型 如果使用本地 Ollama,需要先安装 Ollama 并准备一个可用模型。访问官网获取安装包与指引:https://ollama.com 安装完成后在终端执行: ```shell ollama --version ``` 出现版本号即安装成功。 可以使用已有模型,也可以自行创建模型。只要 `modelName` 和 Ollama 中可用的模型名称一致即可,例如: ```yaml ai: type: ollama baseUrl: http://127.0.0.1:11434 modelName: qwen2.5:7b apiKey: ``` 查看本机已有模型: ```shell ollama list ``` 运行模型并交互验证: ```shell ollama run qwen2.5:7b ``` 如果需要使用项目提供的数睿通模型包,也可以进入存放 `Modelfile` 的目录后执行: ```shell ollama create srt:2.0 -f Modelfile ``` 然后将 `ai.modelName` 配置为 `srt:2.0`。这只是可选方式,不是必须步骤。 常见问题: - 路径错误:确认进入到包含 `Modelfile` 的目录执行 `ollama create` 命令; - 命令不可用:确认安装成功并能输出 `ollama --version`; - 模型不可用:确认 `ollama list` 中存在与 `ai.modelName` 一致的模型; - 性能不足:尝试使用更低参数量或更低量化版本的模型。 ## 启动后端 把系统导入 idea,注意部分 jdbc 驱动包 maven 官方仓库不存在,需要手动在本地 mvn install 一下,lib 包在代码的 srt-cloud-framework/srt-cloud-dbswitch/lib 目录下,srt-cloud-dbswitch 的 pom 文件的每个依赖上面都有安装命令 #### 启动 srt-cloud-gateway 运行 GatewayApplication.java #### 启动 srt-cloud-system 运行 SystemApplication.java #### 启动 srt-cloud-data-integrate 运行 DataIntegrateApplication.java #### 启动 srt-cloud-develop-server 运行 DataDevelopmentApplication.java #### 启动 srt-cloud-develop-flink-1.18 运行 DevelopFlink118Application.java #### 启动 srt-cloud-develop-flink-2.01 运行 DevelopFlink201Application.java #### 启动 srt-cloud-data-service 运行 DataServiceApplication.java #### 启动 srt-cloud-data-governance 运行 DataGovernanceApplication.java #### 启动 srt-cloud-data-assets 运行 DataAssetsApplication.java #### 启动 srt-cloud-quartz 运行 QuartzApplication.java #### 启动 srt-cloud-message 运行 MessageApplication.java #### 启动 srt-cloud-monitor 运行 MonitorAdminApplication.java #### 启动 srt-cloud-data-bi 运行 DataBiApplication.java ## 启动前端 安装版本号为`16.15.0`的`nodejs`,如果已经安装了,请先卸载,推荐使用 nvm 安装 node.js,方便切换不同版本 1. 需要先把本地安装的`nodejs`卸载,然后再下载nvm,地址: https://github.com/coreybutler/nvm-windows/releases 2. 一般情况,找到最新版本,然后下载`nvm-setup.exe`文件就可以了,下载后,我们双击安装即可。 3. 我们使用`PowerShell`打开命令行,这里需要注意下,要使用`管理员`身份打开`PowerShell` 4. 命令`nvm version` ,可以查看版本号 5. 命令`nvm ls available`查看`nodejs`可用的版本 6. 命令`nvm install 16.15.0`,可以安装版本号为`16.15.0`的`nodejs` 7. 命令`nvm list`,可以查看已安装的版本号 8. 命令`nvm use 16.15.0`,可以切换到版本号为`16.15.0`的`nodejs`,现在就可以通过命令`node -v`查看当前的`nodejs`版本号 9. 命令`nvm uninstall 16.15.0`,可以卸载版本号为`16.15.0`的`nodejs` 用 vscode 或 hbuildx 分别打开 srt-cloud-web(数睿通2.0平台),srt-cloud-bi(bi可视化平台) 安装依赖: ```bash npm install ``` 运行项目: ```bash npm run dev ``` 打包项目 ```bash npm run build ``` ## 系统运行展示 ![image-20221030205835569](/images/login.png) ![](/images/首页.png) ![image-20221030210227005](/images/数据库管理.png) ![image-20221030210420292](/images/修改数据库.png) ![image-20221030210549858](/images/查看库表.png) ![image-20221030210702083](/images/数据接入.png) ![image-20221030210802981](/images/接入查看.png) ![image-20221030210913467](/images/接入编辑.png) ![image-20221030211158654](/images/执行记录.png) ![image-20221030211424876](/images/同步结果.png) ![数据生产-sql](/images/数据生产-sql.png) ![数据生产-flinksql校验](/images/数据生产-flinksql校验.png) ![数据生产-msyql-cdc](/images/数据生产-mysql-cdc.png) ![数据生产-调度](/images/数据生产-调度.png) ![数据生产-执行](/images/数据生产-执行.png) ![运维中心](/images/运维中心.png) ![元模型](/images/元模型.png) ![元数据采集](/images/元数据采集.png) ![元数据采集记录](/images/元数据采集记录.png) ![采集日志](/images/采集日志.png) ![元数据管理](/images/元数据管理.png) ![数据血缘](/images/数据血缘.png) ![ETL工具箱](/images/ETL工具箱.png) ![ETL流程](/images/ETL流程.png) ![BI大屏列表](/images/BI大屏列表.png) ![BI大屏设计器](/images/BI大屏设计器.png) ## 帮助支持 想要了解更多的朋友请关注公众号 **螺旋编程极客** 添加作者微信或在菜单栏加入知识星球,一起进步,一起成长。