Browse Source

fix: 基础结构

Xp 2 years ago
parent
commit
65020ac2c4

+ 1 - 1
pom.xml

@@ -4,7 +4,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          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>
     <modelVersion>4.0.0</modelVersion>
 
 
-    <groupId>com.chelvc</groupId>
+    <groupId>com.chelvc.cloud</groupId>
     <artifactId>vehicle</artifactId>
     <artifactId>vehicle</artifactId>
     <packaging>pom</packaging>
     <packaging>pom</packaging>
     <version>1.0.0-RELEASE</version>
     <version>1.0.0-RELEASE</version>

+ 3 - 2
vehicle-api/pom.xml

@@ -3,9 +3,10 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          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">
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
     <parent>
-        <artifactId>vehicle</artifactId>
-        <groupId>com.chelvc</groupId>
+        <groupId>com.chelvc.platform</groupId>
+        <artifactId>platform-dependencies</artifactId>
         <version>1.0.0-RELEASE</version>
         <version>1.0.0-RELEASE</version>
+        <relativePath/>
     </parent>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <modelVersion>4.0.0</modelVersion>
 
 

+ 4 - 10
vehicle-service/pom.xml

@@ -3,9 +3,10 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          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">
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
     <parent>
-        <artifactId>vehicle</artifactId>
-        <groupId>com.chelvc</groupId>
+        <groupId>com.chelvc.platform</groupId>
+        <artifactId>platform-cloud</artifactId>
         <version>1.0.0-RELEASE</version>
         <version>1.0.0-RELEASE</version>
+        <relativePath/>
     </parent>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <modelVersion>4.0.0</modelVersion>
 
 
@@ -22,13 +23,12 @@
         <platform-security.version>1.0.0-RELEASE</platform-security.version>
         <platform-security.version>1.0.0-RELEASE</platform-security.version>
         <platform-database.version>1.0.0-RELEASE</platform-database.version>
         <platform-database.version>1.0.0-RELEASE</platform-database.version>
         <mysql-connector-java.version>5.1.13</mysql-connector-java.version>
         <mysql-connector-java.version>5.1.13</mysql-connector-java.version>
-        <dubbo.version>3.0.12</dubbo.version>
     </properties>
     </properties>
 
 
     <dependencies>
     <dependencies>
 
 
         <dependency>
         <dependency>
-            <groupId>com.chelvc</groupId>
+            <groupId>com.chelvc.cloud</groupId>
             <artifactId>vehicle-api</artifactId>
             <artifactId>vehicle-api</artifactId>
             <version>${vehicle-api.version}</version>
             <version>${vehicle-api.version}</version>
             <optional>true</optional>
             <optional>true</optional>
@@ -79,14 +79,8 @@
         <dependency>
         <dependency>
             <groupId>mysql</groupId>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
             <artifactId>mysql-connector-java</artifactId>
-            <version>${mysql-connector-java.version}</version>
         </dependency>
         </dependency>
 
 
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo</artifactId>
-            <version>${dubbo.version}</version>
-        </dependency>
     </dependencies>
     </dependencies>
 
 
 </project>
 </project>

+ 17 - 0
vehicle-service/src/main/java/com/chelvc/cloud/service/VehicleServer.java

@@ -0,0 +1,17 @@
+package com.chelvc.cloud.service;
+
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @author xp
+ * @data 2023/3/29
+ */
+@EnableDubbo
+@SpringBootApplication
+public class VehicleServer {
+    public static void main(String[] args) {
+        SpringApplication.run(VehicleServer.class, args);
+    }
+}

+ 0 - 15
vehicle-service/src/main/java/com/chelvc/service/VehicleApplication.java

@@ -1,15 +0,0 @@
-package com.chelvc.service;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * @author xp
- * @data 2023/3/29
- */
-@SpringBootApplication(scanBasePackages = "com.chelvc")
-public class VehicleApplication {
-    public static void main(String[] args) {
-        SpringApplication.run(VehicleApplication.class, args);
-    }
-}

+ 1 - 0
vehicle-service/src/main/resources/application-dev.yml

@@ -10,6 +10,7 @@ spring:
     url: jdbc:mysql://localhost:3306/vehicle?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
     url: jdbc:mysql://localhost:3306/vehicle?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
     username: root
     username: root
     password: 12345678
     password: 12345678
+    driver-class-name: com.mysql.cj.jdbc.Driver
 
 
 dubbo:
 dubbo:
   registry:
   registry: