Browse Source

# 添加middle子模块

zhongwei
haungxing 2 years ago
parent
commit
b1f0ee4503
  1. 38
      hzims-service/middle/.gitignore
  2. 69
      hzims-service/middle/pom.xml
  3. 21
      hzims-service/middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java
  4. 36
      hzims-service/middle/src/main/resources/application.yml
  5. 13
      hzims-service/middle/src/test/java/com/hnac/hzims/middle/MiddleApplicationTests.java

38
hzims-service/middle/.gitignore vendored

@ -0,0 +1,38 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
*.md
target/**
**/test/
.gitignore

69
hzims-service/middle/pom.xml

@ -0,0 +1,69 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>hzims-service</artifactId>
<groupId>com.hnac.hzims</groupId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-middle</artifactId>
<version>4.0.0-SNAPSHOT</version>
<name>middle</name>
<description>middle</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.6.13</spring-boot.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-common</artifactId>
<version>${bladex.projet.common.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-auto</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.name}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

21
hzims-service/middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java

@ -0,0 +1,21 @@
package com.hnac.hzims.middle;
import org.mybatis.spring.annotation.MapperScan;
import org.springblade.core.cloud.feign.EnableBladeFeign;
import org.springblade.core.launch.BladeApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.ComponentScan;
@EnableBladeFeign
@SpringCloudApplication
@MapperScan("com.hnac.hzims.*.**.mapper.**")
@ComponentScan(basePackages = {"com.hnac.*"})
public class MiddleApplication {
public static void main(String[] args) {
BladeApplication.run("hzims-middle", MiddleApplication.class, args);
}
}

36
hzims-service/middle/src/main/resources/application.yml

@ -0,0 +1,36 @@
#服务器端口
server:
port: 8400
#数据源配置
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
url: jdbc:mysql://192.168.1.20:3576/dev_hzims_assets?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: 123
#mybatis-plus配置
mybatis-plus:
mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.hnac.hzims.**.entity
#swagger扫描路径配置
swagger:
base-packages:
- org.springbalde
- com.hnac
blade:
data-scope:
enabled: false
lock:
enabled: true
address: redis://192.168.1.20:3577
password: 1qaz2WSX@redis
database: 0
ssl: false

13
hzims-service/middle/src/test/java/com/hnac/hzims/middle/MiddleApplicationTests.java

@ -0,0 +1,13 @@
package com.hnac.hzims.middle;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MiddleApplicationTests {
@Test
void contextLoads() {
}
}
Loading…
Cancel
Save