Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
e373867b
Commit
e373867b
authored
Mar 29, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PC物联监盘数据合并初版功能提交。1.feignClient编写。公共方法编写。
parent
9d4a8623
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
527 additions
and
1 deletion
+527
-1
StationBasicDto.java
...ejoin/amos/boot/module/jxiop/api/dto/StationBasicDto.java
+16
-0
StationBasic.java
...ejoin/amos/boot/module/jxiop/api/entity/StationBasic.java
+15
-1
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+15
-0
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+19
-0
CoreValuesDto.java
...yeejoin/amos/boot/module/jxiop/biz/dto/CoreValuesDto.java
+13
-0
CoreFeignClient.java
...oin/amos/boot/module/jxiop/biz/feign/CoreFeignClient.java
+24
-0
FeignBasicAuthRequestInterceptor.java
...ule/jxiop/biz/feign/FeignBasicAuthRequestInterceptor.java
+56
-0
FeignConfiguration.java
.../amos/boot/module/jxiop/biz/feign/FeignConfiguration.java
+34
-0
FeignErrorDecoder.java
...n/amos/boot/module/jxiop/biz/feign/FeignErrorDecoder.java
+32
-0
CoreCommonService.java
...amos/boot/module/jxiop/biz/service/CoreCommonService.java
+29
-0
CoreCommonServiceImpl.java
.../module/jxiop/biz/service/impl/CoreCommonServiceImpl.java
+55
-0
application-dev1.properties
...onitor-biz/src/main/resources/application-dev1.properties
+174
-0
logback-dev1.xml
...ule-jxiop-monitor-biz/src/main/resources/logback-dev1.xml
+45
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/StationBasicDto.java
View file @
e373867b
...
...
@@ -103,4 +103,20 @@ public class StationBasicDto extends BaseDto {
//升压站网管
private
String
boosterGatewayId
;
/**
* 前置网关配置的场站名称
*/
@ApiModelProperty
(
"网关配置名称"
)
private
String
stationCoreName
;
/**
* 前置配置的升压站名称
*/
@ApiModelProperty
(
"网关配置升压站名称"
)
private
String
boosterCoreName
;
/**
* 装机容量
*/
@ApiModelProperty
(
"装机容量名称"
)
private
Double
installedCapacity
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/entity/StationBasic.java
View file @
e373867b
...
...
@@ -159,5 +159,19 @@ public class StationBasic extends BaseEntity {
*/
@TableField
(
"qrcode_color"
)
private
String
qrcodeColor
;
/**
* 前置网关配置的场站名称
*/
@TableField
(
"station_core_name"
)
private
String
stationCoreName
;
/**
* 前置配置的升压站名称
*/
@TableField
(
"booster_core_name"
)
private
String
boosterCoreName
;
/**
* 装机容量
*/
@TableField
(
"installed_capacity"
)
private
Double
installedCapacity
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
e373867b
...
...
@@ -166,4 +166,19 @@ public class CommonConstans {
public
static
final
String
BIAO_ZHUN_MEI_JIANPAILIANG
=
"节约标准煤(t)"
;
public
static
final
String
TAN_FEN_CHEN_ZHUBIANDIYACE
=
"碳粉尘减排量(t)"
;
public
static
final
String
ER_YANG_HUA_LIU_ZHUBIANDIYACE
=
"二氧化硫减排量(t)"
;
//------------------监盘服务改造新增常量开始------------------------------
//日发电量
public
static
final
String
DAY_POWER_GENERATION
=
"日发电量总和"
;
//月发电量
public
static
final
String
MONTH_POWER_GENERATION
=
"月发电量总和"
;
//年发电量
public
static
final
String
YEAR_POWER_GENERATION
=
"年发电量总和"
;
//年发电量完成率
public
static
final
String
YEAR_GEN_ATTAINMENT_RATE
=
"年计划完成率"
;
//年利用小时数
public
static
final
String
YEAR_GEN_HOURS
=
"年利用小时数"
;
//------------------监盘服务改造新增常量结束------------------------------
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
View file @
e373867b
...
...
@@ -9,19 +9,25 @@ import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.EquipmentsJxiopDocMysqlMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.CoreValuesDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.PointImportDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.QueryDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipmentsJxiopDocMysql
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.Test
;
import
com.yeejoin.amos.boot.module.jxiop.biz.feign.CoreFeignClient
;
import
com.yeejoin.amos.boot.module.jxiop.biz.repository.ESEquipmentsRepository
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.*
;
//import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
//import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
import
com.yeejoin.amos.boot.module.jxiop.biz.utils.ElasticSearchUtil
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.elasticsearch.action.admin.indices.stats.CommonStats
;
import
org.elasticsearch.index.query.QueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.aggregations.Aggregation
;
...
...
@@ -60,6 +66,8 @@ import java.util.*;
@Api
(
tags
=
"Demo-test"
)
@RequestMapping
(
value
=
"/demo"
)
public
class
DemoController
extends
BaseController
{
@Autowired
private
CoreCommonService
coreCommonService
;
// @Autowired
// LargeScreenImpl largeScreenImpl;
private
final
String
ss
=
"瞬时风速"
;
...
...
@@ -103,6 +111,7 @@ public class DemoController extends BaseController {
@Autowired
private
EquipmentsJxiopDocMysqlMapper
equipmentsJxiopDocMysqlMapper
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"手动更新场站缓存信息接口"
)
@GetMapping
(
"/updateStationCacheInfo"
)
...
...
@@ -500,4 +509,14 @@ public class DemoController extends BaseController {
queryConditon
.
put
(
"equipmentIndexName.keyword"
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
commonServiceImpl
.
getListDataByCondtions
(
queryConditon
,
null
,
ESEquipments
.
class
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"测试feign调用"
)
@GetMapping
(
"/testFeignCall"
)
public
List
<
CoreValuesDto
>
testFeignCall
()
{
List
<
CoreValuesDto
>
coreValuesDtos
=
coreCommonService
.
getValuesByStationNamesAndPointsNames
(
null
,
null
);
Double
sum
=
coreCommonService
.
getSumOfByPointName
(
coreValuesDtos
,
CommonConstans
.
DAY_POWER_GENERATION
);
Double
avg
=
coreCommonService
.
getAverageOfByPointName
(
coreValuesDtos
,
CommonConstans
.
DAY_POWER_GENERATION
);
return
coreValuesDtos
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/CoreValuesDto.java
0 → 100644
View file @
e373867b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.Map
;
@Data
public
class
CoreValuesDto
{
private
String
name
;
private
ArrayList
<
Map
<
String
,
Object
>>
data
;
private
Map
<
String
,
Object
>
dataMap
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/feign/CoreFeignClient.java
0 → 100644
View file @
e373867b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
feign
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
//@FeignClient(name = "${mcb.warning.name:MCB-SERVER}", path = "warning", configuration = {FeignConfiguration.class})
@FeignClient
(
name
=
"mcb"
,
url
=
"http://10.20.1.160:10005"
,
path
=
"core"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
CoreFeignClient
{
/**
* @pare
*/
@GetMapping
(
"/scene-device-info/getValues"
)
FeignClientResult
<
List
<
Object
>>
getValues
(
@RequestParam
(
required
=
false
,
value
=
"stationNames"
)
String
stationNames
,
@RequestParam
(
required
=
false
,
value
=
"pointNames"
)
String
pointNames
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/feign/FeignBasicAuthRequestInterceptor.java
0 → 100644
View file @
e373867b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
feign
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author fengwang
* @date 2022-07-28.
*/
public
class
FeignBasicAuthRequestInterceptor
implements
RequestInterceptor
{
@Autowired
AmosRequestContext
amosAuth
;
public
FeignBasicAuthRequestInterceptor
()
{
}
@Override
public
void
apply
(
RequestTemplate
template
)
{
ServletRequestAttributes
attributes
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
if
(
attributes
!=
null
)
{
HttpServletRequest
request
=
attributes
.
getRequest
();
/* Get token from header */
String
authToken
=
request
.
getHeader
(
"token"
);
/* If token not found get it from request parameter */
if
(
StringUtils
.
isBlank
(
authToken
))
{
authToken
=
request
.
getHeader
(
"X-Access-Token"
);
}
template
.
header
(
"X-Access-Token"
,
authToken
);
template
.
header
(
"token"
,
authToken
);
template
.
header
(
"appKey"
,
request
.
getHeader
(
"appKey"
));
template
.
header
(
"product"
,
request
.
getHeader
(
"product"
));
template
.
header
(
"clientType"
,
"feignClient"
);
//User-Agent for core
template
.
header
(
"User-Agent"
,
"java"
);
}
else
{
template
.
header
(
"X-Access-Token"
,
amosAuth
.
getToken
());
template
.
header
(
"token"
,
amosAuth
.
getToken
());
template
.
header
(
"appKey"
,
amosAuth
.
getAppKey
());
template
.
header
(
"product"
,
amosAuth
.
getProduct
());
template
.
header
(
"clientType"
,
"feignClient"
);
//User-Agent for core
template
.
header
(
"User-Agent"
,
"java"
);
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/feign/FeignConfiguration.java
0 → 100644
View file @
e373867b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
feign
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Bean
;
/**
* @author fengwang
* @date 2022-07-28.
*/
public
class
FeignConfiguration
{
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
@Bean
public
FeignBasicAuthRequestInterceptor
basicAuthRequestInterceptor
()
{
return
new
FeignBasicAuthRequestInterceptor
();
}
@Bean
public
FeignErrorDecoder
errorDecoder
(){
return
new
FeignErrorDecoder
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/feign/FeignErrorDecoder.java
0 → 100644
View file @
e373867b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
import
feign.Response
;
import
feign.Util
;
import
feign.codec.ErrorDecoder
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.IOException
;
/**
* @author fengwang
* @date 2022-07-28.
*/
public
class
FeignErrorDecoder
implements
ErrorDecoder
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
FeignErrorDecoder
.
class
);
@Override
public
Exception
decode
(
String
methodKey
,
Response
response
)
{
String
msg
=
null
;
try
{
msg
=
Util
.
toString
(
response
.
body
().
asReader
(
Util
.
UTF_8
));
JSONObject
object
=
JSONObject
.
parseObject
(
msg
);
throw
new
RuntimeException
(
object
.
get
(
"devMessage"
).
toString
());
}
catch
(
IOException
e
)
{
log
.
error
(
"feign 调用失败"
+
e
.
getMessage
());
}
throw
new
RuntimeException
(
methodKey
+
"远程调用失败"
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/CoreCommonService.java
0 → 100644
View file @
e373867b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.CoreValuesDto
;
import
java.util.List
;
public
interface
CoreCommonService
{
/**
* @deprecated 远程调用core服务根据厂长名称
* @param stationNames 要查的场站名称需要使用逗号分隔 eg:夏造风机,石灰山风机
* @param pointsNames 要查的测点名称需要使用逗号分隔开 eg:日发电量,月发电量,年发电
* @return CoreValuesDto
*/
List
<
CoreValuesDto
>
getValuesByStationNamesAndPointsNames
(
String
stationNames
,
String
pointsNames
);
/**
* @deprecated 获取测点数据总和
* @param coreValuesDtoList
* @return
*/
Double
getSumOfByPointName
(
List
<
CoreValuesDto
>
coreValuesDtoList
,
String
pointName
);
/**
* @deprecated 获取测点数据平均值
* @param coreValuesDtoList
* @return
*/
Double
getAverageOfByPointName
(
List
<
CoreValuesDto
>
coreValuesDtoList
,
String
pointName
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CoreCommonServiceImpl.java
0 → 100644
View file @
e373867b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.CoreValuesDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.feign.CoreFeignClient
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
@Service
@RequiredArgsConstructor
public
class
CoreCommonServiceImpl
implements
CoreCommonService
{
private
final
CoreFeignClient
coreFeignClient
;
@Override
public
List
<
CoreValuesDto
>
getValuesByStationNamesAndPointsNames
(
String
stationNames
,
String
pointsNames
)
{
FeignClientResult
<
List
<
Object
>>
feignClientResult
=
coreFeignClient
.
getValues
(
stationNames
,
pointsNames
);
List
<
Object
>
list
=
feignClientResult
.
getResult
();
List
<
CoreValuesDto
>
result
=
new
ArrayList
<>();
list
.
forEach
(
o
->
{
CoreValuesDto
coreValuesDto
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
o
),
CoreValuesDto
.
class
);
coreValuesDto
.
setDataMap
(
coreValuesDto
.
getData
().
stream
().
flatMap
(
m
->
m
.
entrySet
().
stream
()).
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,(
a
,
b
)->
b
)));
result
.
add
(
coreValuesDto
);
});
return
result
;
}
@Override
public
Double
getSumOfByPointName
(
List
<
CoreValuesDto
>
coreValuesDtoList
,
String
pointName
)
{
AtomicReference
<
Double
>
result
=
new
AtomicReference
<>(
0.0
);
coreValuesDtoList
=
coreValuesDtoList
.
stream
().
filter
(
coreValuesDto
->
coreValuesDto
.
getDataMap
().
size
()>
0
&&
coreValuesDto
.
getDataMap
().
containsKey
(
pointName
)).
collect
(
Collectors
.
toList
());
coreValuesDtoList
.
forEach
(
coreValuesDto
->
{
result
.
set
(
result
.
get
()
+
Double
.
parseDouble
(
coreValuesDto
.
getDataMap
().
get
(
pointName
).
toString
()));
});
return
result
.
get
();
}
@Override
public
Double
getAverageOfByPointName
(
List
<
CoreValuesDto
>
coreValuesDtoList
,
String
pointName
)
{
AtomicReference
<
Double
>
result
=
new
AtomicReference
<>(
0.0
);
coreValuesDtoList
=
coreValuesDtoList
.
stream
().
filter
(
coreValuesDto
->
coreValuesDto
.
getDataMap
().
size
()>
0
&&
coreValuesDto
.
getDataMap
().
containsKey
(
pointName
)).
collect
(
Collectors
.
toList
());
coreValuesDtoList
.
forEach
(
coreValuesDto
->
{
result
.
set
(
result
.
get
()
+
Double
.
parseDouble
(
coreValuesDto
.
getDataMap
().
get
(
pointName
).
toString
()));
});
return
result
.
get
()/
coreValuesDtoList
.
size
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/application-dev1.properties
0 → 100644
View file @
e373867b
## DB properties:
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:mysql://10.20.1.157:3306/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin@2020
spring.db1.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:mysql://10.20.1.157:3306/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin@2020
spring.db2.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db4-equip
spring.db4.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url
=
jdbc:mysql://10.20.1.157:3306/equipment?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db4.datasource.username
=
root
spring.db4.datasource.password
=
Yeejoin@2020
spring.db4.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db5-amos_project
spring.db5.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db5.datasource.url
=
jdbc:mysql://10.20.1.157:3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db5.datasource.username
=
root
spring.db5.datasource.password
=
Yeejoin@2020
spring.db5.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db3-td-engine
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url
=
jdbc:TAOS-RS://10.20.1.157:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username
=
root
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
## eureka properties:
eureka.instance.hostname
=
10.20.1.160
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
10.20.1.210
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.cache.type
=
GENERIC
j2cache.open-spring-cache
=
true
j2cache.cache-clean-mode
=
passive
j2cache.allow-null-values
=
true
j2cache.redis-client
=
lettuce
j2cache.l2-cache-open
=
true
j2cache.broadcast
=
net.oschina.j2cache.cache.support.redis.SpringRedisPubSubPolicy
j2cache.L1.provider_class
=
caffeine
j2cache.L2.provider_class
=
net.oschina.j2cache.cache.support.redis.SpringRedisProvider
j2cache.L2.config_section
=
lettuce
j2cache.sync_ttl_to_redis
=
true
j2cache.default_cache_null_object
=
false
j2cache.serialization
=
fst
caffeine.properties
=
/caffeine.properties
lettuce.mode
=
single
lettuce.namespace
=
lettuce.storage
=
generic
lettuce.channel
=
j2cache
lettuce.scheme
=
redis
lettuce.hosts
=
${spring.redis.host}:${spring.redis.port}
lettuce.password
=
${spring.redis.password}
lettuce.database
=
${spring.redis.database}
lettuce.sentinelMasterId
=
lettuce.maxTotal
=
100
lettuce.maxIdle
=
10
lettuce.minIdle
=
10
lettuce.timeout
=
10000
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.10.220:1883
emqx.user-name
=
admin
emqx.password
=
public
mqtt.scene.host
=
mqtt://172.16.10.220:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
emqx.max-inflight
=
1000
## influxDB
#spring.influx.url= http://172.16.3.155:8186
#spring.influx.password=admin
#spring.influx.user=admin
#spring.influx.database=iot_platform
#spring.influx.retention_policy=default
#spring.influx.retention_policy_time=30d
#spring.influx.actions=10000
#spring.influx.bufferLimit=20000
## influxDB
#spring.influx.url= http://139.9.171.247:8086
#spring.influx.password=Yeejoin@2023
#spring.influx.user=admin
#spring.influx.database=iot_platform
#spring.influx.retention_policy=default
#spring.influx.retention_policy_time=30d
#spring.influx.actions=10000
#spring.influx.bufferLimit=20000
#spring.influx.url=http://39.98.224.23:8086
#spring.influx.password=Yeejoin@2020
#spring.influx.user=root
#spring.influx.database=iot_platform
#spring.influx.retention_policy=default
#spring.influx.retention_policy_time=30d
#spring.influx.actions=10000
#spring.influx.bufferLimit=20000
knife4j.production
=
false
knife4j.enable
=
true
knife4j.basic.enable
=
true
knife4j.basic.username
=
admin
knife4j.basic.password
=
a1234560
management.security.enabled
=
true
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
fire-rescue
=
123
mybatis-plus.global-config.db-config.update-strategy
=
ignored
# user-amos setting : This value is the secretkey for person manage moudle accout password encryption.please don't change it!!!
amos.secret.key
=
qaz
# if your service can't be access ,you can use this setting , you need change ip as your.
#eureka.instance.prefer-ip-address=true
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://10.20.1.210:61616
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
# ?????????
fan.statuts.stattuspath
=
upload/jxiop/device_status
pictureUrl
=
upload/jxiop/syz/
daily.power.generation.cron
=
0/30 * * * * ?
moon.power.generation.cron
=
0/30 * * * * ?
year.power.generation.cron
=
0/30 * * * * ?
spring.elasticsearch.rest.uris
=
http://10.20.0.223:9200
spring.elasticsearch.rest.connection-timeout
=
30000
spring.elasticsearch.rest.username
=
elastic
spring.elasticsearch.rest.password
=
Yeejoin@2020
spring.elasticsearch.rest.read-timeout
=
30000
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/logback-dev1.xml
0 → 100644
View file @
e373867b
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<property
name=
"LOG_PATTERN"
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/ccs.log.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
7
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
30mb
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<logger
name=
"org.typroject"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment