Browse Source

发包

Signed-off-by: tangsong <86121657@qq.com>
tangsong 1 year ago
parent
commit
9eb048fab1

+ 15 - 0
pom.xml

@@ -44,6 +44,21 @@
44 44
             <artifactId>feign-form-spring</artifactId>
45 45
             <version>3.0.3</version>
46 46
         </dependency>
47
+        <dependency>
48
+            <groupId>com.gbase</groupId>
49
+            <artifactId>druid</artifactId>
50
+            <version>1.0.28</version>
51
+        </dependency>
52
+        <dependency>
53
+            <groupId>com.gbase8s</groupId>
54
+            <artifactId>ifxjdbc</artifactId>
55
+            <version>1.0</version>
56
+        </dependency>
57
+        <dependency>
58
+            <groupId>mysql</groupId>
59
+            <artifactId>mysql-connector-java</artifactId>
60
+            <version>8.0.18</version>
61
+        </dependency>
47 62
     </dependencies>
48 63
     <build>
49 64
         <plugins>

+ 1 - 0
src/main/java/com/unis/indicator/app/IndicatorAppApplication.java

@@ -19,5 +19,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
19 19
 public class IndicatorAppApplication {
20 20
     public static void main(String[] args) {
21 21
         SpringApplication.run(IndicatorAppApplication.class, args);
22
+        System.out.println("=====启动完成=========");
22 23
     }
23 24
 }

+ 45 - 17
src/main/resources/bootstrap.yml

@@ -3,25 +3,53 @@ server:
3 3
   tomcat:
4 4
     basedir: /unis/app/deploy/temp
5 5
 spring:
6
+  jpa:
7
+    open-in-view: true
8
+    database: mysql
9
+    show-sql: true
10
+    properties:
11
+      hibernate:
12
+        dialect: org.hibernate.dialect.MySQLDialect
6 13
   application:
7 14
     name: indicator-app
8
-  servlet:
9
-    multipart:
10
-      location: /unis/app/deploy/temp
11
-  #配置中心配置
12
-  cloud:
13
-    config:
14
-      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
15
-      discovery:
15
+  devtools:
16
+    restart:
17
+      enabled: false
18
+  datasource:
19
+    type: com.alibaba.druid.pool.DruidDataSource
20
+    url: jdbc:mysql://101.36.160.140:10311/price?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
21
+    username: root
22
+    password: admin@1234
23
+    driver-class-name: com.mysql.cj.jdbc.Driver
24
+    druid:
25
+#db-type: mysql
26
+      initial-size: 5
27
+      max-active: 30
28
+      min-idle: 5
29
+      max-wait: 60000
30
+      pool-prepared-statements: true
31
+      max-pool-prepared-statement-per-connection-size: 30
32
+      validation-query: SELECT 1 FROM DUAL
33
+      test-on-borrow: false
34
+      test-on-return: false
35
+      test-while-idle: true
36
+      time-between-connect-error-millis: 60000
37
+      min-evictable-idle-time-millis: 300000
38
+      max-evictable-idle-time-millis: 3000000
39
+      filters: stat,wall
40
+      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
41
+      use-global-data-source-stat: true
42
+      web-stat-filter:
43
+        url-pattern: /*
44
+        exclusions: /druid/*,*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico
16 45
         enabled: true
17
-        service-id: config
18
-      name: feign
19
-      profile: dev
20
-      username: configuser
21
-      password: configpasd
22
-      retry:
23
-        max-attempts: 5
24
-        max-interval: 2000
46
+        session-stat-enable: true
47
+        session-stat-max-count: 10
48
+      stat-view-servlet:
49
+        url-pattern: /druid/*
50
+        reset-enable: true
51
+        login-username: druid
52
+        login-password: druid
25 53
       #如果出现错误立刻停止服务。
26 54
       #fail-fast: true
27 55
 #服务注册配置
@@ -29,7 +57,7 @@ eureka:
29 57
   client:
30 58
     service-url:
31 59
 #     defaultZone: http://eureka-server:11000/eureka/
32
-      defaultZone: http://172.16.0.73:11000/eureka/
60
+      defaultZone: http://172.16.0.4:11000/eureka/
33 61
       #defaultZone: http://192.168.123.15:11000/eureka/
34 62
   instance:
35 63
     prefer-ip-address: true

+ 46 - 0
src/main/resources/bootstrapback.yml

@@ -0,0 +1,46 @@
1
+server:
2
+  port: 13004
3
+  tomcat:
4
+    basedir: /unis/app/deploy/temp
5
+spring:
6
+  application:
7
+    name: indicator-app
8
+  servlet:
9
+    multipart:
10
+      location: /unis/app/deploy/temp
11
+  #配置中心配置
12
+  cloud:
13
+    config:
14
+      #使用discovery 时需要将eureka 写到该文件中,开发环境使用该方式,推荐使用。
15
+      discovery:
16
+        enabled: true
17
+        service-id: config
18
+      name: feign
19
+      profile: dev
20
+      username: configuser
21
+      password: configpasd
22
+      retry:
23
+        max-attempts: 5
24
+        max-interval: 2000
25
+      #如果出现错误立刻停止服务。
26
+      #fail-fast: true
27
+#服务注册配置
28
+eureka:
29
+  client:
30
+    service-url:
31
+#     defaultZone: http://eureka-server:11000/eureka/
32
+      defaultZone: http://172.16.0.73:11000/eureka/
33
+      #defaultZone: http://192.168.123.15:11000/eureka/
34
+  instance:
35
+    prefer-ip-address: true
36
+    status-page-url-path: /swagger-ui.html
37
+
38
+#日志配置
39
+logging:
40
+  level:
41
+    com.unis.indicator.app: debug
42
+    root: warn
43
+    org.springframework.web: debug
44
+    org.hibernate: error
45
+    com.unis.indicator.app.controller: info
46
+  path: ./log/