mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
Initial commit: reorganized source tree
- backend/: 13 Maven modules (cw-elevator-application, cloudwalk-cloud, intelligent-cwoscomponent, ninca-crk, etc.) - frontend/: 4 Vue projects (elevator-front, cwos-portal, alarm-front, front_acs) + decompiled + scripts - scripts/: build, test-env, tools (Docker Compose, service templates, API parity) - docs/: AGENTS.md, superpowers specs, architecture docs - .gitignore: standard Java/Maven exclusions Moved from legacy maven-*/ root layout to backend/ organized structure.
This commit is contained in:
+179
@@ -0,0 +1,179 @@
|
||||
# =============================================================================
|
||||
# 组织组件本地/测试启动覆盖配置
|
||||
# 加载顺序(后者覆盖前者):classpath → file:部署包/…/BOOT-INF/classes/
|
||||
# → 本目录(见 run-verify.sh 中 spring.config.location)
|
||||
# 部署包参考:
|
||||
# ../部署包/ninca_common_component_organization_01-ninca_common_component_organization/application.properties
|
||||
# ../部署包/…/ninca-common-component-organization-V2.9.2_20210730/BOOT-INF/classes/application.properties
|
||||
# =============================================================================
|
||||
|
||||
# --- 本地/测试强制覆盖 ---
|
||||
spring.application.name=ninca-common-component-organization
|
||||
server.port=17026
|
||||
server.instance-id=component-organization-verify-local
|
||||
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=123456
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mysql://192.168.3.12:3307/component-organization?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||
|
||||
eureka.client.enabled=false
|
||||
spring.cloud.consul.enabled=false
|
||||
spring.cloud.consul.discovery.enabled=false
|
||||
|
||||
spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6380
|
||||
spring.redis.password=1qaz!QAZ
|
||||
spring.redis.database=6
|
||||
spring.redis.timeout=5000
|
||||
spring.redis.pool.max-wait=-1
|
||||
spring.redis.pool.max-active=200
|
||||
spring.redis.pool.min-idle=0
|
||||
spring.redis.pool.max-idle=8
|
||||
|
||||
logging.path=/tmp/ninca-component-org-verify-logs
|
||||
logging.level.root=INFO
|
||||
|
||||
# 日志实现由 run-verify.sh 传入 --logging.config=file:…/recognition-logback.xml(勿在此处写 classpath:recognition-logback.xml,以免覆盖失效)
|
||||
|
||||
# --- Spring 通用(与部署包一致)---
|
||||
spring.jackson.time-zone=GMT+8
|
||||
spring.http.encoding.charset=UTF-8
|
||||
spring.http.encoding.enabled=true
|
||||
spring.http.encoding.force=true
|
||||
|
||||
# --- i18n(BOOT-INF 同名)---
|
||||
spring.messages.basename=messages_zh_CN,component-account/messages_zh_CN,component-resource/messages_zh_CN,core-aggregate/messages_zh_CN,core-device/messages_zh_CN,devicesdk/messages_zh_CN,component-org/messages_zh_CN
|
||||
|
||||
# --- 上传限制 ---
|
||||
cloudwalk.multipart.maxFileSize=50MB
|
||||
cloudwalk.multipart.maxRequestSize=50MB
|
||||
|
||||
# --- Quartz(占位符引用当前数据源)---
|
||||
quartz.driver=${spring.datasource.driver-class-name}
|
||||
quartz.url=${spring.datasource.url}
|
||||
quartz.user=${spring.datasource.username}
|
||||
quartz.password=${spring.datasource.password}
|
||||
quartz.maxConnections=20
|
||||
quartz.schedulerName=${spring.application.name}
|
||||
quartz.clustered=true
|
||||
quartz.strategy=local
|
||||
quartz.lazyStart=120
|
||||
quartz.pool-type=druid
|
||||
|
||||
# --- 注册照质量分 ---
|
||||
imageQualityScore=0.65
|
||||
|
||||
# --- 本机验证路径(替代部署包 /data/cwos/…)---
|
||||
cloudwalk.common-app.download.downDir=/tmp/ninca-component-org-verify/download
|
||||
cloudwalk.component.file.urlPrefix=http://127.0.0.1:${server.port}/ninca-common-component-organization/file/imgByPath?path=
|
||||
qr.code.url=http://127.0.0.1:${server.port}/general-person-h5/#/register?businessId=
|
||||
|
||||
# --- Feign 服务名(与部署包一致;上游需注册或可改 ribbon list)---
|
||||
feign.davinci-portal.name=cwos-portal
|
||||
feign.resource.name=cwos-portal
|
||||
feign.portal.name=cwos-portal
|
||||
feign.device.name=cwos-portal
|
||||
feign.pineapple.name=cloudwalk-pineapple-manager
|
||||
|
||||
# --- 定时任务 cron ---
|
||||
cloudwalk.imageStore.person.cron=0 */2 * * * ?
|
||||
cloudwalk.imageStore.imageSync.cron=0 */2 * * * ?
|
||||
|
||||
# --- 导出限制(部署包数值)---
|
||||
cloudwalk.common-app.download.excelMaxRows=10000
|
||||
cloudwalk.common-app.download.exportAllCount=100000
|
||||
cloudwalk.common-app.download.shardingSize=31457280
|
||||
cloudwalk.common-app.download.compressionType=.zip
|
||||
|
||||
# --- Kafka(测试环境:未起 Kafka 时可改为本机或注释依赖;此处保留部署包结构便于对齐)---
|
||||
cloudwalk.component-organization.kafka.service-code=imgstoreApp
|
||||
cloudwalk.component-organization.kafka.producer.groupId=component-organization
|
||||
cloudwalk.component-organization.kafka.consumer.groupId=component-organization
|
||||
# 覆盖 BOOT-INF 内网地址:可按 env.sh / Docker 修改
|
||||
cloudwalk.component-organization.kafka.producer.bootstrapServers=127.0.0.1:9092
|
||||
cloudwalk.component-organization.kafka.consumer.bootstrapServers=127.0.0.1:9092
|
||||
|
||||
person.name.space=componentOrg
|
||||
|
||||
# --- Management(与部署包规律:业务端口 +100)---
|
||||
management.port=17126
|
||||
management.context-path=/actuator
|
||||
management.security.enabled=false
|
||||
endpoints.enabled=false
|
||||
endpoints.info.enabled=true
|
||||
endpoints.health.enabled=true
|
||||
endpoints.prometheus.enabled=true
|
||||
|
||||
# --- 图库同步(线程池取部署包「根目录」application.properties 较大规格,便于压测对齐)---
|
||||
group-person.syn.config.task_is_all.threshold=100
|
||||
group-person.syn.config.lock-handle-syn-task-second=150
|
||||
ninca.group.person.syn.pool.corePoolSize=40
|
||||
ninca.group.person.syn.pool.maxPoolSize=80
|
||||
ninca.group.person.syn.pool.queueCapacity=1000
|
||||
ninca.group.person.syn.pool.keepAliveSeconds=150
|
||||
ninca.group.person.syn.pool.allowCoreThreadTimeOut=true
|
||||
group-person.delete.keep.days=7
|
||||
|
||||
device.report.thread.corePoolSize=20
|
||||
device.report.thread.maxPoolSize=40
|
||||
device.report.thread.queueCapacity=500
|
||||
device.report.thread.keepAliveSeconds=150
|
||||
device.report.thread.allowCoreThreadTimeOut=true
|
||||
|
||||
device.group.change.thread.corePoolSize=20
|
||||
device.group.change.thread.maxPoolSize=40
|
||||
device.group.change.thread.queueCapacity=500
|
||||
device.group.change.thread.keepAliveSeconds=150
|
||||
device.group.change.thread.allowCoreThreadTimeOut=true
|
||||
|
||||
handle.image.thread.corePoolSize=40
|
||||
handle.image.thread.maxPoolSize=160
|
||||
handle.image.thread.queueCapacity=2000
|
||||
handle.image.thread.keepAliveSeconds=150
|
||||
handle.image.thread.allowCoreThreadTimeOut=true
|
||||
|
||||
ninca.picture.revision.pool.corePoolSize=5
|
||||
ninca.picture.revision.pool.maxPoolSize=5
|
||||
ninca.picture.revision.pool.queueCapacity=100000
|
||||
ninca.picture.revision.pool.keepAliveSeconds=150
|
||||
ninca.picture.revision.pool.allowCoreThreadTimeOut=true
|
||||
|
||||
device.report.approach.time.diff.milliseconds=1000
|
||||
device.person.sync.time.diff.minutes=60
|
||||
cwos.image.store.sync.log=false
|
||||
device.group.pull.time.diff.minutes=10
|
||||
|
||||
ribbon.ReadTimeout=10000
|
||||
ribbon.ConnectTimeout=10000
|
||||
|
||||
# --- 图片 / 人脸像素限制 ---
|
||||
image.size.min=10240
|
||||
image.size.max=3145728
|
||||
image.width.min=30
|
||||
image.width.max=400
|
||||
image.height.min=30
|
||||
image.height.max=400
|
||||
face.width.min=100
|
||||
face.width.max=400
|
||||
face.height.min=100
|
||||
face.height.max=400
|
||||
|
||||
revision.engine.port=20010
|
||||
group-person.syn.config.delay-add-validate-data=false
|
||||
group-person.syn.config.delay-add-validate-hour=48
|
||||
group-person.syn.config.delay-handle-validate.cron=1 0 0 /1 * ? *
|
||||
group-person.syn.config.handle-group-face-exception.cron=0 */5 * * * ?
|
||||
|
||||
# --- 星河湾业务常量(与部署包根目录 application.properties 一致)---
|
||||
xhwId=21474e012cd14e26bc62771873b22562
|
||||
xhwDefaultFloorId=605560547135455232
|
||||
xhwSixFloorId=605560541473144832
|
||||
support.muti.group.device.type=CW-IS1330,-8,MTD8
|
||||
|
||||
# --- cloudwalk-common-serial(UUIDSerial / Snowflake;与电梯应用一致)---
|
||||
cloudwalk.serial.enabled=true
|
||||
cloudwalk.serial.serial-length=8
|
||||
cloudwalk.serial.serial-type=redis
|
||||
cloudwalk.serial.serial-redis-key=CLOUDWALK-ACS-SERIAL-KEY
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# 与部署包一致:Feign + Hystrix(来源:部署包/bootstrap.properties = BOOT-INF/classes/bootstrap.properties)
|
||||
feign.hystrix.enabled=true
|
||||
hystrix.command.default.circuitBreaker.errorThresholdPercentage=50
|
||||
hystrix.command.default.circuitBreaker.enabled=true
|
||||
hystrix.command.default.execution.isolation.strategy=THREAD
|
||||
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=120000
|
||||
hystrix.threadpool.default.coreSize=100
|
||||
hystrix.threadpool.default.maximumSize=1000
|
||||
hystrix.threadpool.default.allowMaximumSizeToDivergeFromCoreSize=true
|
||||
hystrix.threadpool.default.maxQueueSize=-1
|
||||
hystrix.threadpool.default.execution.isolation.thread.timeoutInMilliseconds=60000
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--debug 实时查看logback运行状态,默认值为false-->
|
||||
<!--scan 配置文件将每分钟扫描一次更改,配置文件如果发生改变,将会被重新加载,默认值为true-->
|
||||
<!--scanPeriod 配置文件扫描周期,当不设置单位时默认为毫秒级。-->
|
||||
<!--packagingData 可以在日志后看到依赖jar包名和版本,很费性能,不建议开启 -->
|
||||
<configuration debug="true" scan="true" scanPeriod="30 seconds" packagingData="false">
|
||||
|
||||
<property name="application-name" value="component-organization"/>
|
||||
|
||||
<contextName>${application-name}</contextName>
|
||||
<!--读取spring的配置文件,日志路径-->
|
||||
<springProperty scope="context" name="file_path" source="logging.path" defaultValue="./logs"/>
|
||||
<!--读取spring的配置文件,info级别日志总大小-->
|
||||
<springProperty scope="context" name="info_file_index_max" source="logging.file.info.max-index"
|
||||
defaultValue="20"/>
|
||||
<!--读取spring的配置文件,error级别日志总大小-->
|
||||
<springProperty scope="context" name="error_file_index_max" source="logging.file.error.max-index"
|
||||
defaultValue="20"/>
|
||||
|
||||
<property name="file_name_prefix" value="${file_path}/${application-name}"/>
|
||||
|
||||
<!--控制台打印格式-->
|
||||
<property name="log_pattern"
|
||||
value="[%d{yyyy-MM-dd HH:mm:ss.SSSZ}] [%X{X-B3-TraceId}] [%thread] [%level] [%logger{36}] [%line] %msg%n"/>
|
||||
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log_pattern}</pattern>
|
||||
<charset>utf8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--info-->
|
||||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${file_path}/${application-name}.info.log</file>
|
||||
<encoder>
|
||||
<pattern>${log_pattern}</pattern>
|
||||
</encoder>
|
||||
<!--FixedWindowRollingPolicy 翻转策略, -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${file_name_prefix}.info.%i.log</fileNamePattern>
|
||||
<!--最小索引 例如:fareid-app.error.1.log-->
|
||||
<minIndex>1</minIndex>
|
||||
<!--最大索引 例如:fareid-app.error.20.log-->
|
||||
<maxIndex>${info_file_index_max}</maxIndex>
|
||||
</rollingPolicy>
|
||||
|
||||
<!--如果超过指定大小会告知 RollingFileAppender 触发当前活动文件滚动-->
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<!--每个文件最大保存大小-->
|
||||
<maxFileSize>30MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
<!--error-->
|
||||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${file_path}/${application-name}.error.log</file>
|
||||
<encoder>
|
||||
<pattern>${log_pattern}</pattern>
|
||||
</encoder>
|
||||
<!--FixedWindowRollingPolicy 翻转策略, -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>${file_name_prefix}.error.%i.log</fileNamePattern>
|
||||
<!--最小索引 例如:fareid-app.error.1.log-->
|
||||
<minIndex>1</minIndex>
|
||||
<!--最大索引 例如:fareid-app.error.20.log-->
|
||||
<maxIndex>${error_file_index_max}</maxIndex>
|
||||
</rollingPolicy>
|
||||
|
||||
<!--如果超过指定大小会告知 RollingFileAppender 触发当前活动文件滚动-->
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<!--每个文件最大保存大小-->
|
||||
<maxFileSize>30MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="INFO_FILE"/>
|
||||
<appender-ref ref="ERROR_FILE"/>
|
||||
</root>
|
||||
|
||||
|
||||
</configuration>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# 配置顺序:classpath(fat jar 内)→ 部署包解压的 BOOT-INF/classes(完整业务占位符)
|
||||
# → 本目录 application.properties(测试 MySQL/Redis、关 Consul)。
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/../../../../" && pwd)"
|
||||
source "$REPO_ROOT/scripts/test-env/config/env.sh" 2>/dev/null || true
|
||||
|
||||
JAR="$SCRIPT_DIR/../../target/ninca-common-component-organization-2.9.2-xinghewan.jar"
|
||||
JAVA_BIN="${JAVA_HOME:-/usr/lib/jvm/java-8-openjdk-amd64}/bin/java"
|
||||
|
||||
DEPLOY_CLASSES="$REPO_ROOT/../部署包/ninca_common_component_organization_01-ninca_common_component_organization/ninca-common-component-organization-V2.9.2_20210730/BOOT-INF/classes"
|
||||
if [[ ! -d "$DEPLOY_CLASSES" ]]; then
|
||||
echo "Missing deployment sample classes dir: $DEPLOY_CLASSES" >&2
|
||||
echo "Adjust DEPLOY_CLASSES in this script or unpack the deployment package." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f "$JAR" ]]; then
|
||||
echo "Missing $JAR — run: mvn -pl cwos-component-organization-starter -am package -DskipTests" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$JAVA_BIN" -jar "$JAR" \
|
||||
--spring.config.location="classpath:/,classpath:/config/,file:${DEPLOY_CLASSES}/,file:${SCRIPT_DIR}/" \
|
||||
--spring.cloud.bootstrap.location="file:${SCRIPT_DIR}/bootstrap.properties" \
|
||||
--logging.config="file:${SCRIPT_DIR}/recognition-logback.xml" \
|
||||
--spring.main.banner-mode=off \
|
||||
"$@"
|
||||
Reference in New Issue
Block a user