Procházet zdrojové kódy

增加新数据库的内网地址指向

zhuoning před 2 roky
rodič
revize
0f0bbe9f72

+ 9 - 10
huimv-eartag2-platform/huimv-eartag2-manage2/src/main/resources/application-prod2.yml

@@ -5,9 +5,9 @@ spring:
     name: huimv-eartag2-manage2
 
   datasource:
-    url: jdbc:mysql://122.112.224.199:3306/huimv_cattle?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
-    username: root
-    password: hm123456
+    url: jdbc:mysql://10.0.0.77:3309/huimv-demo-eartag20?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: eartag
+    password: eartag@2022
     driver-class-name: com.mysql.cj.jdbc.Driver
   jpa:
     show-sql: true
@@ -18,16 +18,13 @@ spring:
     open-in-view: true
 
   rabbitmq:
-    host: 121.36.134.218
+    #host: 121.36.134.218
+    host: 10.0.0.14
     port: 5672
     username: admin
     password: admin
     #虚拟host 可以不设置,使用server默认host
     virtual-host: /
-    #    publisher-confirms: true #(过时、弃用)
-    publisher-confirm-type: correlated
-    #确认消息已发送到队列(Queue)
-    publisher-returns: true
     listener:
       simple:
         acknowledge-mode: none
@@ -35,7 +32,8 @@ spring:
   #redis
   redis:
     database: 0
-    host: 121.36.134.218
+#    host: 121.36.134.218
+    host: 10.0.0.14
     port: 6379
     password: hm123456
     timeout: 5000ms
@@ -48,6 +46,7 @@ spring:
 
 mybatis-plus:
   configuration:
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
   # mapper.xml文件所存放的位置
   mapper-locations: classpath*:com/huimv/eartag2/manage2/mapper/xml/*.xml  # 不加这一行出错:“org.apache.ibatis.binding.BindingException:  Invalid bound statement (not found)”

+ 50 - 0
huimv-eartag2-platform/huimv-eartag2-manage2/src/main/resources/application-test.yml

@@ -0,0 +1,50 @@
+server:
+  port: 8099
+spring:
+  application:
+    name: huimv-eartag2-manage2
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv-demo-eartag20?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai
+    username: root
+    password: hm123456
+    driver-class-name: com.mysql.cj.jdbc.Driver
+  jpa:
+    show-sql: true
+    database: mysql
+    hibernate:
+      ddl-auto: update
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+    open-in-view: true
+
+  rabbitmq:
+    host: 121.36.134.218
+    #    host: 10.0.0.14
+    port: 5672
+    username: admin
+    password: admin
+    #虚拟host 可以不设置,使用server默认host
+    virtual-host: /eartag_test
+    listener:
+      simple:
+        acknowledge-mode: none
+
+  #redis
+  redis:
+    database: 0
+    host: 192.168.1.68
+    port: 6379
+    password: hm123456
+    timeout: 5000ms
+    jedis:
+      pool:
+        max-active: 20
+        max-wait: -1
+        max-idle: 10
+        min-idle: 0
+
+mybatis-plus:
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  # mapper.xml文件所存放的位置
+  mapper-locations: classpath*:com/huimv/eartag2/manage2/mapper/xml/*.xml  # 不加这一行出错:“org.apache.ibatis.binding.BindingException:  Invalid bound statement (not found)”

+ 1 - 2
huimv-eartag2-platform/huimv-eartag2-manage2/src/main/resources/application.properties

@@ -1,6 +1,5 @@
 #spring.profiles.active=dev2
-#spring.profiles.active=prod2
-spring.profiles.active=test
+spring.profiles.active=prod2
 
 # mysql:/cache:
 device.online.access_mode=mysql