Prechádzať zdrojové kódy

更新 search-service 配置, 现在可以正常启动

reghao 10 mesiacov pred
rodič
commit
5babe59692

+ 2 - 1
README.md

@@ -13,8 +13,9 @@
 - mysql:5.7
 - redis
 - rabbitmq
-- zookeeper:3.4
+- zookeeper:3.8.4
 - mongodb:4.4
+- elasticsearch:7.17.18
 
 ## 模块
 tnb 项目模块:

+ 5 - 0
search/search-service/pom.xml

@@ -124,6 +124,11 @@
             <version>2.0.1</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>io.springfox</groupId>
             <artifactId>springfox-boot-starter</artifactId>

+ 13 - 4
search/search-service/src/main/resources/application-cluster.yml

@@ -4,17 +4,26 @@ log:
   token: 012345678
 dubbo:
   registry:
-    address: zookeeper://localhost:2181
+    address: zookeeper://192.168.0.210:2181
 spring:
   cloud:
     discovery:
       enabled: true
   redis:
     database: 0
-    host: localhost
+    host: 192.168.0.210
     port: 6379
-    password: Dev@123456
+    password: Test@123456
+  datasource:
+    url: jdbc:mysql://192.168.0.210/tnb_content_tdb?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
+    username: test
+    password: Test@123456
+es:
+  host: 127.0.0.1
+  port: 9200
+  username: elastic
+  password: VLTtN03SSJ4lsyyg56kf
 eureka:
   client:
     service-url:
-      defaultZone: http://localhost:6060/eureka/
+      defaultZone: http://192.168.0.210:6060/eureka/

+ 9 - 0
search/search-service/src/main/resources/application-dev.yml

@@ -14,6 +14,15 @@ spring:
     host: localhost
     port: 6379
     password: Dev@123456
+  datasource:
+    url: jdbc:mysql://127.0.0.1/reghao_bnt_rdb?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
+    username: dev
+    password: Dev@123456
+es:
+  host: 127.0.0.1
+  port: 9200
+  username: elastic
+  password: VLTtN03SSJ4lsyyg56kf
 eureka:
   client:
     service-url:

+ 13 - 4
search/search-service/src/main/resources/application-test.yml

@@ -4,17 +4,26 @@ log:
   token: 012345678
 dubbo:
   registry:
-    address: zookeeper://localhost:2181
+    address: zookeeper://192.168.0.210:2181
 spring:
   cloud:
     discovery:
       enabled: true
   redis:
     database: 0
-    host: localhost
+    host: 192.168.0.210
     port: 6379
-    password: Dev@123456
+    password: Test@123456
+  datasource:
+    url: jdbc:mysql://192.168.0.210/tnb_content_tdb?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
+    username: test
+    password: Test@123456
+es:
+  host: 127.0.0.1
+  port: 9200
+  username: elastic
+  password: VLTtN03SSJ4lsyyg56kf
 eureka:
   client:
     service-url:
-      defaultZone: http://localhost:6060/eureka/
+      defaultZone: http://192.168.0.210:6060/eureka/

+ 12 - 0
search/search-service/src/main/resources/application.yml

@@ -18,6 +18,9 @@ spring:
     name: search-service
   profiles:
     active: @profile.active@
+  mvc:
+    pathmatch:
+      matching-strategy: ant_path_matcher
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.zaxxer.hikari.HikariDataSource
@@ -30,6 +33,15 @@ spring:
       max-lifetime: 1800000
       connection-timeout: 30000
       connection-test-query: SELECT 1
+  jpa:
+    show-sql: false
+    open-in-view: true
+    hibernate:
+      ddl-auto: update
+    properties:
+      hibernate.format_sql: true
+      hibernate.naming.physical-strategy: org.hibernate.scripts.model.naming.PhysicalNamingStrategyStandardImpl
+      hibernate.cache.use_second_level_cache: false
 eureka:
   instance:
     prefer-ip-address: true