Browse Source

计费定时任务配置

hym 3 years ago
parent
commit
30c221ed91

+ 65 - 0
zoniot-pay/zoniot-pay-xxljob-client/src/main/resources/application-dev.properties

@@ -0,0 +1,65 @@
+server.port=8335
+spring.application.name=zoniot-xxljob-pay-client
+logging.level.root=info
+logging.path=./logs/zoniot-xxljob-client
+
+
+#xxl-job �������Ĺ��̵ĵ�ַ
+xxl.job.admin.addresses=http://10.0.0.62:8080/xxl-job-admin/
+xxl.job.executor.appname=zoniot-xxljob-pay-client
+xxl.job.executor.ip=
+xxl.job.executor.port=9998
+xxl.job.executor.logpath=/app/sit/uims/zoniot-xxljob-client/xxl-job-log
+xxl.job.accessToken=
+xxl.job.executor.logretentiondays=30
+
+
+# mysql
+spring.datasource.url=jdbc:mysql://10.0.0.63:3306/revenue_system?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.username=root
+spring.datasource.password=100zone
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.hikari.max-lifetime=30000
+
+# druid
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.druid.initial-size=5
+spring.datasource.druid.min-idle=5
+spring.datasource.druid.max-active=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.time-between-eviction-runs-millis=60000
+spring.datasource.druid.min-evictable-idle-time-millis=300000
+spring.datasource.druid.validation-query=SELECT 1
+spring.datasource.druid.test-while-idle=true
+spring.datasource.druid.test-on-borrow=true
+spring.datasource.druid.test-on-return=false
+spring.datasource.druid.pool-prepared-statements=true
+spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
+spring.datasource.druid.filters=stat,wall
+spring.datasource.druid.connection-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+
+# mybatis
+mybatis.mapper-locations=classpath:mapper/*.xml,classpath*:mapper/pay/*.xml
+mybatis.type-aliases-package=com.zcxk.rmcp.pay.entity
+mybatis.configuration.map-underscore-to-camel-case=true
+mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+mybatis.configuration.use-column-label=true
+
+spring.jackson.time-zone=GMT+8
+
+
+
+# redis
+spring.redis.host=10.0.0.63
+spring.redis.port=6379
+spring.redis.database=2
+spring.redis.timeout=500000
+
+# Lettuce
+spring.redis.lettuce.pool.max-active=8
+spring.redis.lettuce.pool.max-wait=100
+spring.redis.lettuce.pool.max-idle=8
+spring.redis.lettuce.pool.min-idle=0
+spring.redis.lettuce.shutdown-timeout=100
+spring.main.allow-bean-definition-overriding=true
+spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848

+ 83 - 0
zoniot-pay/zoniot-pay-xxljob-client/src/main/resources/application-prd.properties

@@ -0,0 +1,83 @@
+server.port=8327
+spring.application.name=user-center
+logging.level.root=info
+logging.path=./logs/user-center
+#\u6570\u636E\u5E93\u914D\u7F6E
+spring.datasource.url=jdbc:mysql://10.0.0.137:3306/uims?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.username=root
+spring.datasource.password=100Zone@123
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.hikari.max-lifetime=30000
+mybatis-plus.mapper-locations=classpath:mapper/*.xml
+mybatis-plus.type-aliases-package=com.zcxk.entity
+mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+mybatis-plus.global-config.db-config.logic-delete-value=0 
+mybatis-plus.global-config.db-config.logic-not-delete-value=1
+spring.jackson.time-zone=GMT+8
+#spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+#spring.jackson.joda-date-time-format: yyyy-MM-dd HH:mm:ss
+
+# utils
+spring.redis.host=10.0.0.136
+spring.redis.port=6379
+spring.redis.password=zoniot
+spring.redis.database=2
+spring.redis.timeout=36000
+
+# Lettuce
+# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
+spring.redis.lettuce.pool.max-active=8
+# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
+spring.redis.lettuce.pool.max-wait=100
+# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
+spring.redis.lettuce.pool.max-idle=8
+# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
+spring.redis.lettuce.pool.min-idle=0
+# \u5173\u95ED\u8D85\u65F6\u65F6\u95F4
+spring.redis.lettuce.shutdown-timeout=100
+
+
+security.oauth2.client.client-id=smart-city-v2
+security.oauth2.client.client-secret=smart-city-v2-123
+security.oauth2.resource.id=smartcity-deivice-service
+security.oauth2.resource.user-info-uri=http://10.0.0.136:8321/user/principal
+security.oauth2.resource.prefer-token-info=false
+
+
+spring.servlet.multipart.max-file-size=100MB
+spring.servlet.multipart.max-request-size=100MB
+spring.servlet.multipart.location=${logging.path}/data
+
+#kafka server
+spring.kafka.bootstrap-servers=114.135.61.188:36377
+#kafka consumer config
+spring.kafka.consumer.group-id=user-group-dev
+spring.kafka.consumer.auto-offset-reset=latest
+spring.kafka.consumer.enable-auto-commit=true
+#kafka producer config
+spring.kafka.producer.retries=0
+spring.kafka.producer.batch-size=4096
+spring.kafka.producer.buffer-memory=40960
+
+spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer
+spring.kafka.consumer.value-deserializer=org.springframework.kafka.support.serializer.JsonDeserializer
+spring.kafka.consumer.properties.spring.json.trusted.packages=*
+
+#nacos
+spring.cloud.nacos.discovery.server-addr=10.0.0.136:8848
+UMIS.sys_config_path=/UMIS_USER_IMAGES/
+UMIS.sys_excel_path=/UMIS_USER_EXCEL/
+#utils
+spring.rabbitmq.host=47.112.217.10
+spring.rabbitmq.port=5672
+spring.rabbitmq.username=huaxu
+spring.rabbitmq.password=huaxu123
+spring.rabbitmq.virtual-host=/
+spring.rabbitmq.connection-timeout=15000
+spring.rabbitmq.publisher-confirm-type=correlated
+spring.rabbitmq.publisher-returns=true
+spring.rabbitmq.template.mandatory=true
+receive.exchange.name=messageExchangeTest
+dispath.routing.key=dipathKeyTest
+dispath.queue=dispathTest
+add_iot_user_url=http://39.108.175.9:8090/api/integration/user/savePlatformUser

+ 68 - 0
zoniot-pay/zoniot-pay-xxljob-client/src/main/resources/application-sit.properties

@@ -0,0 +1,68 @@
+server.port=8330
+spring.application.name=zoniot-xxljob-client
+logging.level.root=info
+logging.path=./logs
+
+
+#xxl-job �������Ĺ��̵ĵ�ַ
+xxl.job.admin.addresses=http://10.0.0.62:8080/xxl-job-admin/
+xxl.job.executor.appname=zoniot-xxljob-client
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+xxl.job.executor.logpath=/app/sit/uims/zoniot-xxljob-client/xxl-job-log
+xxl.job.accessToken=
+xxl.job.executor.logretentiondays=30
+
+
+# mysql
+spring.datasource.url=jdbc:mysql://10.0.0.63:3306/rmcp_v2?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.username=root
+spring.datasource.password=100zone
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.hikari.max-lifetime=30000
+
+# druid
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.druid.initial-size=5
+spring.datasource.druid.min-idle=5
+spring.datasource.druid.max-active=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.time-between-eviction-runs-millis=60000
+spring.datasource.druid.min-evictable-idle-time-millis=300000
+spring.datasource.druid.validation-query=SELECT 1
+spring.datasource.druid.test-while-idle=true
+spring.datasource.druid.test-on-borrow=true
+spring.datasource.druid.test-on-return=false
+spring.datasource.druid.pool-prepared-statements=true
+spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
+spring.datasource.druid.filters=stat,wall
+spring.datasource.druid.connection-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+
+# mybatis
+mybatis.mapper-locations=classpath:com/zcxk/rmcp/core/mapper/*.xml
+mybatis.type-aliases-package=com.zcxk.rmcp.core.entity
+mybatis.configuration.map-underscore-to-camel-case=true
+mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+mybatis.configuration.use-column-label=true
+
+spring.jackson.time-zone=GMT+8
+
+#mongodb url
+spring.data.mongodb.uri=mongodb://10.0.0.63:27017/meter-reading-database
+#logging.level.org.springframework.data.mongodb.core=DEBUG
+
+# redis
+spring.redis.host=10.0.0.63
+spring.redis.port=6379
+spring.redis.database=2
+spring.redis.timeout=500000
+
+# Lettuce
+spring.redis.lettuce.pool.max-active=8
+spring.redis.lettuce.pool.max-wait=100
+spring.redis.lettuce.pool.max-idle=8
+spring.redis.lettuce.pool.min-idle=0
+spring.redis.lettuce.shutdown-timeout=100
+
+
+

+ 2 - 0
zoniot-pay/zoniot-pay-xxljob-client/src/main/resources/application.properties

@@ -0,0 +1,2 @@
+#开发环境:dev  测试环境:sit  线上环境:prd
+spring.profiles.active=dev

+ 43 - 0
zoniot-pay/zoniot-pay-xxljob-client/src/main/resources/logback-spring.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <springProperty scope="context" name="LOG_PATH" source="logging.path" defaultValue="/tmp" />
+    <springProperty scope="context" name="APPLICATION_NAME" source="spring.application.name" defaultValue="default" />
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+    <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
+    <jmxConfigurator/>
+
+    <!-- 按照每天生成日志文件 -->
+    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+        </encoder>
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <!-- rollover daily -->
+            <fileNamePattern>${LOG_PATH}/${APPLICATION_NAME}-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!-- each file should be at most 100MB, keep 60 days worth of history, but at most 10GB -->
+            <maxFileSize>100MB</maxFileSize>
+            <maxHistory>60</maxHistory>
+            <totalSizeCap>100GB</totalSizeCap>
+        </rollingPolicy>
+
+    </appender>
+
+    <springProfile name="dev,test">
+        <logger name="com.zcxk" level="DEBUG"/>
+        <logger name="org.springframework" level="INFO"/>
+        <logger name="org.apache" level="INFO"/>
+    </springProfile>
+
+    <springProfile name="prop">
+        <logger name="com.zcxk" level="DEBUG"/>
+        <logger name="org.springframework" level="INFO"/>
+        <logger name="org.apache" level="INFO"/>
+    </springProfile>
+
+    <root level="INFO">
+        <appender-ref ref="CONSOLE"/>
+        <appender-ref ref="FILE"/>
+    </root>
+
+</configuration>