Kaynağa Gözat

添加admin子工程、gateway子工程配置

zhuoning 3 yıl önce
ebeveyn
işleme
f7b951d8d9

+ 33 - 0
huimv-common-admin/huimv-admin/pom.xml

@@ -11,5 +11,38 @@
 
     <artifactId>huimv-admin</artifactId>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
 
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- JPA -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+        <!-- mysql -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <!-- redis -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+
+        <!-- actuator -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+    </dependencies>
 </project>

+ 19 - 0
huimv-common-admin/huimv-admin/src/main/java/com/huimv/admin/HuimvAdminApplication.java

@@ -0,0 +1,19 @@
+package com.huimv.admin;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @Project : huimv.shiwan
+ * @Package : com.huimv.biosafety.uface.controller
+ * @Description : TODO
+ * @Version : 1.0
+ * @Author : ZhuoNing
+ * @Create : 2020-12-25
+ **/
+@SpringBootApplication
+public class HuimvAdminApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(HuimvAdminApplication.class, args);
+    }
+}

+ 62 - 0
huimv-common-admin/huimv-admin/src/main/resources/application-dev.yml

@@ -0,0 +1,62 @@
+server:
+  port: 8090
+
+spring:
+  application:
+    name: huimv-admin
+
+  datasource:
+    url: jdbc:mysql://192.168.1.7:3306/huimv-admin2?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 服务器
+#  rabbitmq:
+#    host: 10.0.0.4
+#    port: 5672
+#    username: huimv
+#    password: hm123456
+#    #虚拟host 可以不设置,使用server默认host
+#    virtual-host: /
+
+  #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
+    lettuce:
+      pool:
+        max-active: 3
+        min-idle: 2
+        max-idle: 3
+        max-wait: 1
+      shutdown-timeout: 100
+
+  data:
+    redis:
+      repositories:
+        enabled: false
+
+  #是否缓存空值
+  cache:
+    redis:
+      cache-null-values: false
+
+
+

+ 4 - 0
huimv-common-admin/huimv-admin/src/main/resources/application.properties

@@ -0,0 +1,4 @@
+spring.profiles.active=dev
+
+#¿ªÆô½¡¿µ¼à¿Ø
+management.endpoints.web.exposure.include=*

+ 18 - 0
huimv-common-admin/huimv-gateway/pom.xml

@@ -11,5 +11,23 @@
 
     <artifactId>huimv-gateway</artifactId>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- actuator -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+    </dependencies>
 
 </project>

+ 19 - 0
huimv-common-admin/huimv-gateway/src/main/java/com/huimv/gateway/huimvGatewayApplication.java

@@ -0,0 +1,19 @@
+package com.huimv.gateway;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @Project : huimv.shiwan
+ * @Package : com.huimv.biosafety.uface.controller
+ * @Description : TODO
+ * @Version : 1.0
+ * @Author : ZhuoNing
+ * @Create : 2020-12-25
+ **/
+@SpringBootApplication
+public class huimvGatewayApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(huimvGatewayApplication.class, args);
+    }
+}

+ 54 - 0
huimv-common-admin/huimv-gateway/src/main/resources/application-dev.yml

@@ -0,0 +1,54 @@
+server:
+  port: 8092
+
+spring:
+  application:
+    name: huimv-gateway
+
+#  datasource:
+#    url: jdbc:mysql://192.168.1.7:3306/huimv-admin2?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
+
+
+#  #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
+#    lettuce:
+#      pool:
+#        max-active: 3
+#        min-idle: 2
+#        max-idle: 3
+#        max-wait: 1
+#      shutdown-timeout: 100
+#
+#  data:
+#    redis:
+#      repositories:
+#        enabled: false
+#
+#  #是否缓存空值
+#  cache:
+#    redis:
+#      cache-null-values: false
+
+
+

+ 4 - 0
huimv-common-admin/huimv-gateway/src/main/resources/application.properties

@@ -0,0 +1,4 @@
+spring.profiles.active=dev
+
+#¿ªÆô½¡¿µ¼à¿Ø
+management.endpoints.web.exposure.include=*

+ 40 - 0
huimv-common-admin/pom.xml

@@ -32,6 +32,46 @@
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <!-- lombok -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.16.18</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- netty -->
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-all</artifactId>
+            <version>4.1.45.Final</version>
+        </dependency>
+        <!-- lombok -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.16.18</version>
+            <scope>provided</scope>
+        </dependency>
+        <!--hutool-->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.6.5</version>
+        </dependency>
+        <!-- httpclient -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.5</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
     <build>