Browse Source

项目完善

王育民 4 years ago
parent
commit
0bc74eb6da
3 changed files with 33 additions and 3 deletions
  1. 0 1
      pom.xml
  2. 24 1
      server-service-impl/pom.xml
  3. 9 1
      server-service-impl/src/main/resources/application.yml

+ 0 - 1
pom.xml

@@ -36,7 +36,6 @@
     </properties>
 
     <dependencies>
-
         <!-- Web -->
         <dependency>
             <groupId>org.springframework.boot</groupId>

+ 24 - 1
server-service-impl/pom.xml

@@ -2,12 +2,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <artifactId>server-parent</artifactId>
         <groupId>cn.minbb</groupId>
         <version>1.0-SNAPSHOT</version>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
 
     <artifactId>server-service-impl</artifactId>
 
@@ -31,6 +32,28 @@
             <version>1.0-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
+
+        <!-- MySQL https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>8.0.25</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+            <version>5.3.7</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.2.6</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 9 - 1
server-service-impl/src/main/resources/application.yml

@@ -1,5 +1,12 @@
 server:
   port: 8001
+spring:
+  datasource:
+    url: jdbc:mysql://cdb-7yzyxn36.bj.tencentcdb.com:10047/smallpunch?useSSL=false&serverTimezone=GMT%2B8&characterEncoding=utf8&useUnicode=true&allowPublicKeyRetrieval=true
+    username: zxx
+    password: zxx5201314
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
 dubbo:
   application:
     name: server-provider
@@ -16,6 +23,7 @@ dubbo:
     check: false
     timeout: 3000
 mybatis:
-  mapper-locations: classpath:mapper/*.xml
+  mapper-locations: classpath:/mapper/*.xml
   config-location: classpath:mybatis/mybatis-config.xml
   check-config-location: true
+  typeAliasesPackage: cn.minbb.server.beans