Insights Hub (MindSphere)Github官方Java SDK Example 项目转 MAVEN项目运行

本文详细介绍了如何下载并配置JAVASDKExample项目,将其转换为Maven项目,以及如何添加必要的依赖。内容包括环境设置、Maven项目创建、Demo项目整合和依赖管理,适用于SpringBoot框架的开发者。
摘要由CSDN通过智能技术生成

JAVA SDK Example 项目本地开发使用

基础准备

项目下载地址:

https://github.com/mindsphere/mindsphere-java-sdk-examples

环境配置

请参考:文章配置 JDK JRE Win11 Java JDK JRE环境变量0配置安装-CSDN博客
MAVEN MAVEN 下载及配置ali阿里镜像的Maven库-CSDN博客
IDE SpringTools 4 (Eclipse)
下载地址:Spring | Tools

项目修改为MAVEN项目

1 创建一个空的MAVEN项目
1.1右键点击project explorer的空白处按照图中 点击选择
在这里插入图片描述

1.2
在这里插入图片描述

1.3
在这里插入图片描述

1.4
在这里插入图片描述

2 项目整合
Demo项目解压
在这里插入图片描述

将图中的 文件夹复制到 Springtools的Maven 项目的src/main/java
在这里插入图片描述

将图中的 文件复制到 Springtools的Maven 项目的src/main/resource

依赖清单:
在这里插入图片描述


	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.7.16</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>
	<groupId>Siemens</groupId>
	<artifactId>InsightHubDemo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>InsightsHub</name>
	<description>MINDSPHERE learn</description>

	<dependencies>
		<dependency>
			<groupId>com.auth0</groupId>
			<artifactId>java-jwt</artifactId>
			<version>3.10.3</version>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.11</version>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-boot-starter</artifactId>
			<version>3.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-aop</artifactId>
		</dependency>

		<!-- Swagger3 -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-boot-starter</artifactId>
			<version>3.0.0</version>
		</dependency>


		<!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>3.0.0</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.github.xiaoymin/knife4j-spring-boot-starter -->
		<dependency>
			<groupId>com.github.xiaoymin</groupId>
			<artifactId>knife4j-spring-boot-starter</artifactId>
			<version>3.0.3</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy</artifactId>
			<version>2.4.6</version>
		</dependency>
		<dependency>
			<groupId>org.thymeleaf</groupId>
			<artifactId>thymeleaf</artifactId>
		</dependency>
		<dependency>
			<groupId>org.thymeleaf</groupId>
			<artifactId>thymeleaf-spring5</artifactId>
			<version>3.0.11.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>nz.net.ultraq.thymeleaf</groupId>
			<artifactId>thymeleaf-layout-dialect</artifactId>
		</dependency>


		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>1.2.38</version>
		</dependency>

		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>agentmanagement-sdk</artifactId>
			<version>3.2.10</version>
		</dependency>


		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>assetmanagement-sdk</artifactId>
			<version>3.9.9</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>eventanalytics-sdk</artifactId>
			<version>3.2.1</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>eventmanagement-sdk</artifactId>
			<version>3.8.10</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>integrateddatalake-sdk</artifactId>
			<version>3.2.4</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>iotbulk-sdk</artifactId>
			<version>3.5.1</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>iotfileservices-sdk</artifactId>
			<version>3.3.0</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>mindconnect-sdk</artifactId>
			<version>3.5.3</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>mindsphere-sdk-java-core</artifactId>
			<version>2.4.0</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>timeseries-sdk</artifactId>
			<version>3.4.5</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>tokenmanager-sdk</artifactId>
			<version>3.1.5</version>
		</dependency>
		<dependency>
			<groupId>com.siemens.mindsphere</groupId>
			<artifactId>tsaggregates-sdk</artifactId>
			<version>4.0.0</version>
		</dependency>

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.6</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.5</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>

			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
						</exclude>
					</excludes>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值