Merge remote-tracking branch 'origin/igds-api-gateway' into igds-api-gateway
# Conflicts:
# src/main/java/com/fzzy/api/data/GatewayDeviceProtocol.java
| | |
| | | package com.fzzy.api; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.fzzy.api.data.ApiCommonDevice; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | |
| | | /** |
| | | * å
¨å±éæç±» |
| | | */ |
| | | @Slf4j |
| | | public class Constant { |
| | | |
| | | |
| | |
| | | |
| | | public static ApiCommonDevice getCommonDeviceCache(String sn) { |
| | | if (null == sn) return null; |
| | | log.info("å¨çº¿è®¾å¤ï¼" + JSON.toJSONString(contextDeviceMap)); |
| | | return contextDeviceMap.get(sn); |
| | | } |
| | | |
| | |
| | | if (null == ip) return null; |
| | | |
| | | if (contextDeviceMap.isEmpty()) return null; |
| | | |
| | | log.info("å¨çº¿è®¾å¤ï¼" + JSON.toJSONString(contextDeviceMap)); |
| | | for (ApiCommonDevice device : contextDeviceMap.values()) { |
| | | if (ip.equals(device)) return device; |
| | | if (ip.equals(device.getIp())) return device; |
| | | } |
| | | return null; |
| | | } |
| | | public static ApiCommonDevice getCommonDeviceCacheBySn(String sn) { |
| | | if (null == sn) return null; |
| | | |
| | | if (contextDeviceMap.isEmpty()) return null; |
| | | log.info("å¨çº¿è®¾å¤ï¼" + JSON.toJSONString(contextDeviceMap)); |
| | | for (ApiCommonDevice device : contextDeviceMap.values()) { |
| | | if (sn.equals(device.getSn())) return device; |
| | | } |
| | | return null; |
| | | } |
| | | public static ApiCommonDevice updateCacheOnline(String ip, Integer port) { |
| | | ApiCommonDevice device = getCommonDeviceCacheByIp(ip); |
| | | |
| | |
| | | device.setCode("SUCCESS"); |
| | | device.setMsg("设å¤ä¸çº¿"); |
| | | device.setOnlineTime(new Date()); |
| | | contextDeviceMap.put(device.getSn(), device); |
| | | contextDeviceMap.put(device.getIp(), device); |
| | | log.info("设å¤ä¸çº¿ï¼" + ip); |
| | | return device; |
| | | } |
| | | |
| | |
| | | device.setStatus(Constant.YN_N); |
| | | device.setCode("ERROR"); |
| | | device.setMsg("设å¤ç¦»çº¿"); |
| | | contextDeviceMap.put(device.getSn(), device); |
| | | contextDeviceMap.put(device.getIp(), device); |
| | | |
| | | return device; |
| | | } |
| | | |
| | | public static void updateCache(ApiCommonDevice device) { |
| | | contextDeviceMap.put(device.getSn(), device); |
| | | contextDeviceMap.put(device.getIp(), device); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collection; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ç½å
³ç¸å
³ç宿¶å¨ |
| | |
| | | if (null == url) { |
| | | url = DEFAULT_URL; |
| | | } |
| | | Map<String ,String> parameMap = new HashMap<>(); |
| | | parameMap.put("unescape","1"); |
| | | parameMap.put("version","v61"); |
| | | parameMap.put("appid",DEFAULT_APP_ID); |
| | | parameMap.put("appsecret",DEFAULT_APP_SECRET); |
| | | parameMap.put("cityid",DEFAULT_CITYID); |
| | | url = url.replace("{appId}", DEFAULT_APP_ID).replace("{appsecret}", DEFAULT_APP_SECRET).replace("{cityid}", DEFAULT_CITYID); |
| | | |
| | | url = url.replace("{appId}", DEFAULT_APP_ID).replace("{appsecret}", DEFAULT_APP_SECRET); |
| | | |
| | |
| | | } |
| | | |
| | | log.debug("------æ°è±¡è¯·æ±ä¿¡æ¯URL---{}", url); |
| | | String result = GatewayHttpUtil.doGet(url); |
| | | String result = GatewayHttpUtil.doGet(url,parameMap); |
| | | |
| | | if (null == result) { |
| | | log.error("å½åå¤ç½è·åæ°è±¡ä¿¡æ¯å¤±è´¥â¦â¦"); |
| | |
| | | log.info("===========================ç³»ç»å®æ¶è·è·åæ°è±¡ä¿¡æ¯===={}==================", dto); |
| | | |
| | | } catch (Exception e) { |
| | | |
| | | log.error(e.getMessage(),e); |
| | | } |
| | | } |
| | | |
| | |
| | | gatewayRemoteManager.getSyncWeightService(device.getSyncProtocol()).syncWeightInfo(reqData); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | Map<String ,String> parameMap = new HashMap<>(); |
| | | parameMap.put("unescape","1"); |
| | | parameMap.put("version","v61"); |
| | | parameMap.put("appid","49421971"); |
| | | parameMap.put("appsecret","JmJE48Fv"); |
| | | parameMap.put("cityid","101270101"); |
| | | String result = GatewayHttpUtil.doGet("https://v1.yiketianqi.com/api?unescape=1&version=v61&appid=49421971&appsecret=JmJE48Fv&cityid=101270101", parameMap); |
| | | |
| | | |
| | | System.out.println(result); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | return null; |
| | | } |
| | | public static GatewayDevice getCacheByDeviceSIp(String ip) { |
| | | Collection<GatewayDevice> list = allCacheDevice(); |
| | | if (null == list || list.isEmpty()) return null; |
| | | |
| | | for (GatewayDevice device : list) { |
| | | if (ip.equals(device.getIp())) return device; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * é对ä¸ä¸ªéè®¯åæºå¯¹å¤ä¸ªä»æ
åµ |
| | |
| | | |
| | | private String weatherStation; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | private String maxZ = "0"; |
| | | |
| | | private List<GrainTH> temperatureAndhumidity; |
| | | |
| | | private List<GrainTemp> temperature; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.gateway.hx2023.data; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * ç²®æ
ä¿¡æ¯è¯¦ç» |
| | | */ |
| | | @Data |
| | | public class GrainTH { |
| | | |
| | | //æ ¹å· |
| | | private String cableNum; |
| | | |
| | | //å±å· |
| | | private String layerNumber; |
| | | |
| | | //æ¸©åº¦å¼ |
| | | private String temperature; |
| | | |
| | | //æ¸©åº¦å¼ |
| | | private String humidity; |
| | | |
| | | //ç´¢å¼ï¼ä»0å¼å§ |
| | | private String position; |
| | | |
| | | |
| | | public GrainTH() { |
| | | } |
| | | |
| | | public GrainTH(String temperature, String humidity ,String position) { |
| | | this.humidity = humidity; |
| | | this.temperature = temperature; |
| | | this.position = position; |
| | | } |
| | | } |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | | import org.apache.commons.lang3.RandomUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | |
| | | WeatherWebDto weather = WeatherWebDto.contextMap.get("default"); |
| | | double tMIn = 20, tMax = 25; |
| | | double tMIn = 10, tMax = 15; |
| | | if (null != weather) { |
| | | double tOut = Double.valueOf(weather.getTem()); |
| | | tMIn = tOut - 4; |
| | | if (tMIn < 4) tMIn = 5; |
| | | tMax = tOut + 0; |
| | | if (tMax < 15) tMax = 15; |
| | | tMIn = tOut - 5; |
| | | tMax = tOut; |
| | | } |
| | | |
| | | if (tMIn < 10) tMIn = 10; |
| | | if (tMIn > 20) tMIn = 20; |
| | | if (tMax < 15) tMax = 15; |
| | | if (tMax > 25) tMax = 25; |
| | | |
| | | //æ°æ®å°è£
|
| | | GrainData grain = new GrainData(); |
| | |
| | | double randomNumber = tMIn; |
| | | int x = 0, y = 0, z = 0; |
| | | for (int i = 0; i < sumNum; i++) { |
| | | if ((i) % Integer.valueOf(cableRule[0]) == 0) { |
| | | randomNumber = Math.random() * (tMax - tMIn + 1) + tMIn; |
| | | |
| | | } else if ((i) % Integer.valueOf(cableRule[0]) == 1) { |
| | | randomNumber = Math.random() * (tMax - tMIn + 1) + tMIn; |
| | | |
| | | } else if ((i) % Integer.valueOf(cableRule[0]) == 2) { |
| | | randomNumber = Math.random() * (tMax - tMIn + 1) + tMIn; |
| | | |
| | | } else if ((i) % Integer.valueOf(cableRule[0]) == 3) { |
| | | randomNumber = Math.random() * (tMax - tMIn + 1) + tMIn; |
| | | |
| | | } else if ((i) % Integer.valueOf(cableRule[0]) == 4) { |
| | | randomNumber = Math.random() * (tMax - tMIn + 1) + tMIn; |
| | | |
| | | } else { |
| | | randomNumber = Math.random() * (tMax - tMIn + 1) + tMIn; |
| | | |
| | | log.info("i=ï¼" + i); |
| | | if (i % cableZ == 0) { |
| | | randomNumber = RandomUtils.nextDouble(tMIn, tMax+1.5); |
| | | log.info("第1屿¸©åº¦ï¼" + randomNumber); |
| | | } else if (i % cableZ == 1) { |
| | | randomNumber = RandomUtils.nextDouble(tMIn-1, tMax-0); |
| | | log.info("第2屿¸©åº¦ï¼" + randomNumber); |
| | | } else if (i % cableZ == 2) { |
| | | randomNumber = RandomUtils.nextDouble(tMIn-2, tMax-1.5); |
| | | log.info("第3屿¸©åº¦ï¼" + randomNumber); |
| | | } else if (i % cableZ == 3) { |
| | | randomNumber = RandomUtils.nextDouble(tMIn-3, tMax-3); |
| | | log.info("第4屿¸©åº¦ï¼" + randomNumber); |
| | | } else if (i % cableZ == 4) { |
| | | randomNumber = RandomUtils.nextDouble(tMIn-4, tMax-4.5); |
| | | log.info("第5屿¸©åº¦ï¼" + randomNumber); |
| | | } |
| | | // randomNumber = Math.random() * (tMax - tMIn + 1) + tMIn; |
| | | curTemp = NumberUtil.keepPrecision(randomNumber, 1); |
| | |
| | | } |
| | | |
| | | outPut.setTemperature(temperature); |
| | | List<GrainTH> ths = new ArrayList<>(); |
| | | |
| | | ths.add(new GrainTH(weather.getTem()!=null?weather.getTem()+"":"",weather.getHumidity()!=null?weather.getHumidity()+"":"","1")); |
| | | outPut.setTemperatureAndhumidity(ths); |
| | | |
| | | grain.setOutput(JSONObject.toJSONString(outPut)); |
| | | |
| | |
| | | lpr.setCarNumber(carNumber); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("carNumber", carNumber); |
| | | jsonObject.put("position", "big"); |
| | | jsonObject.put("position", device.getPosition()); |
| | | packet.setProperties(jsonObject); |
| | | |
| | | packet.setTimestamp(System.currentTimeMillis()); |
| | |
| | | private void analysisGrain(IoMessage message) { |
| | | try { |
| | | |
| | | //æ ¹æ®åæºSNè·å设å¤é
ç½®ä¿¡æ¯ |
| | | GatewayDevice gatewayDevice = GatewayUtils.getCacheByDeviceSn(message.getAddr()); |
| | | if (null == gatewayDevice) { |
| | | replayGrain(message); |
| | | log.error("主æº-------->>å¹³å°ï¼è§£æç²®æ
å¤±è´¥ï¼æªè·åå°ç³»ç»è®¾å¤é
置信æ¯ï¼" + message.getAddr()); |
| | | return; |
| | | } |
| | | //æ ¹æ®åæºå°åè·ååæºä¿¡æ¯ |
| | | ApiCommonDevice commonDevice = Constant.getCommonDeviceCache(message.getAddr()); |
| | | ApiCommonDevice commonDevice = Constant.getCommonDeviceCache(message.getIp()); |
| | | if (commonDevice == null) { |
| | | replayGrain(message); |
| | | log.error("主æº-------->>å¹³å°ï¼è§£æç²®æ
å¤±è´¥ï¼æªè·åå°ç³»ç»ç²®æ
主æºé
ç½®ï¼" + message.getAddr()); |
| | | return; |
| | | } |
| | | |
| | | //æ ¹æ®åæºSNè·å设å¤é
ç½®ä¿¡æ¯ |
| | | GatewayDevice gatewayDevice = GatewayUtils.getCacheByDeviceSn(commonDevice.getSn()); |
| | | if (null == gatewayDevice) { |
| | | replayGrain(message); |
| | | log.error("主æº-------->>å¹³å°ï¼è§£æç²®æ
å¤±è´¥ï¼æªè·åå°ç³»ç»è®¾å¤é
置信æ¯ï¼" + message.getAddr()); |
| | | return; |
| | | } |
| | | |
| | | |
| | | //è·å请æ±ä¿¡æ¯ |
| | | BaseReqData reqData = ProtocolUtils.getSyncReq(gatewayDevice.getDepotIdSys()); |
| | |
| | | outPut.setAvgTemperature(NumberUtil.keepPrecision((sumT / sumNum), 1) + ""); |
| | | outPut.setMinTemperature(min + ""); |
| | | outPut.setMaxTemperature(min + ""); |
| | | List<GrainTH> ths = new ArrayList<>(); |
| | | |
| | | ths.add(new GrainTH(thDto.getTempIn()!=null?thDto.getTempIn()+"":"",thDto.getHumidityIn()!=null?thDto.getHumidityIn()+"":"","1")); |
| | | outPut.setTemperatureAndhumidity(ths); |
| | | grain.setOutput(JSONObject.toJSONString(outPut)); |
| | | |
| | | GatewayDevice gatewayDeviceWeather = GatewayUtils.getCacheByDeviceTypeOne(GatewayDeviceType.TYPE_09.getCode()); |
| | |
| | | // é
置系ç»å¿è·³é´é |
| | | ioServerOption.setReaderIdleTime(5 * 60); |
| | | |
| | | NettyServer ioServer = new NettyServer(ioServerOption, messageConsume, ioSessionListener, heartbeatProvider); |
| | | ioServer = new NettyServer(ioServerOption, messageConsume, ioSessionListener, heartbeatProvider); |
| | | ioServer.startup(); |
| | | |
| | | |
| | | log.info("* "); |
| | | log.info("* ========================"); |
| | |
| | | GatewayDevice device = reqData.getDevice(); |
| | | |
| | | //è·åè¿æ¥ä¸ç设å¤ä¿¡æ¯ |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getDeviceSn()); |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getIp()); |
| | | |
| | | if (null == apiCommonDevice) { |
| | | resp.setCode(500); |
| | |
| | | } |
| | | |
| | | outPut.setTemperature(temperature); |
| | | List<GrainTH> ths = new ArrayList<>(); |
| | | |
| | | ths.add(new GrainTH(response.getTIn()!=null?response.getTIn()+"":"",response.getHIn()!=null?response.getHIn()+"":"","1")); |
| | | outPut.setTemperatureAndhumidity(ths); |
| | | //grain.setOutput(JSONObject.toJSONString(outPut)); |
| | | grain.setOutput(com.alibaba.fastjson2.JSONObject.toJSONString(outPut)); |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | //æ§è¡çåæºä¿¡æ¯ |
| | | ApiCommonDevice commonDevice = Constant.getCommonDeviceCache(message.getSn()); |
| | | ApiCommonDevice commonDevice = Constant.getCommonDeviceCacheBySn(message.getSn()); |
| | | if (null == commonDevice) { |
| | | log.warn("æ§å¶æ------>>>å¹³å°ï¼å½åç»ç»ç¼ç ={}ï¼åæºID={}ï¼ç³»ç»æ²¡æè·åå°åæºä¿¡æ¯ï¼æ¥ææ æ³è¿è¡è§£æ", message.getCompanyId(), message.getIedId()); |
| | | return; |
| | |
| | | GatewayDevice device = reqData.getDevice(); |
| | | |
| | | //è·åè¿æ¥ä¸ç设å¤ä¿¡æ¯ |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getDeviceSn()); |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getIp()); |
| | | |
| | | if (null == apiCommonDevice) { |
| | | resp.setCode(500); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.utils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.DecimalFormat; |
| | | |
| | | /** |
| | | * æ°åæ ¼å¼åå·¥å
·ç±» |
| | | */ |
| | | public class NumberUtil { |
| | | |
| | | /** |
| | | * 对doubleç±»åçæ°å¼ä¿çæå®ä½æ°çå°æ°ã<br> |
| | | * è¯¥æ¹æ³èå
¥æ¨¡å¼ï¼åâææ¥è¿çâæ°åèå
¥ï¼å¦æä¸ä¸¤ä¸ªç¸é»æ°åçè·ç¦»ç¸çï¼å为åä¸èå
¥çèå
¥æ¨¡å¼ã<br> |
| | | * <b>注æï¼</b>å¦æç²¾åº¦è¦æ±æ¯è¾ç²¾ç¡®è¯·ä½¿ç¨ keepPrecision(String number, int precision)æ¹æ³ |
| | | * @param number è¦ä¿çå°æ°çæ°å |
| | | * @param precision å°æ°ä½æ° |
| | | * @return double 妿æ°å¼è¾å¤§ï¼å使ç¨ç§å¦è®¡æ°æ³è¡¨ç¤º |
| | | */ |
| | | public static double keepPrecision(Double number, int precision) { |
| | | if(null == number || 0.0 == number ) return 0.0; |
| | | BigDecimal bg = new BigDecimal(number); |
| | | return bg.setScale(precision, BigDecimal.ROUND_HALF_UP).doubleValue(); |
| | | } |
| | | |
| | | /** |
| | | * 对floatç±»åçæ°å¼ä¿çæå®ä½æ°çå°æ°ã<br> |
| | | * è¯¥æ¹æ³èå
¥æ¨¡å¼ï¼åâææ¥è¿çâæ°åèå
¥ï¼å¦æä¸ä¸¤ä¸ªç¸é»æ°åçè·ç¦»ç¸çï¼å为åä¸èå
¥çèå
¥æ¨¡å¼ã<br> |
| | | * <b>注æï¼</b>å¦æç²¾åº¦è¦æ±æ¯è¾ç²¾ç¡®è¯·ä½¿ç¨ keepPrecision(String number, int precision)æ¹æ³ |
| | | * @param number è¦ä¿çå°æ°çæ°å |
| | | * @param precision å°æ°ä½æ° |
| | | * @return float 妿æ°å¼è¾å¤§ï¼å使ç¨ç§å¦è®¡æ°æ³è¡¨ç¤º |
| | | */ |
| | | public static float keepPrecision(Float number, int precision) { |
| | | if(null == number) return 0f; |
| | | BigDecimal bg = new BigDecimal(number); |
| | | return bg.setScale(precision, BigDecimal.ROUND_HALF_UP).floatValue(); |
| | | } |
| | | /** |
| | | * double转å符串ï¼é¿å
åºç°ç§å¦è®¡æ°æ³ |
| | | * @param d |
| | | * @return |
| | | */ |
| | | public static String doubleToStr(Double d) { |
| | | if(null == d) return ""; |
| | | DecimalFormat df = new DecimalFormat("0.0"); |
| | | return df.format(d); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println((8) % Integer.valueOf(4) == 0); |
| | | } |
| | | } |
| | |
| | | auto-offset-reset: latest |
| | | key-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | value-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | |
| | | mqtt: |
| | | host: tcp://127.0.0.1:1883 |
| | | username: admin |
| | |
| | | isOpen: false |
| | | default-topic: mqtt/+/test1 |
| | | topics: /device-message-sender/# |
| | | license: |
| | | subject: ld_license |
| | | publicAlias: publicCert |
| | | storePass: PUBLICFZZYXXJSGFYXGS888888 |
| | | licensePath: D:/IGDS/license/license.lic |
| | | publicKeysStorePath: D:/IGDS/license/publicCerts.keystore |
| | | igds: |
| | | default: |
| | | companyId: 5338 |
| | | file-path: D:/app/igds-api |
| | | img-path: D:/IGDS/FILE/ |
| | | weather-url: https://v1.yiketianqi.com/api?unescape=1&version=v61&appid={appId}&appsecret={appsecret}&cityid={cityid} |
| | |
| | | server: |
| | | port: 8081 |
| | | jetty: |
| | | max-http-post-size: 209715200 |
| | | tomcat: |
| | | max-http-post-size: 209715200 |
| | | port: 8090 |
| | | |
| | | spring: |
| | | datasource: |
| | | #ä¸»æ°æ®æº |
| | | primary: |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_api?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_api_2023?useUnicode=true&useSSL=false&characterEncoding=utf-8 |
| | | username: root |
| | | password: Abc123.. |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | #æ¬¡æ°æ®æº |
| | | secondary: |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_dl?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_v4?useUnicode=true&useSSL=false&characterEncoding=utf-8 |
| | | |
| | | username: root |
| | | password: Abc123.. |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | |
| | | dialect: org.hibernate.dialect.MySQL5InnoDBDialect |
| | | # Redisç¸å
³é
ç½® |
| | | redis: |
| | | database: 0 |
| | | database: 5 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: |
| | |
| | | max-wait: -1 |
| | | max-idle: 10 |
| | | min-idle: 0 |
| | | timeout: 6000 |
| | | timeout: 6000 |
| | | kafka: |
| | | bootstrap-servers: 103.203.217.16:9092 |
| | | producer: |
| | | retries: 0 |
| | | acks: 1 |
| | | batch-size: 16384 |
| | | buffer-memory: 33554432 |
| | | key-serializer: org.apache.kafka.common.serialization.StringSerializer |
| | | value-serializer: org.apache.kafka.common.serialization.StringSerializer |
| | | properties: |
| | | security.protocol: SASL_PLAINTEXT |
| | | sasl.mechanism: PLAIN |
| | | sasl.username: sc001 |
| | | sasl.password: wCV0ISwmoKwbx1lpBKMW |
| | | sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username='sc001' password='wCV0ISwmoKwbx1lpBKMW'; |
| | | consumer: |
| | | group-id: fzzygroup |
| | | enable-auto-commit: true |
| | | auto-commit-interval: 100 |
| | | auto-offset-reset: latest |
| | | key-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | value-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | |
| | | mqtt: |
| | | host: tcp://127.0.0.1:1883 |
| | | username: admin |
| | | password: admin123321 |
| | | client-inId: fzzy_client_id_in_igds_api |
| | | client-outId: fzzy_client_id_out_igds_api |
| | | completionTimeout: 3000 |
| | | keep-alive-interval: 2 |
| | | max-connect-times: 5 |
| | | qos: 0 |
| | | isOpen: false |
| | | default-topic: mqtt/+/test1 |
| | | topics: /device-message-sender/# |
| | | license: |
| | | subject: ld_license |
| | | publicAlias: publicCert |
| | | storePass: PUBLICFZZYXXJSGFYXGS888888 |
| | | licensePath: D:/IGDS/license/license.lic |
| | | publicKeysStorePath: D:/IGDS/license/publicCerts.keystore |
| | | igds: |
| | | default: |
| | | companyId: 5338 |
| | | file-path: D:/app/igds-api |
| | | img-path: D:/IGDS/FILE/ |
| | | weather-url: https://v1.yiketianqi.com/api?unescape=1&version=v61&appid={appId}&appsecret={appsecret}&cityid={cityid} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ########################## ä»å¯¿ ########################## |
| | | server: |
| | | port: 8090 |
| | | jetty: |
| | | max-http-post-size: 209715200 |
| | | tomcat: |
| | | max-http-post-size: 209715200 |
| | | spring: |
| | | datasource: |
| | | #ä¸»æ°æ®æº |
| | | primary: |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_api?useUnicode=true&characterEncoding=utf-8 |
| | | username: root |
| | | password: Fzzy@#$%5432..K |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | #æ¬¡æ°æ®æº |
| | | secondary: |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_master?useUnicode=true&characterEncoding=utf-8 |
| | | username: root |
| | | password: Fzzy@#$%5432..K |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | jpa: |
| | | #主jpaé
ç½® |
| | | primary: |
| | | show-sql: true |
| | | properties: |
| | | hibernate: |
| | | hbm2ddl: |
| | | auto: update |
| | | dialect: org.hibernate.dialect.MySQL5InnoDBDialect |
| | | #次jpaé
ç½® |
| | | secondary: |
| | | show-sql: true |
| | | properties: |
| | | hibernate: |
| | | hbm2ddl: |
| | | auto: none |
| | | dialect: org.hibernate.dialect.MySQL5InnoDBDialect |
| | | # Redisç¸å
³é
ç½® |
| | | redis: |
| | | database: 1 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: Redispwd.. |
| | | # è¿æ¥æ± æå¤§è¿æ¥æ°ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | pool: |
| | | max-active: 200 |
| | | max-wait: -1 |
| | | max-idle: 10 |
| | | min-idle: 0 |
| | | timeout: 6000 |
| | | kafka: |
| | | bootstrap-servers: 103.203.217.16:9092 |
| | | producer: |
| | | retries: 0 |
| | | acks: 1 |
| | | batch-size: 16384 |
| | | buffer-memory: 33554432 |
| | | key-serializer: org.apache.kafka.common.serialization.StringSerializer |
| | | value-serializer: org.apache.kafka.common.serialization.StringSerializer |
| | | properties: |
| | | security.protocol: SASL_PLAINTEXT |
| | | sasl.mechanism: PLAIN |
| | | sasl.username: sc001 |
| | | sasl.password: wCV0ISwmoKwbx1lpBKMW |
| | | sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username='sc001' password='wCV0ISwmoKwbx1lpBKMW'; |
| | | consumer: |
| | | group-id: fzzygroup |
| | | enable-auto-commit: true |
| | | auto-commit-interval: 100 |
| | | auto-offset-reset: latest |
| | | key-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | value-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | |
| | | mqtt: |
| | | host: tcp://127.0.0.1:1883 |
| | | username: admin |
| | | password: admin123321 |
| | | client-inId: fzzy_client_id_in_igds_api |
| | | client-outId: fzzy_client_id_out_igds_api |
| | | completionTimeout: 3000 |
| | | keep-alive-interval: 2 |
| | | max-connect-times: 5 |
| | | qos: 0 |
| | | isOpen: false |
| | | default-topic: mqtt/+/test1 |
| | | topics: /device-message-sender/# |
| | | license: |
| | | subject: ld_license |
| | | publicAlias: publicCert |
| | | storePass: PUBLICFZZYXXJSGFYXGS888888 |
| | | licensePath: D:/IGDS/license/license.lic |
| | | publicKeysStorePath: D:/IGDS/license/publicCerts.keystore |
| | | igds: |
| | | default: |
| | | companyId: 5338 |
| | | file-path: D:/app/igds-api |
| | | img-path: D:/IGDS/FILE/ |
| | | weather-url: https://v1.yiketianqi.com/api?unescape=1&version=v61&appid={appId}&appsecret={appsecret}&cityid={cityid} |
| | |
| | | datasource: |
| | | #ä¸»æ°æ®æº |
| | | primary: |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_api_2023?useUnicode=true&useSSL=false&characterEncoding=utf-8 |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_api?useUnicode=true&useSSL=false&characterEncoding=utf-8 |
| | | username: root |
| | | password: Abc123.. |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | #æ¬¡æ°æ®æº |
| | | secondary: |
| | | url: jdbc:mysql://127.0.0.1:3306/igds_v4?useUnicode=true&useSSL=false&characterEncoding=utf-8 |
| | | url: jdbc:mysql://127.0.0.1:3306/igdsv4?useUnicode=true&useSSL=false&characterEncoding=utf-8 |
| | | |
| | | username: root |
| | | password: Abc123.. |
| | |
| | | auto-offset-reset: latest |
| | | key-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | value-deserializer: org.apache.kafka.common.serialization.StringDeserializer |
| | | |
| | | mqtt: |
| | | host: tcp://127.0.0.1:1883 |
| | | username: admin |
| | |
| | | qos: 0 |
| | | isOpen: false |
| | | default-topic: mqtt/+/test1 |
| | | topics: /device-message-sender/# |
| | | topics: /device-message-sender/# |
| | | license: |
| | | subject: ld_license |
| | | publicAlias: publicCert |
| | | storePass: PUBLICFZZYXXJSGFYXGS888888 |
| | | licensePath: D:/IGDS/license/license.lic |
| | | publicKeysStorePath: D:/IGDS/license/publicCerts.keystore |
| | | igds: |
| | | default: |
| | | companyId: 5338 |
| | | file-path: D:/app/igds-api |
| | | img-path: D:/IGDS/FILE/ |
| | | weather-url: https://v1.yiketianqi.com/api?unescape=1&version=v61&appid={appId}&appsecret={appsecret}&cityid={cityid} |