liaoyongfei 4 lat temu
rodzic
commit
5a9ec71b34

+ 1 - 0
mpwechatApp/mpwechatApp.iml

@@ -25,6 +25,7 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:3.6.5" level="project" />
     <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.10" level="project" />
     <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.0.0.RELEASE" level="project" />

+ 37 - 0
mpwechatApp/src/main/resources/application-dev.properties

@@ -14,6 +14,7 @@ eureka.instance.ip-address = true
 #instance-id: ${spring.cloud.client.ipAddress}:${server.port}
 eureka.instance.instance-id = 192.168.10.68:${server.port}
 
+## rabbitmq
 #spring.rabbitmq.host = 127.0.0.1
 #spring.rabbitmq.port = 5672
 #spring.rabbitmq.username = guest
@@ -87,6 +88,42 @@ spring.ue.datasource.url= jdbc:sqlserver://219.128.77.86:1433;DatabaseName=qywec
 spring.ue.datasource.username= test
 spring.ue.datasource.password= 360ljtest!
 
+# quartz
+spring.quartz.properties.org.quartz.scheduler.instanceName = clusteredScheduler
+spring.quartz.properties.org.quartz.scheduler.instanceId = AUTO
+
+spring.quartz.properties.org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+spring.quartz.properties.org.quartz.threadPool.threadCount = 10
+spring.quartz.properties.org.quartz.threadPool.threadPriority = 5
+spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
+
+spring.quartz.properties.org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
+spring.quartz.properties.org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+spring.quartz.properties.org.quartz.jobStore.tablePrefix = QRTZ_
+spring.quartz.properties.org.quartz.jobStore.useProperties = true
+spring.quartz.properties.org.quartz.jobStore.isClustered = true
+spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval = 15000
+spring.quartz.properties.org.quartz.jobStore.dataSource = mySource
+
+spring.quartz.properties.org.quartz.dataSource.mySource.driver = com.mysql.jdbc.Driver
+spring.quartz.properties.org.quartz.dataSource.mySource.URL = jdbc:mysql://139.159.192.185:3306/qywechattest?useUnicode=true&characterEncoding=utf-8
+spring.quartz.properties.org.quartz.dataSource.mySource.user = cdh
+spring.quartz.properties.org.quartz.dataSource.mySource.password = CDH360lj#com2019
+spring.quartz.properties.org.quartz.dataSource.mySource.initialPoolSize = 3
+spring.quartz.properties.org.quartz.dataSource.mySource.maxPoolSize = 5
+spring.quartz.properties.org.quartz.dataSource.mySource.minPoolSize = 1
+spring.quartz.properties.org.quartz.dataSource.mySource.maxIdleTime = 3600
+spring.quartz.properties.org.quartz.dataSource.mySource.testConnectionOnCheckin = true
+spring.quartz.properties.org.quartz.dataSource.mySource.idleConnectionTestPeriod = 60
+spring.quartz.properties.org.quartz.dataSource.mySource.preferredTestQuery = select 1
+
+spring.quartz.job-store-type = jdbc
+#\u662F\u5426\u7B49\u5F85\u4EFB\u52A1\u6267\u884C\u5B8C\u6BD5\u540E\uFF0C\u5BB9\u5668\u624D\u4F1A\u5173\u95ED
+spring.quartz.wait-for-jobs-to-complete-on-shutdown = true
+#\u914D\u7F6Ejob\u662F\u5426\u8986\u76D6\u6570\u636E\u5E93\u5DF2\u7ECF\u5B58\u5728\u7684JOB\u4FE1\u606F
+spring.quartz.overwrite-existing-jobs = true
+
+
 clientMember.port= 8090
 clientMember.service.id= memb
 

+ 29 - 0
mpwechatApp/src/main/resources/application-prod.properties

@@ -70,6 +70,35 @@ spring.ue.datasource.url= jdbc:sqlserver://localhost:1433;DatabaseName=qywechat
 spring.ue.datasource.username= appauth
 spring.ue.datasource.password= 360lj.comAppauth#2020
 
+# quartz
+spring.quartz.properties.org.quartz.scheduler.instanceName = clusteredScheduler
+spring.quartz.properties.org.quartz.scheduler.instanceId = AUTO
+
+spring.quartz.properties.org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+spring.quartz.properties.org.quartz.threadPool.threadCount = 10
+spring.quartz.properties.org.quartz.threadPool.threadPriority = 5
+spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
+
+spring.quartz.properties.org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
+spring.quartz.properties.org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+spring.quartz.properties.org.quartz.jobStore.tablePrefix = QRTZ_
+spring.quartz.properties.org.quartz.jobStore.useProperties = true
+spring.quartz.properties.org.quartz.jobStore.isClustered = true
+spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval = 15000
+spring.quartz.properties.org.quartz.jobStore.dataSource = mySource
+
+spring.quartz.properties.org.quartz.dataSource.mySource.driver = com.mysql.jdbc.Driver
+spring.quartz.properties.org.quartz.dataSource.mySource.URL = jdbc:mysql://139.159.192.185:3306/qywechat?useUnicode=true&characterEncoding=utf-8
+spring.quartz.properties.org.quartz.dataSource.mySource.user = cdh
+spring.quartz.properties.org.quartz.dataSource.mySource.password = CDH360lj#com2019
+spring.quartz.properties.org.quartz.dataSource.mySource.initialPoolSize = 3
+spring.quartz.properties.org.quartz.dataSource.mySource.maxPoolSize = 10
+spring.quartz.properties.org.quartz.dataSource.mySource.minPoolSize = 1
+spring.quartz.properties.org.quartz.dataSource.mySource.maxIdleTime = 3600
+spring.quartz.properties.org.quartz.dataSource.mySource.testConnectionOnCheckin = true
+spring.quartz.properties.org.quartz.dataSource.mySource.idleConnectionTestPeriod = 60
+spring.quartz.properties.org.quartz.dataSource.mySource.preferredTestQuery = select 1
+
 clientMember.port= 8005
 clientMember.service.id= memb
 

