Explorar o código

修改配置文件,发包

Signed-off-by: tangsong <86121657@qq.com>
tangsong hai 1 ano
pai
achega
9d700f2218
Modificáronse 3 ficheiros con 86 adicións e 5 borrados
  1. 9 4
      pom.xml
  2. 76 0
      src/main/resources/bootstrap-devmysql.yml
  3. 1 1
      src/main/resources/bootstrap.yml

+ 9 - 4
pom.xml

@@ -24,6 +24,11 @@
24 24
             <version>1.0.28</version>
25 25
         </dependency>
26 26
         <dependency>
27
+            <groupId>mysql</groupId>
28
+            <artifactId>mysql-connector-java</artifactId>
29
+            <version>8.0.18</version>
30
+        </dependency>
31
+        <dependency>
27 32
             <groupId>org.springframework.boot</groupId>
28 33
             <artifactId>spring-boot-starter-web</artifactId>
29 34
         </dependency>
@@ -56,12 +61,12 @@
56 61
             <groupId>org.springframework.cloud</groupId>
57 62
             <artifactId>spring-cloud-starter-openfeign</artifactId>
58 63
         </dependency>
59
-      <!--  <dependency>
64
+        <dependency>
60 65
             <artifactId>message-client</artifactId>
61 66
             <groupId>com.unis.message</groupId>
62 67
             <version>0.0.1-SNAPSHOT</version>
63
-        </dependency>-->
64
-        <dependency>
68
+        </dependency>
69
+<!--       <dependency>
65 70
             <artifactId>message-client</artifactId>
66 71
             <groupId>com.unis.message</groupId>
67 72
             <version>1.0-SNAPSHOT</version>
@@ -78,7 +83,7 @@
78 83
             <systemPath>
79 84
                 ${project.basedir}/src/main/resources/lib/message-common-1.0-SNAPSHOT.jar
80 85
             </systemPath>
81
-        </dependency>
86
+        </dependency>-->
82 87
         <dependency>
83 88
             <groupId>org.hibernate</groupId>
84 89
             <artifactId>hibernate-core</artifactId>

+ 76 - 0
src/main/resources/bootstrap-devmysql.yml

@@ -0,0 +1,76 @@
1
+server:
2
+  port: 13006
3
+spring:
4
+  jpa:
5
+    open-in-view: true
6
+    database: mysql
7
+    show-sql: true
8
+    properties:
9
+      hibernate:
10
+        dialect: org.hibernate.dialect.MySQLDialect
11
+  application:
12
+    name: message-app
13
+  devtools:
14
+    restart:
15
+      enabled: false
16
+  datasource:
17
+    type: com.alibaba.druid.pool.DruidDataSource
18
+    url: jdbc:mysql://101.36.160.140:10311/message?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2b8
19
+    username: root
20
+    password: admin@1234
21
+    driver-class-name: com.mysql.cj.jdbc.Driver
22
+    druid:
23
+#db-type: mysql
24
+      initial-size: 5
25
+      max-active: 30
26
+      min-idle: 5
27
+      max-wait: 60000
28
+      pool-prepared-statements: true
29
+      max-pool-prepared-statement-per-connection-size: 30
30
+      validation-query: SELECT 1 FROM DUAL
31
+      test-on-borrow: false
32
+      test-on-return: false
33
+      test-while-idle: true
34
+      time-between-connect-error-millis: 60000
35
+      min-evictable-idle-time-millis: 300000
36
+      max-evictable-idle-time-millis: 3000000
37
+      filters: stat,wall
38
+      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
39
+      use-global-data-source-stat: true
40
+      web-stat-filter:
41
+        url-pattern: /*
42
+        exclusions: /druid/*,*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico
43
+        enabled: true
44
+        session-stat-enable: true
45
+        session-stat-max-count: 10
46
+      stat-view-servlet:
47
+        url-pattern: /druid/*
48
+        reset-enable: true
49
+        login-username: druid
50
+        login-password: druid
51
+      #如果出现错误立刻停止服务。
52
+      #fail-fast: true
53
+mybatis:
54
+  configuration:
55
+    map-underscore-to-camel-case: true
56
+  type-aliases-package: com.unis.ynls.irpt.server.entity
57
+  mapper-locations:
58
+    - classpath:mybatis/mapper/*.xml
59
+#服务注册配置
60
+eureka:
61
+  client:
62
+    service-url:
63
+#      defaultZone: http://eureka-server:11000/eureka/
64
+      defaultZone: http://172.16.0.4:11000/eureka/
65
+  instance:
66
+    prefer-ip-address: true
67
+    status-page-url-path: /swagger-ui.html
68
+#日志配置
69
+logging:
70
+  level:
71
+    com.unis: debug
72
+    root: warn
73
+    org.springframework.web: debug
74
+    org.hibernate: error
75
+    com.unis.demo.controller: info
76
+  path: ./log/

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -1,4 +1,4 @@
1 1
 spring:
2 2
   profiles:
3
-    active: dev
3
+    active: devmysql
4 4