29 changed files with 879 additions and 22 deletions
@ -0,0 +1,53 @@ |
|||
package com.ccsens.beneficiation.api; |
|||
|
|||
import com.ccsens.beneficiation.bean.dto.ParameterDto; |
|||
import com.ccsens.beneficiation.bean.dto.WeightDto; |
|||
import com.ccsens.beneficiation.bean.vo.ParameterVo; |
|||
import com.ccsens.beneficiation.bean.vo.WeightVo; |
|||
import com.ccsens.beneficiation.service.IParameterService; |
|||
import com.ccsens.cloudutil.annotation.MustLogin; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "查看设置参数" , description = "") |
|||
@RestController |
|||
@RequestMapping("/parameter") |
|||
public class ParameterController { |
|||
@Resource |
|||
private IParameterService parameterService; |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "查看各个设备的参数", notes = "") |
|||
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<ParameterVo.QueryParameter> queryParameter(@ApiParam @Validated @RequestBody QueryDto params) { |
|||
log.info("查看各个设备的参数:{}",params); |
|||
ParameterVo.QueryParameter parameterInfo = parameterService.queryParameter(params.getParam()); |
|||
log.info("各个设备的参数:{}",parameterInfo); |
|||
return JsonResponse.newInstance().ok(parameterInfo); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "修改设备的参数", notes = "") |
|||
@RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse updateParameter(@ApiParam @Validated @RequestBody QueryDto<ParameterDto.ParameterInfo> params) { |
|||
log.info("修改设备的参数:{}",params); |
|||
parameterService.updateParameter(params.getParam()); |
|||
log.info("修改设备的参数成功"); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.ccsens.beneficiation.bean.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class ParameterDto { |
|||
@Data |
|||
@ApiModel("修改仪器的参数") |
|||
public static class ParameterInfo{ |
|||
@ApiModelProperty("电耳1") |
|||
private ParameterThreshold electricEar1; |
|||
@ApiModelProperty("电耳2") |
|||
private ParameterThreshold electricEar2; |
|||
@ApiModelProperty("电磁阀1") |
|||
private Parameter solenoidValue1; |
|||
@ApiModelProperty("电磁阀2") |
|||
private Parameter solenoidValue2; |
|||
@ApiModelProperty("变频器1") |
|||
private Parameter transducer1; |
|||
@ApiModelProperty("变频器2") |
|||
private Parameter transducer2; |
|||
@ApiModelProperty("变频器3") |
|||
private Parameter transducer3; |
|||
@ApiModelProperty("变频器4") |
|||
private Parameter transducer4; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("单个仪器的参数") |
|||
public static class Parameter{ |
|||
@NotNull |
|||
@ApiModelProperty("id") |
|||
private Long id; |
|||
@ApiModelProperty("设置值") |
|||
private BigDecimal settingValue; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("电耳的阀值") |
|||
public static class ParameterThreshold{ |
|||
@NotNull |
|||
@ApiModelProperty("id") |
|||
private Long id; |
|||
@ApiModelProperty("阀值1") |
|||
private Threshold thresholdValue1; |
|||
@ApiModelProperty("阀值2") |
|||
private Threshold thresholdValue2; |
|||
@ApiModelProperty("阀值3") |
|||
private Threshold thresholdValue3; |
|||
|
|||
} |
|||
@Data |
|||
@ApiModel("阀值的最大最小值") |
|||
public static class Threshold{ |
|||
@ApiModelProperty("最小") |
|||
private BigDecimal minValue; |
|||
@ApiModelProperty("最打") |
|||
private BigDecimal maxValue; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,155 @@ |
|||
package com.ccsens.beneficiation.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class ParameterVo { |
|||
|
|||
@Data |
|||
@ApiModel("查看每个仪器的参数") |
|||
public static class QueryParameter{ |
|||
@ApiModelProperty("只有实时值 能修改,例:变频器") |
|||
private List<Transducer> transducers; |
|||
@ApiModelProperty("实时值累计值,不能修改,例:皮带秤") |
|||
private List<BeltWeigher> beltWeigher; |
|||
@ApiModelProperty("有阀值能设置 例:电耳") |
|||
private List<Parameter> parameter; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("只有实时值 能修改,例:变频器") |
|||
public static class Transducer{ |
|||
@ApiModelProperty("设备名") |
|||
private String title; |
|||
@ApiModelProperty("参数") |
|||
private List<TransducerValue> values; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("只有实时值 能修改,例:变频器") |
|||
public static class TransducerValue{ |
|||
@ApiModelProperty("id") |
|||
private Long id; |
|||
@ApiModelProperty("修改时用的类型") |
|||
private String type; |
|||
@ApiModelProperty("名字") |
|||
private String key; |
|||
@ApiModelProperty("实时值") |
|||
private BigDecimal currentTimeValue; |
|||
|
|||
public TransducerValue(Long id, String type, String key, BigDecimal currentTimeValue) { |
|||
this.id = id; |
|||
this.type = type; |
|||
this.key = key; |
|||
this.currentTimeValue = currentTimeValue; |
|||
} |
|||
|
|||
public TransducerValue() { |
|||
} |
|||
} |
|||
@Data |
|||
@ApiModel("实时值累计值,不能修改,例:皮带秤") |
|||
public static class BeltWeigher{ |
|||
@ApiModelProperty("设备名") |
|||
private String title; |
|||
@ApiModelProperty("参数") |
|||
private List<BeltWeigherValue> values; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("实时值累计值,不能修改,例:皮带秤") |
|||
public static class BeltWeigherValue{ |
|||
@ApiModelProperty("id") |
|||
private Long id; |
|||
@ApiModelProperty("名字") |
|||
private String key; |
|||
@ApiModelProperty("修改时用的类型") |
|||
private String type; |
|||
@ApiModelProperty("实时值") |
|||
private BigDecimal currentTimeValue; |
|||
@ApiModelProperty("累计值") |
|||
private BigDecimal totalValue; |
|||
|
|||
public BeltWeigherValue(Long id, String key, BigDecimal currentTimeValue, BigDecimal totalValue) { |
|||
this.id = id; |
|||
this.key = key; |
|||
this.currentTimeValue = currentTimeValue; |
|||
this.totalValue = totalValue; |
|||
} |
|||
|
|||
public BeltWeigherValue() { |
|||
} |
|||
} |
|||
|
|||
|
|||
@Data |
|||
@ApiModel("实时值累计值,不能修改,例:皮带秤") |
|||
public static class Parameter{ |
|||
@ApiModelProperty("设备名") |
|||
private String title; |
|||
@ApiModelProperty("参数") |
|||
private List<ParameterThreshold> values; |
|||
} |
|||
@Data |
|||
@ApiModel("单个仪器的参数带阀值") |
|||
public static class ParameterThreshold{ |
|||
@ApiModelProperty("id") |
|||
private Long id; |
|||
@ApiModelProperty("修改时用的类型") |
|||
private String type; |
|||
@ApiModelProperty("实时") |
|||
private String key; |
|||
@ApiModelProperty("实时值") |
|||
private BigDecimal currentTimeValue; |
|||
@ApiModelProperty("阀值1") |
|||
private ThresholdValue thresholdValue1; |
|||
@ApiModelProperty("阀值2") |
|||
private ThresholdValue thresholdValue2; |
|||
@ApiModelProperty("阀值3") |
|||
private ThresholdValue thresholdValue3; |
|||
|
|||
public ParameterThreshold(Long id, String type, String key, BigDecimal currentTimeValue, ThresholdValue thresholdValue1, ThresholdValue thresholdValue2, ThresholdValue thresholdValue3) { |
|||
this.id = id; |
|||
this.type = type; |
|||
this.key = key; |
|||
this.currentTimeValue = currentTimeValue; |
|||
this.thresholdValue1 = thresholdValue1; |
|||
this.thresholdValue2 = thresholdValue2; |
|||
this.thresholdValue3 = thresholdValue3; |
|||
} |
|||
|
|||
public ParameterThreshold() { |
|||
} |
|||
} |
|||
@Data |
|||
@ApiModel("阀值") |
|||
public static class ThresholdValue{ |
|||
@ApiModelProperty("id") |
|||
private Long id = 1L; |
|||
@ApiModelProperty("修改时用的类型") |
|||
private String type; |
|||
@ApiModelProperty("key") |
|||
private String key; |
|||
@ApiModelProperty("最小") |
|||
private BigDecimal minValue; |
|||
@ApiModelProperty("最打") |
|||
private BigDecimal maxValue; |
|||
|
|||
public ThresholdValue(BigDecimal minValue, BigDecimal maxValue) { |
|||
this.minValue = minValue; |
|||
this.maxValue = maxValue; |
|||
} |
|||
|
|||
public ThresholdValue() { |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.ccsens.beneficiation.service; |
|||
|
|||
import com.ccsens.beneficiation.bean.dto.ParameterDto; |
|||
import com.ccsens.beneficiation.bean.vo.ParameterVo; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public interface IParameterService { |
|||
/** |
|||
* 查询每个设备的参数 |
|||
* @param param 没有参数 |
|||
* @return 返回每个设备的数据 |
|||
*/ |
|||
ParameterVo.QueryParameter queryParameter(Object param); |
|||
|
|||
/** |
|||
* 修改一起的参数 |
|||
* @param param 参数 |
|||
*/ |
|||
void updateParameter(ParameterDto.ParameterInfo param); |
|||
} |
@ -0,0 +1,106 @@ |
|||
package com.ccsens.beneficiation.service; |
|||
|
|||
import com.ccsens.beneficiation.bean.dto.ParameterDto; |
|||
import com.ccsens.beneficiation.bean.vo.ParameterVo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
|||
public class ParameterService implements IParameterService{ |
|||
|
|||
@Override |
|||
public ParameterVo.QueryParameter queryParameter(Object param) { |
|||
ParameterVo.QueryParameter parameterInfo = new ParameterVo.QueryParameter(); |
|||
|
|||
|
|||
List<ParameterVo.TransducerValue> transducerValues = new ArrayList<>(); |
|||
ParameterVo.TransducerValue transducer1 = new ParameterVo.TransducerValue(6L,"transducer1","实时/设置1", BigDecimal.valueOf(45)); |
|||
ParameterVo.TransducerValue transducer2 = new ParameterVo.TransducerValue(7L,"transducer2","实时/设置2", BigDecimal.valueOf(8)); |
|||
ParameterVo.TransducerValue transducer3 = new ParameterVo.TransducerValue(8L,"transducer3","实时/设置3", BigDecimal.valueOf(67)); |
|||
ParameterVo.TransducerValue transducer4 = new ParameterVo.TransducerValue(10L,"transducer4","实时/设置4", BigDecimal.valueOf(75)); |
|||
transducerValues.add(transducer1); |
|||
transducerValues.add(transducer2); |
|||
transducerValues.add(transducer3); |
|||
transducerValues.add(transducer4); |
|||
|
|||
List<ParameterVo.Transducer> transducers = new ArrayList<>(); |
|||
ParameterVo.Transducer transducer = new ParameterVo.Transducer(); |
|||
transducer.setTitle("变频器"); |
|||
transducer.setValues(transducerValues); |
|||
transducers.add(transducer); |
|||
|
|||
List<ParameterVo.TransducerValue> transducerValues1 = new ArrayList<>(); |
|||
ParameterVo.TransducerValue transducer11 = new ParameterVo.TransducerValue(6L,"solenoidValue1","实时/设置1", BigDecimal.valueOf(45)); |
|||
ParameterVo.TransducerValue transducer21 = new ParameterVo.TransducerValue(7L,"solenoidValue2","实时/设置2", BigDecimal.valueOf(8)); |
|||
transducerValues1.add(transducer11); |
|||
transducerValues1.add(transducer21); |
|||
|
|||
List<ParameterVo.Transducer> transducers2 = new ArrayList<>(); |
|||
ParameterVo.Transducer transducer12 = new ParameterVo.Transducer(); |
|||
transducer12.setTitle("电磁阀"); |
|||
transducer12.setValues(transducerValues); |
|||
transducers2.add(transducer12); |
|||
|
|||
parameterInfo.setTransducers(transducers2); |
|||
|
|||
|
|||
List<ParameterVo.BeltWeigher> beltWeighers1 = new ArrayList<>(); |
|||
ParameterVo.BeltWeigher beltWeigher1 = new ParameterVo.BeltWeigher(); |
|||
beltWeigher1.setTitle("皮带秤"); |
|||
List<ParameterVo.BeltWeigherValue> beltWeigherValueList1 = new ArrayList<>(); |
|||
ParameterVo.BeltWeigherValue beltWeigher01 = new ParameterVo.BeltWeigherValue(1L,"实时/累计", BigDecimal.valueOf(12),BigDecimal.valueOf(1212)); |
|||
beltWeigherValueList1.add(beltWeigher01); |
|||
beltWeigher1.setValues(beltWeigherValueList1); |
|||
beltWeighers1.add(beltWeigher1); |
|||
parameterInfo.setBeltWeigher(beltWeighers1); |
|||
|
|||
List<ParameterVo.BeltWeigher> beltWeighers2 = new ArrayList<>(); |
|||
ParameterVo.BeltWeigher beltWeigher2 = new ParameterVo.BeltWeigher(); |
|||
beltWeigher2.setTitle("流量计"); |
|||
List<ParameterVo.BeltWeigherValue> beltWeigherValueList2 = new ArrayList<>(); |
|||
ParameterVo.BeltWeigherValue beltWeigher02 = new ParameterVo.BeltWeigherValue(2L,"实时/累计", BigDecimal.valueOf(16),BigDecimal.valueOf(1524)); |
|||
ParameterVo.BeltWeigherValue beltWeigher03 = new ParameterVo.BeltWeigherValue(3L,"实时/累计", BigDecimal.valueOf(5),BigDecimal.valueOf(232)); |
|||
beltWeigherValueList2.add(beltWeigher02); |
|||
beltWeigherValueList2.add(beltWeigher03); |
|||
beltWeigher2.setValues(beltWeigherValueList2); |
|||
beltWeighers2.add(beltWeigher2); |
|||
parameterInfo.setBeltWeigher(beltWeighers2); |
|||
|
|||
|
|||
List<ParameterVo.Parameter> parameters = new ArrayList<>(); |
|||
ParameterVo.Parameter parameter = new ParameterVo.Parameter(); |
|||
parameter.setTitle("电耳"); |
|||
List<ParameterVo.ParameterThreshold> parameterThresholds = new ArrayList<>(); |
|||
|
|||
ParameterVo.ParameterThreshold parameterThreshold1 = new ParameterVo.ParameterThreshold(11L,"实时","electricEar1",BigDecimal.valueOf(60), |
|||
new ParameterVo.ThresholdValue(BigDecimal.valueOf(20),BigDecimal.valueOf(60)), |
|||
new ParameterVo.ThresholdValue(BigDecimal.valueOf(30),BigDecimal.valueOf(70)), |
|||
new ParameterVo.ThresholdValue(BigDecimal.valueOf(40),BigDecimal.valueOf(80))); |
|||
|
|||
ParameterVo.ParameterThreshold parameterThreshold2 = new ParameterVo.ParameterThreshold(12L,"实时","electricEar1",BigDecimal.valueOf(65), |
|||
new ParameterVo.ThresholdValue(BigDecimal.valueOf(30),BigDecimal.valueOf(70)), |
|||
new ParameterVo.ThresholdValue(BigDecimal.valueOf(40),BigDecimal.valueOf(80)), |
|||
new ParameterVo.ThresholdValue(BigDecimal.valueOf(50),BigDecimal.valueOf(90))); |
|||
parameterThresholds.add(parameterThreshold1); |
|||
parameterThresholds.add(parameterThreshold2); |
|||
parameter.setValues(parameterThresholds); |
|||
parameterInfo.setParameter(parameters); |
|||
return parameterInfo; |
|||
} |
|||
|
|||
@Override |
|||
public void updateParameter(ParameterDto.ParameterInfo param) { |
|||
|
|||
} |
|||
} |
@ -1,6 +1,6 @@ |
|||
spring: |
|||
profiles: |
|||
active: prod |
|||
include: common, util-prod |
|||
active: test |
|||
include: common, util-test |
|||
|
|||
|
|||
|
@ -0,0 +1,124 @@ |
|||
#<<<<<<< HEAD |
|||
##服务端点暴露 |
|||
#management: |
|||
# endpoints: |
|||
# web: |
|||
# exposure: |
|||
# # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' |
|||
# include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream |
|||
## # 不暴露哪些端点 |
|||
## exclude: env,beans,configprops |
|||
# endpoint: |
|||
# health: |
|||
# # 是否展示健康检查详情 |
|||
# show-details: always |
|||
# health: |
|||
# redis: |
|||
# enabled: false |
|||
##eureka注册 |
|||
#eureka: |
|||
# client: |
|||
# service-url: |
|||
# # 指定eureka server通信地址,注意/eureka/小尾巴不能少 |
|||
# #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ |
|||
## defaultZone: http://admin:admin@49.233.89.188:7010/eureka/ |
|||
# defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ |
|||
# instance: |
|||
# # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server |
|||
# prefer-ip-address: true |
|||
# metadata-map: |
|||
# management: |
|||
# context-path: ${server.servlet.context-path:}/actuator |
|||
# home-page-url-path: ${server.servlet.context-path:}/ |
|||
# status-page-url-path: ${server.servlet.context-path:}/actuator/info |
|||
# health-check-url-path: ${server.servlet.context-path:}/actuator/health |
|||
#feign: |
|||
# client: |
|||
# config: |
|||
# default: |
|||
# connectTime: 5000 |
|||
# readTimeout: 5000 |
|||
# # NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 |
|||
# # BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 |
|||
# # HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 |
|||
# # FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 |
|||
# loggerLevel: basic |
|||
# hystrix: |
|||
# enabled: true |
|||
## sleuth |
|||
#logging: |
|||
# level: |
|||
# root: info |
|||
# org.springframework.cloud.sleuth: DEBUG |
|||
#spring: |
|||
## zipkin: |
|||
## base-url: http://49.233.89.188:9411 |
|||
## sleuth: |
|||
## sampler: |
|||
## # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 |
|||
## probability: 1.0 |
|||
# cloud: |
|||
# inetutils: |
|||
#======= |
|||
#服务端点暴露 |
|||
management: |
|||
endpoints: |
|||
web: |
|||
exposure: |
|||
# 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' |
|||
include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream |
|||
# # 不暴露哪些端点 |
|||
# exclude: env,beans,configprops |
|||
endpoint: |
|||
health: |
|||
# 是否展示健康检查详情 |
|||
show-details: always |
|||
health: |
|||
redis: |
|||
enabled: false |
|||
#eureka注册 |
|||
eureka: |
|||
client: |
|||
service-url: |
|||
# 指定eureka server通信地址,注意/eureka/小尾巴不能少 |
|||
#defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ |
|||
defaultZone: http://admin:admin@49.232.6.143:7010/eureka/ |
|||
# defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ |
|||
# defaultZone: http://admin:admin@test.tall.wiki:7010/eureka/ |
|||
instance: |
|||
# 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server |
|||
prefer-ip-address: true |
|||
metadata-map: |
|||
management: |
|||
context-path: ${server.servlet.context-path:}/actuator |
|||
home-page-url-path: ${server.servlet.context-path:}/ |
|||
status-page-url-path: ${server.servlet.context-path:}/actuator/info |
|||
health-check-url-path: ${server.servlet.context-path:}/actuator/health |
|||
feign: |
|||
client: |
|||
config: |
|||
default: |
|||
connectTime: 5000 |
|||
readTimeout: 5000 |
|||
# NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 |
|||
# BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 |
|||
# HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 |
|||
# FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 |
|||
loggerLevel: basic |
|||
hystrix: |
|||
enabled: true |
|||
# sleuth |
|||
logging: |
|||
level: |
|||
root: info |
|||
org.springframework.cloud.sleuth: DEBUG |
|||
spring: |
|||
# zipkin: |
|||
# base-url: http://49.233.89.188:9411 |
|||
# sleuth: |
|||
# sampler: |
|||
# # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 |
|||
# probability: 1.0 |
|||
cloud: |
|||
inetutils: |
|||
ignored-interfaces: ['VMware.*'] |
@ -0,0 +1,53 @@ |
|||
#服务端点暴露 |
|||
management: |
|||
endpoints: |
|||
web: |
|||
exposure: |
|||
# 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' |
|||
include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream |
|||
# # 不暴露哪些端点 |
|||
# exclude: env,beans,configprops |
|||
endpoint: |
|||
health: |
|||
# 是否展示健康检查详情 |
|||
show-details: always |
|||
health: |
|||
redis: |
|||
enabled: false |
|||
#eureka注册 |
|||
eureka: |
|||
client: |
|||
service-url: |
|||
# 指定eureka server通信地址,注意/eureka/小尾巴不能少 |
|||
defaultZone: http://admin:admin@82.156.116.247:7010/eureka/ |
|||
instance: |
|||
# 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server |
|||
prefer-ip-address: true |
|||
metadata-map: |
|||
management: |
|||
context-path: ${server.servlet.context-path:}/actuator |
|||
home-page-url-path: ${server.servlet.context-path:}/ |
|||
status-page-url-path: ${server.servlet.context-path:}/actuator/info |
|||
health-check-url-path: ${server.servlet.context-path:}/actuator/health |
|||
feign: |
|||
client: |
|||
config: |
|||
default: |
|||
connectTime: 5000 |
|||
readTimeout: 5000 |
|||
# NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 |
|||
# BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 |
|||
# HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 |
|||
# FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 |
|||
loggerLevel: basic |
|||
hystrix: |
|||
enabled: true |
|||
# sleuth |
|||
logging: |
|||
level: |
|||
root: info |
|||
org.springframework.cloud.sleuth: DEBUG |
|||
spring: |
|||
cloud: |
|||
inetutils: |
|||
ignored-interfaces: ['VMware.*'] |
@ -0,0 +1,39 @@ |
|||
server: |
|||
port: 7030 |
|||
servlet: |
|||
context-path: /v1.0 |
|||
spring: |
|||
snowflake: |
|||
datacenterId: 1 |
|||
workerId: 1 |
|||
application: |
|||
name: tall |
|||
datasource: |
|||
type: com.alibaba.druid.pool.DruidDataSource |
|||
rabbitmq: |
|||
host: 127.0.0.1 |
|||
password: admin |
|||
port: 5672 |
|||
username: 111111 |
|||
redis: |
|||
database: 0 |
|||
host: 127.0.0.1 |
|||
jedis: |
|||
pool: |
|||
max-active: 200 |
|||
max-idle: 10 |
|||
max-wait: -1ms |
|||
min-idle: 0 |
|||
password: '' |
|||
port: 6379 |
|||
timeout: 1000ms |
|||
swagger: |
|||
enable: true |
|||
eureka: |
|||
instance: |
|||
ip-address: 82.156.116.247 |
|||
gatewayUrl: http://82.156.116.247 /gateway/ |
|||
notGatewayUrl: http://82.156.116.247 / |
|||
file: |
|||
domain: http://82.156.116.247 /gateway/tall/v1.0/ |
|||
imgDomain: http://82.156.116.247 /gateway/tall/v1.0/uploads |
@ -1,5 +1,5 @@ |
|||
spring: |
|||
profiles: |
|||
active: test |
|||
include: util-test,common |
|||
active: dev |
|||
include: util-dev,common |
|||
|
|||
|
@ -0,0 +1,33 @@ |
|||
spring: |
|||
datasource: |
|||
druid: |
|||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|||
driverClassName: com.mysql.cj.jdbc.Driver |
|||
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
|||
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
|||
filterName: druidFilter |
|||
filterProfileEnable: true |
|||
filterUrlPattern: /* |
|||
filters: stat,wall |
|||
initialSize: 5 |
|||
maxActive: 20 |
|||
maxPoolPreparedStatementPerConnectionSize: 20 |
|||
maxWait: 60000 |
|||
minEvictableIdleTimeMillis: 300000 |
|||
minIdle: 5 |
|||
password: 6ba13d9930a6ad888a3704376c920a75 |
|||
poolPreparedStatements: true |
|||
servletLogSlowSql: true |
|||
servletLoginPassword: 111111 |
|||
servletLoginUsername: druid |
|||
servletName: druidServlet |
|||
servletResetEnable: true |
|||
servletUrlMapping: /druid/* |
|||
testOnBorrow: false |
|||
testOnReturn: false |
|||
testWhileIdle: true |
|||
timeBetweenEvictionRunsMillis: 60000 |
|||
url: jdbc:mysql://49.232.6.143:3306/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
|||
username: root |
|||
validationQuery: SELECT 1 FROM DUAL |
|||
env: CCSENS_GREENVALLEY |
@ -0,0 +1,49 @@ |
|||
server: |
|||
port: 7150 |
|||
servlet: |
|||
context-path: |
|||
spring: |
|||
application: |
|||
name: tcm |
|||
datasource: |
|||
type: com.alibaba.druid.pool.DruidDataSource |
|||
# rabbitmq: |
|||
# host: 127.0.0.1 |
|||
# password: 111111 |
|||
# port: 5672 |
|||
# username: admin |
|||
rabbitmq: |
|||
host: 127.0.0.1 |
|||
password: guest |
|||
port: 5672 |
|||
username: guest |
|||
redis: |
|||
database: 0 |
|||
host: 127.0.0.1 |
|||
jedis: |
|||
pool: |
|||
max-active: 200 |
|||
max-idle: 10 |
|||
max-wait: -1ms |
|||
min-idle: 0 |
|||
password: '' |
|||
port: 6379 |
|||
timeout: 1000ms |
|||
swagger: |
|||
enable: true |
|||
eureka: |
|||
instance: |
|||
ip-address: 49.232.6.143 |
|||
file: |
|||
path: /home/cloud/tcm/uploads/ |
|||
domain: https://www.sxwikionline.com/gateway/tcm/ |
|||
imgDomain: https://www.sxwikionline.com/gateway/tcm/uploads/ |
|||
day: |
|||
one: 9 |
|||
two: 30 |
|||
oneFront: 0 |
|||
oneAfter: 14 |
|||
twoAfter: 90 |
|||
three: 270 |
|||
threeFront: 180 |
|||
threeAfter: 365 |
@ -0,0 +1,33 @@ |
|||
spring: |
|||
datasource: |
|||
druid: |
|||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|||
driverClassName: com.mysql.cj.jdbc.Driver |
|||
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
|||
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
|||
filterName: druidFilter |
|||
filterProfileEnable: true |
|||
filterUrlPattern: /* |
|||
filters: stat,wall |
|||
initialSize: 5 |
|||
maxActive: 20 |
|||
maxPoolPreparedStatementPerConnectionSize: 20 |
|||
maxWait: 60000 |
|||
minEvictableIdleTimeMillis: 300000 |
|||
minIdle: 5 |
|||
password: |
|||
poolPreparedStatements: true |
|||
servletLogSlowSql: true |
|||
servletLoginPassword: 111111 |
|||
servletLoginUsername: druid |
|||
servletName: druidServlet |
|||
servletResetEnable: true |
|||
servletUrlMapping: /druid/* |
|||
testOnBorrow: false |
|||
testOnReturn: false |
|||
testWhileIdle: true |
|||
timeBetweenEvictionRunsMillis: 60000 |
|||
url: jdbc:mysql://127.0.0.1/tcm?useUnicode=true&characterEncoding=UTF-8 |
|||
username: root |
|||
validationQuery: SELECT 1 FROM DUAL |
|||
env: CCSENS_TALL |
Loading…
Reference in new issue