+ 29 - 0
mpwechatApp/src/main/resources/application-test.properties

@@ -70,6 +70,35 @@ spring.ue.datasource.url= jdbc:sqlserver://219.128.77.86:1433;DatabaseName=qywec
 spring.ue.datasource.username= test
 spring.ue.datasource.password= 360ljtest!
 
+# quartz
+spring.quartz.properties.org.quartz.scheduler.instanceName = clusteredScheduler
+spring.quartz.properties.org.quartz.scheduler.instanceId = AUTO
+
+spring.quartz.properties.org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+spring.quartz.properties.org.quartz.threadPool.threadCount = 10
+spring.quartz.properties.org.quartz.threadPool.threadPriority = 5
+spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
+
+spring.quartz.properties.org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
+spring.quartz.properties.org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+spring.quartz.properties.org.quartz.jobStore.tablePrefix = QRTZ_
+spring.quartz.properties.org.quartz.jobStore.useProperties = true
+spring.quartz.properties.org.quartz.jobStore.isClustered = true
+spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval = 15000
+spring.quartz.properties.org.quartz.jobStore.dataSource = mySource
+
+spring.quartz.properties.org.quartz.dataSource.mySource.driver = com.mysql.jdbc.Driver
+spring.quartz.properties.org.quartz.dataSource.mySource.URL = jdbc:mysql://139.159.192.185:3306/qywechattest?useUnicode=true&characterEncoding=utf-8
+spring.quartz.properties.org.quartz.dataSource.mySource.user = cdh
+spring.quartz.properties.org.quartz.dataSource.mySource.password = CDH360lj#com2019
+spring.quartz.properties.org.quartz.dataSource.mySource.initialPoolSize = 3
+spring.quartz.properties.org.quartz.dataSource.mySource.maxPoolSize = 5
+spring.quartz.properties.org.quartz.dataSource.mySource.minPoolSize = 1
+spring.quartz.properties.org.quartz.dataSource.mySource.maxIdleTime = 3600
+spring.quartz.properties.org.quartz.dataSource.mySource.testConnectionOnCheckin = true
+spring.quartz.properties.org.quartz.dataSource.mySource.idleConnectionTestPeriod = 60
+spring.quartz.properties.org.quartz.dataSource.mySource.preferredTestQuery = select 1
+
 clientMember.port= 8090
 clientMember.service.id= memb
 

+ 1 - 45
mpwechatApp/src/main/resources/application.yml

@@ -44,51 +44,7 @@ spring:
             max-file-size : 10MB
             max-request-size : 20MB
     profiles:
-        active: prod
-    quartz:
-        properties:
-            org:
-                quartz:
-                    scheduler:
-                        instanceName: clusteredScheduler
-                        instanceId: AUTO
-                    threadPool:
-                        class: org.quartz.simpl.SimpleThreadPool
-                        #执行最大并发线程数量
-                        threadCount: 10
-                        threadPriority: 5
-                        #配置是否启动自动加载数据库内的定时任务
-                        threadsInheritContextClassLoaderOfInitializingThread: true
-                    jobStore:
-                        #选择JDBC的存储方式
-                        class: org.quartz.impl.jdbcjobstore.JobStoreTX
-                        #配置数据库类型
-                        driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-                        tablePrefix: QRTZ_
-                        useProperties: true
-                        isClustered: true
-                        clusterCheckinInterval: 15000
-                        #定义数据源
-                        dataSource: mySource
-                    dataSource:
-                        mySource:
-                            driver: com.mysql.jdbc.Driver
-                            URL: jdbc:mysql://139.159.192.185:3306/qywechattest?useUnicode=true&characterEncoding=utf-8
-                            user: cdh
-                            password: CDH360lj#com2019
-                            initialPoolSize: 3
-                            maxPoolSize: 5
-                            minPoolSize: 1
-                            maxIdleTime: 3600
-                            testConnectionOnCheckin: true
-                            idleConnectionTestPeriod: 60
-                            preferredTestQuery: select 1
-        job-store-type: jdbc
-        #是否等待任务执行完毕后,容器才会关闭
-        wait-for-jobs-to-complete-on-shutdown: true
-        #配置job是否覆盖数据库已经存在的JOB信息
-        overwrite-existing-jobs: true
-
+        active: dev
 
 management:
     endpoints: