Browse Source

Merge branch 'wvp-28181-2.0' of https://github.com/TristingChen/wvp-GB28181-pro into wvp-28181-2.0

pull/359/head
chenjialing 3 years ago
parent
commit
10102f4941
  1. 2
      src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java
  2. 74
      src/main/resources/application-local.yml
  3. 12
      web_src/src/components/control.vue

2
src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java

@ -3,7 +3,7 @@ package com.genersoft.iot.vmp.storager.dao;
import com.genersoft.iot.vmp.gb28181.bean.GbStream; import com.genersoft.iot.vmp.gb28181.bean.GbStream;
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.omg.PortableInterceptor.INACTIVE; // import org.omg.PortableInterceptor.INACTIVE;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Collection; import java.util.Collection;

74
src/main/resources/application-local.yml

@ -11,35 +11,54 @@ spring:
password: password:
# [可选] 超时时间 # [可选] 超时时间
timeout: 10000 timeout: 10000
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置 # [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
# mysql数据源
datasource: datasource:
# 使用mysql 打开23-28行注释, 删除29-36行 type: com.alibaba.druid.pool.DruidDataSource
name: wvp driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false
username: root username: root
password: root123 password: root123
type: com.alibaba.druid.pool.DruidDataSource druid:
driver-class-name: com.mysql.cj.jdbc.Driver initialSize: 10 # 连接池初始化连接数
# name: eiot maxActive: 200 # 连接池最大连接数
# url: jdbc:sqlite::resource:wvp.sqlite minIdle: 5 # 连接池最小空闲连接数
# username: maxWait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置useUnfairLock属性为true使用非公平锁。
# password: keepAlive: true # 连接池中的minIdle数量以内的连接,空闲时间超过minEvictableIdleTimeMillis,则会执行keepAlive操作。
# type: com.alibaba.druid.pool.DruidDataSource validationQuery: select 1 # 检测连接是否有效sql,要求是查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。
# driver-class-name: org.sqlite.JDBC testWhileIdle: true # 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
# journal_mode: WAL testOnBorrow: false # 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
# synchronous: NORMAL testOnReturn: false # 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
# transaction_mode: IMMEDIATE poolPreparedStatements: false # 是否開啟PSCache,並且指定每個連線上PSCache的大小
# max-active: 1 timeBetweenEvictionRunsMillis: 60000 # 配置間隔多久才進行一次檢測,檢測需要關閉的空閒連線,單位是毫秒
# min-idle: 1 minEvictableIdleTimeMillis: 300000 # 配置一個連線在池中最小生存的時間,單位是毫秒
filters: stat,wall,slf4j # 配置监控统计拦截的filters,监控统计用的filter:sta, 日志用的filter:log4j, 防御sql注入的filter:wall
useGlobalDataSourceStat: true # 合并多个DruidDataSource的监控数据
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=1000
#stat-view-servlet.url-pattern: /admin/druid/*
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口 # druid管理监控页面的一些配置
rj-druid-manage:
allow: # 访问druid监控页面的IP白名单
deny: 192.168.1.100 # 访问druid监控页面IP黑名单
loginUsername: rjAdmin # 访问druid监控页面账号
loginPassword: rj@2022 # 访问druid监控页面密码
resetEnable: false # 是否能够重置数据 禁用HTML页面上的“Reset All”功能
#mybatis:
# configuration:
# # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# # 返回类型为Map,显示null对应的字段
# call-setters-on-nulls: true
## [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
server: server:
port: 18080 port: 18080
# 作为28181服务器的配置 # 作为28181服务器的配置
sip: sip:
# [必须修改] 本机的IP # [必须修改] 本机的IP
ip: 192.168.118.212 ip: 192.168.118.70
# [可选] 28181服务监听的端口 # [可选] 28181服务监听的端口
port: 5060 port: 5060
# 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007) # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007)
@ -55,7 +74,7 @@ sip:
#zlm 默认服务器配置 #zlm 默认服务器配置
media: media:
# [必须修改] zlm服务器的内网IP # [必须修改] zlm服务器的内网IP
ip: 127.0.0.1 ip: 192.168.118.70
# [必须修改] zlm服务器的http.port # [必须修改] zlm服务器的http.port
http-port: 80 http-port: 80
# [可选] zlm服务器的hook.admin_params=secret # [可选] zlm服务器的hook.admin_params=secret
@ -72,15 +91,8 @@ media:
record-assist-port: 18081 record-assist-port: 18081
# [可选] 日志配置, 一般不需要改 # [可选] 日志配置, 一般不需要改
logging: logging:
file: config: classpath:logback-spring-local.xml
name: logs/wvp.log
max-history: 30
max-size: 10MB
total-size-cap: 300MB
level:
com.genersoft.iot: debug
com.genersoft.iot.vmp.storager.dao: info
com.genersoft.iot.vmp.gb28181: info
# [根据业务需求配置] # [根据业务需求配置]
user-settings: user-settings:

