Explorar o código

init: init project step4: biz code support

shc hai 1 ano
pai
achega
28b56d6fc1

+ 0 - 102
hnqz-visual/hnqz-daemon-elastic-job/pom.xml

@@ -1,102 +0,0 @@
-<?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.qunzhixinxi</groupId>
-		<artifactId>hnqz-visual</artifactId>
-		<version>3.9.0</version>
-	</parent>
-
-	<artifactId>hnqz-daemon-elastic-job</artifactId>
-	<packaging>jar</packaging>
-
-	<description>基于xxl-job后台跑批定时任务模块</description>
-
-	<dependencies>
-		<!--注册中心客户端-->
-		<dependency>
-			<groupId>com.alibaba.cloud</groupId>
-			<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
-		</dependency>
-		<!--配置中心客户端-->
-		<dependency>
-			<groupId>com.alibaba.cloud</groupId>
-			<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
-		</dependency>
-		<!--跑批任务-->
-		<dependency>
-			<groupId>com.qunzhixinxi</groupId>
-			<artifactId>hnqz-common-job</artifactId>
-		</dependency>
-		<!--数据库-->
-		<dependency>
-			<groupId>com.qunzhixinxi</groupId>
-			<artifactId>hnqz-common-data</artifactId>
-		</dependency>
-		<!--mybatis-->
-		<dependency>
-			<groupId>com.baomidou</groupId>
-			<artifactId>mybatis-plus-boot-starter</artifactId>
-		</dependency>
-		<!--mysql 驱动-->
-		<dependency>
-			<groupId>com.mysql</groupId>
-			<artifactId>mysql-connector-j</artifactId>
-		</dependency>
-		<!--DM8-->
-		<dependency>
-			<groupId>com.dameng</groupId>
-			<artifactId>DmJdbcDriver18</artifactId>
-		</dependency>
-		<!-- druid 连接池 -->
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>druid-spring-boot-starter</artifactId>
-		</dependency>
-		<!-- 安全模块-->
-		<dependency>
-			<groupId>com.qunzhixinxi</groupId>
-			<artifactId>hnqz-common-security</artifactId>
-		</dependency>
-		<!-- sentinel-->
-		<dependency>
-			<groupId>com.qunzhixinxi</groupId>
-			<artifactId>hnqz-common-sentinel</artifactId>
-		</dependency>
-		<!--灰度支持-->
-		<dependency>
-			<groupId>com.qunzhixinxi</groupId>
-			<artifactId>hnqz-common-gray</artifactId>
-		</dependency>
-		<!--web 模块-->
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-web</artifactId>
-		</dependency>
-		<!--undertow容器-->
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-undertow</artifactId>
-		</dependency>
-	</dependencies>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.springframework.boot</groupId>
-				<artifactId>spring-boot-maven-plugin</artifactId>
-			</plugin>
-			<plugin>
-				<groupId>io.fabric8</groupId>
-				<artifactId>docker-maven-plugin</artifactId>
-				<configuration>
-					<skip>false</skip>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>

+ 0 - 23
hnqz-visual/hnqz-daemon-elastic-job/src/main/java/com/qunzhixinxi/hnqz/daemon/elastic/HnqzDaemonElasticJobApplication.java

@@ -1,23 +0,0 @@
-package com.qunzhixinxi.hnqz.daemon.elastic;
-
-import com.qunzhixinxi.hnqz.common.feign.annotation.EnableHnqzFeignClients;
-import com.qunzhixinxi.hnqz.common.job.annotation.EnableHnqzXxlJob;
-import com.qunzhixinxi.hnqz.common.security.annotation.EnableHnqzResourceServer;
-import org.springframework.boot.SpringApplication;
-import org.springframework.cloud.client.SpringCloudApplication;
-
-/**
- * @author hnqz
- * @date 2018/7/24 分布式任务调度模块
- */
-@EnableHnqzXxlJob
-@EnableHnqzFeignClients
-@SpringCloudApplication
-@EnableHnqzResourceServer
-public class HnqzDaemonElasticJobApplication {
-
-	public static void main(String[] args) {
-		SpringApplication.run(HnqzDaemonElasticJobApplication.class, args);
-	}
-
-}

+ 0 - 27
hnqz-visual/hnqz-daemon-elastic-job/src/main/java/com/qunzhixinxi/hnqz/daemon/elastic/job/DemoJob.java

