This commit is contained in:
parent
b936b1ebc9
commit
36eccebd31
|
@ -0,0 +1,21 @@
|
||||||
|
CREATE TABLE api_configs (
|
||||||
|
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||||
|
name VARCHAR(64) NOT NULL COMMENT 'API名称',
|
||||||
|
url VARCHAR(255) NOT NULL COMMENT 'API URL地址',
|
||||||
|
api_key VARCHAR(255) DEFAULT NULL COMMENT 'API访问密钥',
|
||||||
|
api_secret VARCHAR(512) DEFAULT NULL COMMENT 'API安全密钥',
|
||||||
|
status TINYINT(1) UNSIGNED DEFAULT 0 COMMENT '状态(0-启用 1-停用)',
|
||||||
|
create_time datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
update_time datetime COMMENT '更新时间',
|
||||||
|
create_by VARCHAR(64) DEFAULT NULL COMMENT '创建人',
|
||||||
|
update_by VARCHAR(64) DEFAULT NULL COMMENT '更新人',
|
||||||
|
is_deleted TINYINT(1) UNSIGNED DEFAULT 0 COMMENT '是否删除(0-未删除 1-已删除)',
|
||||||
|
remark VARCHAR(255) DEFAULT NULL COMMENT '备注',
|
||||||
|
PRIMARY KEY (id),
|
||||||
|
UNIQUE KEY uk_name (name) COMMENT 'API名称唯一索引',
|
||||||
|
KEY idx_status (status) COMMENT '状态索引'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='API信息配置表';
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO api_configs (name, url, api_key, api_secret, status,create_by)
|
||||||
|
VALUES("海康平台API","https://116.53.205.228:14443/artemis","21887937","hwOzOEqxuPDz5frAnEXb",0,"admin");
|
|
@ -107,6 +107,11 @@
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>tcctyn-system</module>
|
<module>tcctyn-system</module>
|
||||||
<module>tcctyn-gen</module>
|
<module>tcctyn-gen</module>
|
||||||
|
<module>tcctyn-iot</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>tcctyn-modules</artifactId>
|
<artifactId>tcctyn-modules</artifactId>
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
<?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>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.tcctyn</groupId>
|
||||||
|
<artifactId>tcctyn-modules</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>tcctyn-iot</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
tcctyn-iot物联网模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos Config -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Sentinel -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot Actuator -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Apache Velocity -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mysql Connector -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- tcctyn Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.tcctyn</groupId>
|
||||||
|
<artifactId>tcctyn-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- tcctyn Common Swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.tcctyn</groupId>
|
||||||
|
<artifactId>tcctyn-common-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.tcctyn</groupId>
|
||||||
|
<artifactId>tcctyn-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.tcctyn.iot;
|
||||||
|
|
||||||
|
import com.tcctyn.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.tcctyn.common.security.annotation.EnableRyFeignClients;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableRyFeignClients
|
||||||
|
@SpringBootApplication
|
||||||
|
public class TcctynIotApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
SpringApplication.run(TcctynIotApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 物联网模块启动成功 ლ(´ڡ`ლ)゙");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9004
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: ${artifactId}
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
username: @nacos.username@
|
||||||
|
password: @nacos.password@
|
||||||
|
# 服务发现配置
|
||||||
|
discovery:
|
||||||
|
server-addr: 47.109.202.121:8858
|
||||||
|
config:
|
||||||
|
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-@profiles.active@.${spring.cloud.nacos.config.file-extension}
|
||||||
|
config:
|
||||||
|
import:
|
||||||
|
# - optional:nacos:application-@profiles.active@.yml
|
||||||
|
- optional:nacos:${spring.application.name}-@profiles.active@.yml
|
|
@ -0,0 +1,11 @@
|
||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
||||||
|
|
||||||
|
_ _ _ _
|
||||||
|
| | | | (_) | |
|
||||||
|
| |_ ___ ___ | |_ _ _ _ __ _ ___ | |_
|
||||||
|
| __| / __| / __| | __| | | | | | '_ \ | | / _ \ | __|
|
||||||
|
| |_ | (__ | (__ | |_ | |_| | | | | | | | | (_) | | |_
|
||||||
|
\__| \___| \___| \__| \__, | |_| |_| |_| \___/ \__|
|
||||||
|
__/ |
|
||||||
|
|___/
|
Loading…
Reference in New Issue