12
web_src/src/components/control.vue

@ -21,11 +21,11 @@
<div style="position: absolute; right: 1rem; top: 0.3rem;"> <div style="position: absolute; right: 1rem; top: 0.3rem;">
<el-popover placement="bottom" width="900" height="300" trigger="click"> <el-popover placement="bottom" width="900" height="300" trigger="click">
<div style="height: 600px; overflow:auto; padding: 20px"> <div style="height: 600px; overflow:auto; padding: 20px">
<el-descriptions v-for="(value, key, index) in serverConfig" border column="1" style="margin-bottom: 1rem"> <el-descriptions v-for="(value, key, index) in serverConfig" :key="key" border column="1" style="margin-bottom: 1rem">
<template slot="title"> <template slot="title">
{{key}} {{key}}
</template> </template>
<el-descriptions-item v-for="(value1, key1, index1) in serverConfig[key]"> <el-descriptions-item v-for="(value1, key1, index1) in serverConfig[key]" :key="key1">
<template slot="label" > <template slot="label" >
{{ getMediaKeyNameFromKey(key1) }} {{ getMediaKeyNameFromKey(key1) }}
</template> </template>
@ -42,7 +42,7 @@
<template slot="extra"> <template slot="extra">
<el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="JSON.stringify(wvpServerConfig.base)" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button> <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="JSON.stringify(wvpServerConfig.base)" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>
</template> </template>
<el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base" > <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base" :key="key">
<template slot="label" > <template slot="label" >
{{ getNameFromKey(key) }} {{ getNameFromKey(key) }}
</template> </template>
@ -52,7 +52,7 @@
查看<i class="el-icon-arrow-down el-icon--right"></i> 查看<i class="el-icon-arrow-down el-icon--right"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(value, key, index) in wvpServerConfig.base.interfaceAuthenticationExcludes">{{value}}</el-dropdown-item> <el-dropdown-item v-for="(value, key, index) in wvpServerConfig.base.interfaceAuthenticationExcludes" :key="key">{{value}}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
@ -75,7 +75,7 @@
<template slot="extra"> <template slot="extra">
<el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="JSON.stringify(wvpServerConfig.sip)" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button> <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="JSON.stringify(wvpServerConfig.sip)" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>
</template> </template>
<el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip"> <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip" :key="key">
<template slot="label"> <template slot="label">
{{ getNameFromKey(key) }} {{ getNameFromKey(key) }}
</template> </template>
@ -88,7 +88,7 @@
<template slot="extra"> <template slot="extra">
<el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="JSON.stringify(wvpServerVersion)" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button> <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝" v-clipboard="JSON.stringify(wvpServerVersion)" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>
</template> </template>
<el-descriptions-item v-for="(value, key, index) in wvpServerVersion"> <el-descriptions-item v-for="(value, key, index) in wvpServerVersion" :key="key">
<template slot="label"> <template slot="label">
{{ getNameFromKey(key) }} {{ getNameFromKey(key) }}
</template> </template>

Loading…
Cancel
Save