feat: 将项目改为Starter的结构, 为后续开发做扩展准备

This commit is contained in:
2025-04-21 21:59:31 +08:00
parent bd4c374952
commit 2b2864b8df
111 changed files with 162 additions and 177 deletions

View File

@@ -0,0 +1,20 @@
# Spring配置
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://frp.feashow.cn:39306/metis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: yyz@2024
data:
redis:
host: frp.feashow.cn
port: 39379
password: yyz@2024
database: 13
timeout: 10s
lettuce:
pool:
min-idle: 0
max-idle: 8
max-active: 8
max-wait: -1ms

View File

@@ -0,0 +1,20 @@
# Spring配置
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.7.127.190:3306/metis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: yyz@2024
data:
redis:
host: 10.7.127.190
port: 6379
password: yyz@2024
database: 13
timeout: 10s
lettuce:
pool:
min-idle: 0
max-idle: 8
max-active: 8
max-wait: -1ms

View File

@@ -0,0 +1,57 @@
server:
port: 8080
spring:
application:
name: metis
profiles:
active: dev
# MyBatis Plus 配置
mybatis-plus:
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型 0:"数据库ID自增", 1:"不操作", 2:"用户输入ID",3:"数字型snowflake", 4:"全局唯一ID UUID", 5:"字符串型snowflake";
id-type: 3
#字段策略
insert-strategy: not_null
update-strategy: not_null
select-strategy: not_null
#驼峰下划线转换
table-underline: true
logic-delete-field: is_deleted # 全局逻辑删除字段名
logic-delete-value: 1 # 逻辑已删除值
logic-not-delete-value: 0 # 逻辑未删除值
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
springdoc:
swagger-ui:
tags-sorter: alpha
group-configs:
- group: bis
display-name: "业务接口文档"
paths-to-match: '/**'
packages-to-scan: org.shi9.module.bis
- group: system
display-name: "系统接口文档"
paths-to-match: '/**'
packages-to-scan: com.metis.controller
default-flat-param-object: true
knife4j:
# 开启增强配置
enable: true
# 开启生产环境屏蔽如果是生产环境需要把下面配置设置true
# production: true
setting:
language: zh_cn
swagger-model-name: 实体类列表
basic: # 开始授权认证
enable: true
username: admin
password: 123456

View File

@@ -0,0 +1,7 @@
{
"appId": "1909636986931470336",
"userId": 1,
"custom": {
"context": "测试内容!"
}
}

View File

@@ -0,0 +1,152 @@
{
"id": 0,
"name": "测试流程",
"description": "测试流程",
"graph": {
"nodes": [
{
"id": "5",
"type": "start",
"dimensions": {
"width": 300,
"height": 300
},
"draggable": true,
"resizing": false,
"selected": true,
"data": {
"label": "开始",
"toolbarPosition": "right",
"config": {
"variables": [
{
"variable": "context",
"label": "段落",
"type": "paragraph",
"maxLength": 48,
"required": true
},
{
"variable": "text",
"label": "文本",
"type": "text-input",
"maxLength": 48,
"required": true,
"options": []
},
{
"variable": "select",
"label": "下拉",
"type": "select",
"maxLength": 48,
"required": true,
"options": [
{
"label": "选型1",
"value": "1"
},
{
"label": "选型2",
"value": "2"
}
]
},
{
"variable": "number",
"label": "数字",
"type": "number",
"maxLength": 48,
"required": true,
"options": []
},
{
"variable": "singlefile",
"label": "singlefile单文件",
"type": "file",
"maxLength": 48,
"required": true,
"options": [],
"allowedFileUploadMethods": [
"local_file",
"remote_url"
],
"allowedFileTypes": [
"image",
"document",
"audio",
"video"
],
"allowedFileExtensions": []
},
{
"variable": "mufile",
"label": "多文件",
"type": "file-list",
"maxLength": 5,
"required": true,
"options": [],
"allowedFileUploadMethods": [
"local_file"
],
"allowedFileTypes": [
"custom"
],
"allowedFileExtensions": [
"docx",
"aaa"
]
}
],
"parent": "234"
},
"handles": [
{
"id": "7",
"position": "right",
"type": "source",
"connectable": true
}
]
},
"position": { "x": 0, "y": 300 }
},
{
"id": "6",
"type": "end",
"selected": false,
"data": {
"label": "结束",
"toolbarPosition": "right",
"handles": [
{
"id": "8",
"position": "left",
"type": "target",
"connectable": true
}
]
},
"position": { "x": 500, "y": 300 }
}
],
"edges": [
{
"id": "6",
"type": "default",
"source": "5",
"target": "6",
"sourceHandle": "7",
"animated": true,
"targetHandle": "8",
"label": "线标签",
"markerEnd": "none",
"markerStart": "none",
"updatable": true,
"selectable": true,
"deletable": true
}
]
}
}

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SSE Demo</title>
</head>
<body>
<h1>SSE 连接示例</h1>
<div id="messages"></div>
<script> // 创建一个新的EventSource对象连接到SSE服务
const eventSource = new EventSource('http://localhost:8081/sse');
// 监听服务器发送的消息事件
eventSource.onmessage = function(event) {
const message = document.createElement('p');
message.textContent = '收到消息: ' + event.data;
document.getElementById('messages').appendChild(message);
};
// 监听自定义事件(如果有)
eventSource.addEventListener('customEvent', function(event) {
const message = document.createElement('p');
message.textContent = '收到自定义事件: ' + event.data;
document.getElementById('messages').appendChild(message);
});
// 监听连接打开事件
eventSource.onopen = function(event) {
const message = document.createElement('p');
message.textContent = 'SSE连接已建立';
document.getElementById('messages').appendChild(message);
};
// 监听错误事件
eventSource.onerror = function(event) {
const message = document.createElement('p');
message.textContent = 'SSE连接发生错误';
document.getElementById('messages').appendChild(message);
// 在这里处理错误,例如尝试重新连接
};
</script>
</body>
</html>