@@ -1,27 +0,0 @@
-package com.qunzhixinxi.hnqz.daemon.elastic.job;
-
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import com.xxl.job.core.util.ShardingUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-
-import static com.xxl.job.core.biz.model.ReturnT.SUCCESS;
-
-/**
- * @author hnqz
- * @date 2019-09-18
- */
-@Slf4j
-@Component
-public class DemoJob {
-
-	@XxlJob("demoJobHandler")
-	public ReturnT<String> demoJobHandler(String s) {
-		ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
-		XxlJobLogger.log("This is a demo job." + shardingVO);
-		return SUCCESS;
-	}
-
-}

+ 0 - 25
hnqz-visual/hnqz-daemon-elastic-job/src/main/resources/bootstrap.yml

@@ -1,25 +0,0 @@
-server:
-  port: @profiles.job.port@
-
-spring:
-  profiles:
-    active: @profiles.active@
-  application:
-    name: @artifactId@
-  cloud:
-    nacos:
-      username: @nacos.username@
-      password: @nacos.password@
-      discovery:
-        server-addr: @nacos.server-addr@
-        namespace: @profiles.namespace@
-        group: ${spring.profiles.active}
-      config:
-        server-addr: ${spring.cloud.nacos.discovery.server-addr}
-        namespace: @profiles.namespace@
-        group: ${spring.profiles.active}
-        file-extension: yml
-        shared-configs:
-          - data-id: application.yml
-            group: ${spring.profiles.active}
-            refresh: true

+ 0 - 62
hnqz-visual/hnqz-daemon-elastic-job/src/main/resources/logback-spring.xml

@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration debug="false" scan="false">
-    <property name="log.path" value="logs/${project.artifactId}"/>
-    <!-- 彩色日志格式 -->
-    <property name="CONSOLE_LOG_PATTERN"
-              value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
-    <!-- 彩色日志依赖的渲染类 -->
-    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
-    <conversionRule conversionWord="wex"
-                    converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
-    <conversionRule conversionWord="wEx"
-                    converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
-    <!-- Console log output -->
-    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
-        <encoder>
-            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- Log file debug output -->
-    <appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${log.path}/debug.log</file>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
-            <maxFileSize>50MB</maxFileSize>
-            <maxHistory>30</maxHistory>
-        </rollingPolicy>
-        <encoder>
-            <pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <!-- Log file error output -->
-    <appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${log.path}/error.log</file>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
-            <maxFileSize>50MB</maxFileSize>
-            <maxHistory>30</maxHistory>
-        </rollingPolicy>
-        <encoder>
-            <pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
-        </encoder>
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>ERROR</level>
-        </filter>
-    </appender>
-
-    <logger name="org.activiti.engine.impl.db" level="DEBUG">
-        <appender-ref ref="debug"/>
-    </logger>
-
-    <!--nacos 心跳 INFO 屏蔽-->
-    <logger name="com.alibaba.nacos" level="OFF">
-        <appender-ref ref="error"/>
-    </logger>
-    <!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
-    <root level="INFO">
-        <appender-ref ref="console"/>
-        <appender-ref ref="debug"/>
-    </root>
-</configuration>

+ 0 - 5
pom.xml

@@ -250,7 +250,6 @@
 				<profiles.upms.biz.port>4000</profiles.upms.biz.port>
 				<profiles.quartz.port>5007</profiles.quartz.port>
 				<profiles.report.port>3001</profiles.report.port>
-				<profiles.job.port>5002</profiles.job.port>
 			</properties>
 			<activation>
 				<!-- 默认环境 -->
@@ -270,7 +269,6 @@
 				<profiles.upms.biz.port>24000</profiles.upms.biz.port>
 				<profiles.quartz.port>25007</profiles.quartz.port>
 				<profiles.report.port>23001</profiles.report.port>
-				<profiles.job.port>25002</profiles.job.port>
 			</properties>
 		</profile>
 		<profile>
@@ -286,7 +284,6 @@
 				<profiles.upms.biz.port>14000</profiles.upms.biz.port>
 				<profiles.quartz.port>15007</profiles.quartz.port>
 				<profiles.report.port>13001</profiles.report.port>
-				<profiles.job.port>15002</profiles.job.port>
 			</properties>
 		</profile>
 		<profile>
@@ -302,7 +299,6 @@
 				<profiles.upms.biz.port>4000</profiles.upms.biz.port>
 				<profiles.quartz.port>5007</profiles.quartz.port>
 				<profiles.report.port>3001</profiles.report.port>
-				<profiles.job.port>5002</profiles.job.port>
 			</properties>
 		</profile>
 		<profile>
@@ -318,7 +314,6 @@
 				<profiles.upms.biz.port>4000</profiles.upms.biz.port>
 				<profiles.quartz.port>5007</profiles.quartz.port>
 				<profiles.report.port>3001</profiles.report.port>
-				<profiles.job.port>5002</profiles.job.port>
 			</properties>
 		</profile>
 	</profiles>