李进 2 роки тому
коміт
a310e1bf38

+ 21 - 0
device-api-cloud/pom.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+    <parent>
+        <artifactId>xy-device</artifactId>
+        <groupId>com.xy</groupId>
+        <version>1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>device-api-cloud</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.xy</groupId>
+            <artifactId>device-api</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+</project>

+ 21 - 0
device-api-service/pom.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+    <parent>
+        <artifactId>xy-device</artifactId>
+        <groupId>com.xy</groupId>
+        <version>1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>device-api-service</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.xy</groupId>
+            <artifactId>device-api</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+</project>

+ 15 - 0
device-api/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+    <parent>
+        <artifactId>xy-device</artifactId>
+        <groupId>com.xy</groupId>
+        <version>1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>device-api</artifactId>
+
+
+</project>

+ 21 - 0
device-start/pom.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+    <parent>
+        <artifactId>xy-device</artifactId>
+        <groupId>com.xy</groupId>
+        <version>1.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>device-start</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.xy</groupId>
+            <artifactId>device-api-service</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+</project>

+ 12 - 0
device-start/src/main/java/com/xy/StartCloud.java

@@ -0,0 +1,12 @@
+package com.xy;
+
+import org.springframework.boot.SpringApplication;
+
+@CloudApplication
+public class StartCloud {
+
+    public static void main(String[] args) {
+        SpringApplication.run(StartCloud.class);
+    }
+
+}

+ 13 - 0
device-start/src/main/resources/bootstrap.yml

@@ -0,0 +1,13 @@
+spring:
+  profiles:
+    include: cloud
+
+server:
+  port: 8002
+
+#微服务相关配置
+cloud:
+  service:
+    name: device
+  center:
+    url: 119.96.213.127:9007

+ 49 - 0
pom.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+
+    <groupId>com.xy</groupId>
+    <artifactId>xy-device</artifactId>
+    <version>1.0</version>
+    <modules>
+        <module>device-api</module>
+        <module>device-api-cloud</module>
+        <module>device-api-service</module>
+        <module>device-start</module>
+    </modules>
+    <packaging>pom</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.xy</groupId>
+            <artifactId>nacos</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>com.xy</groupId>
+                <artifactId>xy-cloud</artifactId>
+                <version>1.0</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <!-- 下载 -->
+    <repositories>
+        <repository>
+            <id>release</id>
+            <name>release</name>
+            <url>http://119.96.213.127:9010/maven/libs-release-local</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+</project>