diff --git a/docker/script/mysql-server-replica-1/2_Dump20210919.sql b/docker/script/mysql-server-replica-1/2_Dump20210926.sql similarity index 99% rename from docker/script/mysql-server-replica-1/2_Dump20210919.sql rename to docker/script/mysql-server-replica-1/2_Dump20210926.sql index edd47f80..f217b9eb 100644 --- a/docker/script/mysql-server-replica-1/2_Dump20210919.sql +++ b/docker/script/mysql-server-replica-1/2_Dump20210926.sql @@ -1,4 +1,4 @@ --- MySQL dump 10.13 Distrib 8.0.25, for macos11 (x86_64) +-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: muscle_and_fitness -- ------------------------------------------------------ @@ -31,7 +31,7 @@ CREATE TABLE `body_part` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `body_part_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Human Body Part.'; @@ -61,7 +61,7 @@ CREATE TABLE `equipment` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `equipment_name_uindex` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise Equipment.'; @@ -93,7 +93,7 @@ CREATE TABLE `exercise` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `exercise_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=1692 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise.\n\nhttps://exrx.net/Lists/Directory'; @@ -124,7 +124,7 @@ CREATE TABLE `exercise_classification` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `exercise_classification_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise Classification.\n\nhttps://exrx.net/WeightTraining/Glossary'; @@ -155,7 +155,7 @@ CREATE TABLE `exercise_comment` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `exercise_comment_exercise_id_uindex` (`exercise_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1347 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise Comment.\n\nRelationship:\nOne exercise to one comment.\n\nIf the exercise doen''t have comment,\nthen this table will still store the comment record for it,\nlike { id: 1, exercise_id: 1, comment: ''NONE'' }.'; @@ -239,7 +239,7 @@ CREATE TABLE `kinesiology_glossary` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `kinesiology_glossary_name_uindex` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Kinesiology Glossary.\n\nhttps://exrx.net/Kinesiology/Glossary'; @@ -271,7 +271,7 @@ CREATE TABLE `muscle` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `muscle_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Muscle.\n\nhttps://exrx.net/Lists/Muscle'; @@ -303,7 +303,7 @@ CREATE TABLE `muscle_image` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `muscle_image_image_path_uindex` (`image_path`) ) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Muscle Image.\n\nThe relationship:\nOne muscle to one or more muscle image.'; @@ -339,7 +339,7 @@ CREATE TABLE `permission` ( `created_time` datetime NOT NULL COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted flag', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `permission_expression_UNIQUE` (`permission_expression`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Permission.'; @@ -354,6 +354,43 @@ LOCK TABLES `permission` WRITE; /*!40000 ALTER TABLE `permission` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `quartz_job_configuration` +-- + +DROP TABLE IF EXISTS `quartz_job_configuration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `quartz_job_configuration` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'The primary key ID', + `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Name of job', + `group` varchar(200) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Group of job', + `service_name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Service name, equal to artifact-id', + `invoke_target` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Invoke target', + `cron_expression` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Cron Expressions', + `misfire_policy` tinyint NOT NULL COMMENT 'Trigger''s misfire policy', + `concurrent` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Concurrent. true(1): is concurrent, false(0): not concurrent', + `description` varchar(1000) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Description', + `status` tinyint NOT NULL COMMENT 'Status', + `created_by` bigint unsigned NOT NULL COMMENT 'Created by', + `created_time` datetime NOT NULL COMMENT 'Craeted time', + `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', + `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Quartz Job Configuration'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `quartz_job_configuration` +-- + +LOCK TABLES `quartz_job_configuration` WRITE; +/*!40000 ALTER TABLE `quartz_job_configuration` DISABLE KEYS */; +INSERT INTO `quartz_job_configuration` VALUES (1,'greeting-schedule-job','auth-center-default-group','auth-center','greetingBean.hello()','0 0/1 * 1/1 * ? *',0,0,'Greeting task. It\'s a demo Quartz schedule job.',0,1,'2021-09-26 00:20:37',NULL,NULL,0),(2,'greeting-schedule-job','maf-mis-default-group','maf-mis','greetingBean.hello()','0 0/1 * 1/1 * ? *',0,0,'Greeting task. It\'s a demo Quartz schedule job.',0,1,'2021-09-26 00:20:37',NULL,NULL,0); +/*!40000 ALTER TABLE `quartz_job_configuration` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `related_muscle` -- @@ -394,7 +431,7 @@ CREATE TABLE `role` ( `created_time` datetime NOT NULL COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted flag.', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Role.'; @@ -455,7 +492,7 @@ CREATE TABLE `user` ( `created_time` datetime NOT NULL COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Delete flag.', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `email_UNIQUE` (`email`), UNIQUE KEY `username_UNIQUE` (`username`), @@ -509,4 +546,4 @@ SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-09-19 15:30:35 +-- Dump completed on 2021-09-26 10:48:15 diff --git a/docker/script/mysql-server-source/2_Dump20210919.sql b/docker/script/mysql-server-source/2_Dump20210926.sql similarity index 99% rename from docker/script/mysql-server-source/2_Dump20210919.sql rename to docker/script/mysql-server-source/2_Dump20210926.sql index edd47f80..f217b9eb 100644 --- a/docker/script/mysql-server-source/2_Dump20210919.sql +++ b/docker/script/mysql-server-source/2_Dump20210926.sql @@ -1,4 +1,4 @@ --- MySQL dump 10.13 Distrib 8.0.25, for macos11 (x86_64) +-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: muscle_and_fitness -- ------------------------------------------------------ @@ -31,7 +31,7 @@ CREATE TABLE `body_part` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `body_part_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Human Body Part.'; @@ -61,7 +61,7 @@ CREATE TABLE `equipment` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `equipment_name_uindex` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise Equipment.'; @@ -93,7 +93,7 @@ CREATE TABLE `exercise` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `exercise_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=1692 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise.\n\nhttps://exrx.net/Lists/Directory'; @@ -124,7 +124,7 @@ CREATE TABLE `exercise_classification` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `exercise_classification_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise Classification.\n\nhttps://exrx.net/WeightTraining/Glossary'; @@ -155,7 +155,7 @@ CREATE TABLE `exercise_comment` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `exercise_comment_exercise_id_uindex` (`exercise_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1347 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exercise Comment.\n\nRelationship:\nOne exercise to one comment.\n\nIf the exercise doen''t have comment,\nthen this table will still store the comment record for it,\nlike { id: 1, exercise_id: 1, comment: ''NONE'' }.'; @@ -239,7 +239,7 @@ CREATE TABLE `kinesiology_glossary` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `kinesiology_glossary_name_uindex` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Kinesiology Glossary.\n\nhttps://exrx.net/Kinesiology/Glossary'; @@ -271,7 +271,7 @@ CREATE TABLE `muscle` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `muscle_name_uindex` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Muscle.\n\nhttps://exrx.net/Lists/Muscle'; @@ -303,7 +303,7 @@ CREATE TABLE `muscle_image` ( `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `muscle_image_image_path_uindex` (`image_path`) ) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Muscle Image.\n\nThe relationship:\nOne muscle to one or more muscle image.'; @@ -339,7 +339,7 @@ CREATE TABLE `permission` ( `created_time` datetime NOT NULL COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted flag', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `permission_expression_UNIQUE` (`permission_expression`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Permission.'; @@ -354,6 +354,43 @@ LOCK TABLES `permission` WRITE; /*!40000 ALTER TABLE `permission` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `quartz_job_configuration` +-- + +DROP TABLE IF EXISTS `quartz_job_configuration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `quartz_job_configuration` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'The primary key ID', + `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Name of job', + `group` varchar(200) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Group of job', + `service_name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Service name, equal to artifact-id', + `invoke_target` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Invoke target', + `cron_expression` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Cron Expressions', + `misfire_policy` tinyint NOT NULL COMMENT 'Trigger''s misfire policy', + `concurrent` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Concurrent. true(1): is concurrent, false(0): not concurrent', + `description` varchar(1000) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Description', + `status` tinyint NOT NULL COMMENT 'Status', + `created_by` bigint unsigned NOT NULL COMMENT 'Created by', + `created_time` datetime NOT NULL COMMENT 'Craeted time', + `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', + `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Quartz Job Configuration'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `quartz_job_configuration` +-- + +LOCK TABLES `quartz_job_configuration` WRITE; +/*!40000 ALTER TABLE `quartz_job_configuration` DISABLE KEYS */; +INSERT INTO `quartz_job_configuration` VALUES (1,'greeting-schedule-job','auth-center-default-group','auth-center','greetingBean.hello()','0 0/1 * 1/1 * ? *',0,0,'Greeting task. It\'s a demo Quartz schedule job.',0,1,'2021-09-26 00:20:37',NULL,NULL,0),(2,'greeting-schedule-job','maf-mis-default-group','maf-mis','greetingBean.hello()','0 0/1 * 1/1 * ? *',0,0,'Greeting task. It\'s a demo Quartz schedule job.',0,1,'2021-09-26 00:20:37',NULL,NULL,0); +/*!40000 ALTER TABLE `quartz_job_configuration` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `related_muscle` -- @@ -394,7 +431,7 @@ CREATE TABLE `role` ( `created_time` datetime NOT NULL COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Deleted flag.', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Role.'; @@ -455,7 +492,7 @@ CREATE TABLE `user` ( `created_time` datetime NOT NULL COMMENT 'Created time', `modified_by` bigint unsigned DEFAULT NULL COMMENT 'Modified by', `modified_time` datetime DEFAULT NULL COMMENT 'Modified time', - `deleted` tinyint NOT NULL DEFAULT '0' COMMENT 'Delete flag.', + `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT 'Deleted', PRIMARY KEY (`id`), UNIQUE KEY `email_UNIQUE` (`email`), UNIQUE KEY `username_UNIQUE` (`username`), @@ -509,4 +546,4 @@ SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-09-19 15:30:35 +-- Dump completed on 2021-09-26 10:48:15 diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/GreetingQuartzJobBean.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/GreetingBean.java similarity index 66% rename from spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/GreetingQuartzJobBean.java rename to spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/GreetingBean.java index 3c7416c6..74201041 100644 --- a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/GreetingQuartzJobBean.java +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/GreetingBean.java @@ -1,29 +1,29 @@ package com.jmsoftware.maf.springcloudstarter.quartz; import com.jmsoftware.maf.springcloudstarter.configuration.MafProjectProperty; +import com.jmsoftware.maf.springcloudstarter.quartz.annotation.QuartzSchedulable; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.quartz.JobExecutionContext; -import org.springframework.lang.NonNull; -import org.springframework.scheduling.quartz.QuartzJobBean; +import org.springframework.stereotype.Component; /** - * Description: GreetingQuartzJobBean, change description here. + * Description: GreetingBean, change description here. * * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 7/13/2021 10:16 PM * @see * Quartz Scheduler **/ @Slf4j +@Component("greetingBean") @RequiredArgsConstructor -public class GreetingQuartzJobBean extends QuartzJobBean { +public class GreetingBean { /** * Injected field, spring bean. */ private final MafProjectProperty mafProjectProperty; - @Override - protected void executeInternal(@NonNull JobExecutionContext jobExecutionContext) { + @QuartzSchedulable + public void hello() { log.info("Greeting from Quartz job, current service is: {}", this.mafProjectProperty.getProjectArtifactId()); } } diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzConfiguration.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzConfiguration.java index d27a0d7b..623defc3 100644 --- a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzConfiguration.java +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzConfiguration.java @@ -1,23 +1,23 @@ package com.jmsoftware.maf.springcloudstarter.quartz; import com.jmsoftware.maf.springcloudstarter.configuration.MafProjectProperty; +import com.jmsoftware.maf.springcloudstarter.quartz.service.QuartzJobConfigurationService; +import com.jmsoftware.maf.springcloudstarter.quartz.service.impl.QuartzJobConfigurationServiceImpl; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.quartz.Scheduler; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.quartz.QuartzProperties; import org.springframework.boot.autoconfigure.quartz.SchedulerFactoryBeanCustomizer; import org.springframework.context.annotation.Bean; -import org.springframework.scheduling.quartz.CronTriggerFactoryBean; -import org.springframework.scheduling.quartz.JobDetailFactoryBean; import org.springframework.scheduling.quartz.SchedulerFactoryBean; import org.springframework.transaction.PlatformTransactionManager; import java.util.Map; -import java.util.Optional; import java.util.Properties; +import static org.springframework.scheduling.quartz.SchedulerFactoryBean.PROP_THREAD_COUNT; + /** * Description: QuartzConfiguration, change description here. * @@ -26,14 +26,12 @@ @Slf4j @ConditionalOnClass({Scheduler.class, SchedulerFactoryBean.class, PlatformTransactionManager.class}) public class QuartzConfiguration { - private static final String THREAD_COUNT = "org.quartz.threadPool.threadCount"; - @Bean public SchedulerFactoryBeanCustomizer threadPoolCustomizer(QuartzProperties quartzProperties) { return schedulerFactoryBean -> { val cpuCoreCount = Runtime.getRuntime().availableProcessors(); val threadCount = String.valueOf(cpuCoreCount * 2); - quartzProperties.getProperties().put(THREAD_COUNT, threadCount); + quartzProperties.getProperties().put(PROP_THREAD_COUNT, threadCount); log.warn("Quartz thread pool enhanced by current cpuCoreCount: {}, threadCount: {}", cpuCoreCount, threadCount); schedulerFactoryBean.setQuartzProperties(this.asProperties(quartzProperties.getProperties())); @@ -47,39 +45,15 @@ private Properties asProperties(Map source) { } @Bean - public GreetingQuartzJobBean greetingQuartzJobBean(MafProjectProperty mafProjectProperty) { - log.warn("Initial bean: '{}'", GreetingQuartzJobBean.class.getSimpleName()); - return new GreetingQuartzJobBean(mafProjectProperty); - } - - @Bean("greetingQuartzJobDetailFactoryBean") - public JobDetailFactoryBean greetingQuartzJobDetailFactoryBean(GreetingQuartzJobBean greetingQuartzJobBean) { - val jobDetailFactoryBean = new JobDetailFactoryBean(); - jobDetailFactoryBean.setName("greeting-job-detail"); - jobDetailFactoryBean.setGroup("default"); - jobDetailFactoryBean.setJobClass(greetingQuartzJobBean.getClass()); - jobDetailFactoryBean.setDescription("Greeting job detail created by JobDetailFactoryBean"); - jobDetailFactoryBean.setDurability(true); - log.warn("Initial bean: '{}'", JobDetailFactoryBean.class.getSimpleName()); - return jobDetailFactoryBean; - } - - @Bean("greetingQuartzJobCronTriggerFactoryBean") - public CronTriggerFactoryBean greetingQuartzJobCronTriggerFactoryBean( - @Qualifier("greetingQuartzJobDetailFactoryBean") JobDetailFactoryBean jobDetailFactoryBean) { - val cronTriggerFactoryBean = new CronTriggerFactoryBean(); - cronTriggerFactoryBean.setName("greeting-cron-trigger"); - cronTriggerFactoryBean.setGroup("default"); - cronTriggerFactoryBean.setCronExpression("0 0/1 * 1/1 * ? *"); - val optionalJobDetail = Optional.ofNullable(jobDetailFactoryBean.getObject()); - optionalJobDetail.ifPresent(cronTriggerFactoryBean::setJobDetail); - log.warn("Initial bean: '{}'", CronTriggerFactoryBean.class.getSimpleName()); - return cronTriggerFactoryBean; + public GreetingBean greetingBean(MafProjectProperty mafProjectProperty) { + log.warn("Initial bean: '{}'", GreetingBean.class.getSimpleName()); + return new GreetingBean(mafProjectProperty); } @Bean - public QuartzJobService quartzJobService(SchedulerFactoryBean schedulerFactoryBean) { - log.warn("Initial bean: '{}'", QuartzJobServiceImpl.class.getSimpleName()); - return new QuartzJobServiceImpl(schedulerFactoryBean); + public QuartzJobConfigurationService quartzJobConfigurationService(SchedulerFactoryBean schedulerFactoryBean, + MafProjectProperty mafProjectProperty) { + log.warn("Initial bean: '{}'", QuartzJobConfigurationServiceImpl.class.getSimpleName()); + return new QuartzJobConfigurationServiceImpl(schedulerFactoryBean, mafProjectProperty); } } diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/annotation/QuartzSchedulable.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/annotation/QuartzSchedulable.java new file mode 100644 index 00000000..98f1ba86 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/annotation/QuartzSchedulable.java @@ -0,0 +1,14 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.annotation; + +import java.lang.annotation.*; + +/** + * Description: QuartzSchedulable, change description here. + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/23/2021 1:48 PM + **/ +@Documented +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface QuartzSchedulable { +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/Concurrent.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/Concurrent.java new file mode 100644 index 00000000..c7e66557 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/Concurrent.java @@ -0,0 +1,27 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.constant; + +import com.jmsoftware.maf.common.bean.EnumerationBase; +import lombok.Getter; + +/** + * Description: Concurrent, change description here. + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/23/2021 2:04 PM + **/ +@Getter +public enum Concurrent implements EnumerationBase { + /** + * Disallow Concurrent + */ + DISALLOW_CONCURRENT((byte) 0), + /** + * concurrent + */ + CONCURRENT((byte) 1), + ; + private final Byte value; + + Concurrent(Byte value) { + this.value = value; + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/MisfirePolicy.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/MisfirePolicy.java new file mode 100644 index 00000000..5408458e --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/MisfirePolicy.java @@ -0,0 +1,85 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.constant; + +import com.jmsoftware.maf.common.bean.EnumerationBase; +import lombok.Getter; +import lombok.ToString; +import lombok.val; +import org.quartz.CronTrigger; +import org.quartz.Scheduler; +import org.quartz.Trigger; + +import java.util.Calendar; + +/** + * Description: MisfirePolicy, change description here. + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/24/2021 8:20 AM + * @see Trigger + * @see CronTrigger + **/ +@Getter +@ToString +public enum MisfirePolicy implements EnumerationBase { + /** + * Instructs the {@link Scheduler} that the + * Trigger will never be evaluated for a misfire situation, + * and that the scheduler will simply try to fire it as soon as it can, + * and then update the Trigger as if it had fired at the proper time. + * + *

NOTE: if a trigger uses this instruction, and it has missed + * several of its scheduled firings, then several rapid firings may occur + * as the trigger attempt to catch back up to where it would have been. + * For example, a SimpleTrigger that fires every 15 seconds which has + * misfired for 5 minutes will fire 20 times once it gets the chance to + * fire.

+ */ + MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY((byte) -1), + /** + * Instructs the {@link Scheduler} that upon a mis-fire + * situation, the updateAfterMisfire() method will be called + * on the Trigger to determine the mis-fire instruction, + * which logic will be trigger-implementation-dependent. + * + *

+ * In order to see if this instruction fits your needs, you should look at + * the documentation for the updateAfterMisfire() method + * on the particular Trigger implementation you are using. + *

+ */ + MISFIRE_INSTRUCTION_SMART_POLICY((byte) 0), + /** + *

+ * Instructs the {@link Scheduler} that upon a mis-fire + * situation, the {@link CronTrigger} wants to be fired now + * by Scheduler. + *

+ */ + MISFIRE_INSTRUCTION_FIRE_ONCE_NOW((byte) 1), + /** + *

+ * Instructs the {@link Scheduler} that upon a mis-fire + * situation, the {@link CronTrigger} wants to have it's + * next-fire-time updated to the next time in the schedule after the + * current time (taking into account any associated {@link Calendar}, + * but it does not want to be fired now. + *

+ */ + MISFIRE_INSTRUCTION_DO_NOTHING((byte) 2), + ; + + private final Byte value; + + MisfirePolicy(Byte value) { + this.value = value; + } + + public static MisfirePolicy getByValue(Byte value) { + val values = MisfirePolicy.values(); + for (val enumeration : values) { + if(enumeration.getValue().equals(value)) { + return enumeration; + } + } + return null; + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/QuartzJobStatus.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/QuartzJobStatus.java new file mode 100644 index 00000000..8c404fec --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/QuartzJobStatus.java @@ -0,0 +1,30 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.constant; + +import com.jmsoftware.maf.common.bean.EnumerationBase; +import lombok.Getter; +import lombok.ToString; + +/** + * Description: QuartzJobStatus, change description here. + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/24/2021 10:11 AM + **/ +@Getter +@ToString +public enum QuartzJobStatus implements EnumerationBase { + /** + * Normal + */ + NORMAL((byte) 0), + /** + * Paused + */ + PAUSE((byte) 1), + ; + + private final Byte value; + + QuartzJobStatus(Byte value) { + this.value = value; + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/ScheduleConstant.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/ScheduleConstant.java new file mode 100644 index 00000000..a8050eee --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/constant/ScheduleConstant.java @@ -0,0 +1,13 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.constant; + +/** + * ScheduleConstant + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/24/2021 8:16 AM + */ +public class ScheduleConstant { + public static final String QUARTZ_JOB_CONFIGURATION = "QUARTZ_JOB_CONFIGURATION"; + + private ScheduleConstant() { + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/entity/package-info.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/entity/package-info.java new file mode 100644 index 00000000..fc765029 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/entity/package-info.java @@ -0,0 +1 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.entity; diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/entity/persistence/QuartzJobConfiguration.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/entity/persistence/QuartzJobConfiguration.java new file mode 100644 index 00000000..a507eaca --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/entity/persistence/QuartzJobConfiguration.java @@ -0,0 +1,115 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import static com.baomidou.mybatisplus.annotation.FieldFill.INSERT; +import static com.baomidou.mybatisplus.annotation.FieldFill.UPDATE; + +/** + * Quartz Job Configuration + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/23/2021 8:23 AM + */ +@Data +@TableName(value = QuartzJobConfiguration.TABLE_NAME) +public class QuartzJobConfiguration implements Serializable { + public static final String TABLE_NAME = "quartz_job_configuration"; + public static final String COL_ID = "id"; + public static final String COL_NAME = "name"; + public static final String COL_GROUP = "`group`"; + public static final String COL_SERVICE_NAME = "service_name"; + public static final String COL_INVOKE_TARGET = "invoke_target"; + public static final String COL_CRON_EXPRESSION = "cron_expression"; + public static final String COL_MISFIRE_POLICY = "misfire_policy"; + public static final String COL_CONCURRENT = "concurrent"; + public static final String COL_DESCRIPTION = "description"; + public static final String COL_STATUS = "status"; + public static final String COL_CREATED_BY = "created_by"; + public static final String COL_CREATED_TIME = "created_time"; + public static final String COL_MODIFIED_BY = "modified_by"; + public static final String COL_MODIFIED_TIME = "modified_time"; + public static final String COL_DELETED = "deleted"; + private static final long serialVersionUID = -4561633114475541640L; + /** + * The primary key ID + */ + @TableId(value = COL_ID, type = IdType.AUTO) + private Long id; + /** + * Name of job + */ + @TableField(value = COL_NAME) + private String name; + /** + * Group of job + */ + @TableField(value = COL_GROUP) + private String group; + /** + * Service name, equal to artifact-id + */ + @TableField(value = COL_SERVICE_NAME) + private String serviceName; + /** + * Invoke target + */ + @TableField(value = COL_INVOKE_TARGET) + private String invokeTarget; + /** + * Cron Expressions + */ + @TableField(value = COL_CRON_EXPRESSION) + private String cronExpression; + /** + * Trigger's misfire policy + */ + @TableField(value = COL_MISFIRE_POLICY) + private Byte misfirePolicy; + /** + * Concurrent. true(1): is concurrent, false(0): not concurrent + */ + @TableField(value = COL_CONCURRENT) + private Byte concurrent; + /** + * Description + */ + @TableField(value = COL_DESCRIPTION) + private String description; + /** + * Status + */ + @TableField(value = COL_STATUS) + private Byte status; + /** + * Created by + */ + @TableField(value = COL_CREATED_BY, fill = INSERT) + private Long createdBy; + /** + * Craeted time + */ + @TableField(value = COL_CREATED_TIME, fill = INSERT) + private LocalDateTime createdTime; + /** + * Modified by + */ + @TableField(value = COL_MODIFIED_BY, fill = UPDATE) + private Long modifiedBy; + /** + * Modified time + */ + @TableField(value = COL_MODIFIED_TIME, fill = UPDATE) + private LocalDateTime modifiedTime; + /** + * Deleted + */ + @TableField(value = COL_DELETED, fill = INSERT) + private Byte deleted; +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/AbstractQuartzJob.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/AbstractQuartzJob.java new file mode 100644 index 00000000..688f4b3a --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/AbstractQuartzJob.java @@ -0,0 +1,49 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.job; + +import cn.hutool.core.bean.BeanUtil; +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import lombok.extern.slf4j.Slf4j; +import lombok.val; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.scheduling.quartz.QuartzJobBean; + +import static com.jmsoftware.maf.springcloudstarter.quartz.constant.ScheduleConstant.QUARTZ_JOB_CONFIGURATION; + +/** + * AbstractQuartzJob + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/24/2021 3:51 PM + */ +@Slf4j +public abstract class AbstractQuartzJob extends QuartzJobBean { + private static final String QUARTZ_JOB_CONFIGURATION_CLASS = QuartzJobConfiguration.class.getSimpleName(); + + @Override + protected final void executeInternal(JobExecutionContext context) throws JobExecutionException { + val sourceQuartzJobConfiguration = context.getMergedJobDataMap().get(QUARTZ_JOB_CONFIGURATION); + if (!(QUARTZ_JOB_CONFIGURATION_CLASS.equals(sourceQuartzJobConfiguration.getClass().getSimpleName()))) { + throw new IllegalArgumentException( + "Invalid job data! Not the instance of QuartzJobConfiguration. Runtime actual class: " + + sourceQuartzJobConfiguration.getClass()); + } + val quartzJobConfiguration = new QuartzJobConfiguration(); + BeanUtil.copyProperties(sourceQuartzJobConfiguration, quartzJobConfiguration); + if (log.isDebugEnabled()) { + log.debug("Found and QuartzJobConfiguration from job data map: {}", sourceQuartzJobConfiguration); + } + try { + this.invoke(context, quartzJobConfiguration); + } catch (Exception e) { + log.error("Exception occurred when invoking method", e); + } + } + + /** + * Invoke. + * + * @param context the context + * @param quartzJobConfiguration the quartz job configuration + */ + protected abstract void invoke(JobExecutionContext context, QuartzJobConfiguration quartzJobConfiguration); +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/QuartzDisallowConcurrentExecution.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/QuartzDisallowConcurrentExecution.java new file mode 100644 index 00000000..d792dd69 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/QuartzDisallowConcurrentExecution.java @@ -0,0 +1,19 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.job; + +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import com.jmsoftware.maf.springcloudstarter.quartz.util.QuartzJobInvocationUtil; +import org.quartz.DisallowConcurrentExecution; +import org.quartz.JobExecutionContext; + +/** + * QuartzDisallowConcurrentExecution + * + * @author 钟俊 (zhongjun), email: zhongjun@toguide.cn, date: 5/12/2021 2:11 PM + */ +@DisallowConcurrentExecution +public final class QuartzDisallowConcurrentExecution extends AbstractQuartzJob { + @Override + protected void invoke(JobExecutionContext context, QuartzJobConfiguration quartzJobConfiguration) { + QuartzJobInvocationUtil.invokeMethod(quartzJobConfiguration); + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/QuartzJobExecution.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/QuartzJobExecution.java new file mode 100644 index 00000000..d4bb1d1a --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/job/QuartzJobExecution.java @@ -0,0 +1,17 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.job; + +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import com.jmsoftware.maf.springcloudstarter.quartz.util.QuartzJobInvocationUtil; +import org.quartz.JobExecutionContext; + +/** + * QuartzJobExecution. Concurrent execution + * + * @author 钟俊 (zhongjun), email: zhongjun@toguide.cn, date: 5/12/2021 2:11 PM + */ +public final class QuartzJobExecution extends AbstractQuartzJob { + @Override + protected void invoke(JobExecutionContext context, QuartzJobConfiguration quartzJobConfiguration) { + QuartzJobInvocationUtil.invokeMethod(quartzJobConfiguration); + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/mapper/QuartzJobConfigurationMapper.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/mapper/QuartzJobConfigurationMapper.java new file mode 100644 index 00000000..b03376f7 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/mapper/QuartzJobConfigurationMapper.java @@ -0,0 +1,14 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import org.apache.ibatis.annotations.Mapper; + +/** + * Description: QuartzJobConfigurationMapper + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/23/2021 8:23 AM + */ +@Mapper +public interface QuartzJobConfigurationMapper extends BaseMapper { +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/QuartzJobConfigurationService.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/QuartzJobConfigurationService.java new file mode 100644 index 00000000..ed7765f1 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/QuartzJobConfigurationService.java @@ -0,0 +1,14 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import org.springframework.validation.annotation.Validated; + +/** + * Description: QuartzJobConfigurationService + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/23/2021 8:23 AM + */ +@Validated +public interface QuartzJobConfigurationService extends IService { +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzJobService.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/QuartzJobService.java similarity index 97% rename from spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzJobService.java rename to spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/QuartzJobService.java index 9e341ad0..a116a8ee 100644 --- a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzJobService.java +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/QuartzJobService.java @@ -1,4 +1,4 @@ -package com.jmsoftware.maf.springcloudstarter.quartz; +package com.jmsoftware.maf.springcloudstarter.quartz.service; import org.springframework.lang.Nullable; import org.springframework.validation.annotation.Validated; diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/impl/QuartzJobConfigurationServiceImpl.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/impl/QuartzJobConfigurationServiceImpl.java new file mode 100644 index 00000000..75e0abe4 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/impl/QuartzJobConfigurationServiceImpl.java @@ -0,0 +1,57 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jmsoftware.maf.springcloudstarter.configuration.MafProjectProperty; +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import com.jmsoftware.maf.springcloudstarter.quartz.mapper.QuartzJobConfigurationMapper; +import com.jmsoftware.maf.springcloudstarter.quartz.service.QuartzJobConfigurationService; +import com.jmsoftware.maf.springcloudstarter.quartz.util.ScheduleUtil; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import lombok.val; +import org.quartz.SchedulerException; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.stereotype.Service; + +import javax.annotation.PostConstruct; +import java.util.List; + +/** + * Description: QuartzJobConfigurationServiceImpl + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/23/2021 8:23 AM + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class QuartzJobConfigurationServiceImpl + extends ServiceImpl + implements QuartzJobConfigurationService { + private final SchedulerFactoryBean schedulerFactoryBean; + private final MafProjectProperty mafProjectProperty; + + @PostConstruct + public void initQuartzJob() throws SchedulerException { + val scheduler = this.schedulerFactoryBean.getScheduler(); + scheduler.clear(); + val jobList = this.getQuartzJobConfigurationForService(); + for (val quartzJobConfiguration : jobList) { + val jobDetail = ScheduleUtil.createScheduleJob( + scheduler, + quartzJobConfiguration, + this.mafProjectProperty.getProjectArtifactId() + ); + if (jobDetail != null) { + log.info("Created schedule job. JobKey: {}", jobDetail.getKey()); + } + } + } + + private List getQuartzJobConfigurationForService() { + val queryWrapper = Wrappers.lambdaQuery(QuartzJobConfiguration.class); + queryWrapper.eq(QuartzJobConfiguration::getServiceName, this.mafProjectProperty.getProjectArtifactId()) + .orderByAsc(QuartzJobConfiguration::getId); + return this.list(queryWrapper); + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzJobServiceImpl.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/impl/QuartzJobServiceImpl.java similarity index 97% rename from spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzJobServiceImpl.java rename to spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/impl/QuartzJobServiceImpl.java index 5c0ce1ee..9222623b 100644 --- a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/QuartzJobServiceImpl.java +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/service/impl/QuartzJobServiceImpl.java @@ -1,7 +1,8 @@ -package com.jmsoftware.maf.springcloudstarter.quartz; +package com.jmsoftware.maf.springcloudstarter.quartz.service.impl; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.jmsoftware.maf.springcloudstarter.quartz.service.QuartzJobService; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/CronUtil.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/CronUtil.java new file mode 100644 index 00000000..ef79ea61 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/CronUtil.java @@ -0,0 +1,56 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.util; + +import org.quartz.CronExpression; + +import java.text.ParseException; +import java.util.Date; + +/** + * CronUtil + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/24/2021 3:52 PM + */ +public class CronUtil { + private CronUtil() { + } + + /** + * Is valid boolean. + * + * @param cronExpression the cron expression + * @return the boolean + */ + public static boolean isValid(String cronExpression) { + return CronExpression.isValidExpression(cronExpression); + } + + /** + * Gets invalid message. + * + * @param cronExpression the cron expression + * @return the invalid message + */ + public static String getInvalidMessage(String cronExpression) { + try { + new CronExpression(cronExpression); + return null; + } catch (ParseException pe) { + return pe.getMessage(); + } + } + + /** + * Gets next execution. + * + * @param cronExpression the cron expression + * @return the next execution + */ + public static Date getNextExecution(String cronExpression) { + try { + CronExpression cron = new CronExpression(cronExpression); + return cron.getNextValidTimeAfter(new Date(System.currentTimeMillis())); + } catch (ParseException e) { + throw new IllegalArgumentException(e.getMessage()); + } + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/QuartzJobInvocationUtil.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/QuartzJobInvocationUtil.java new file mode 100644 index 00000000..e3d47c5b --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/QuartzJobInvocationUtil.java @@ -0,0 +1,175 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.util; + +import cn.hutool.core.annotation.AnnotationUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ReflectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.spring.SpringUtil; +import com.jmsoftware.maf.springcloudstarter.quartz.annotation.QuartzSchedulable; +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import lombok.SneakyThrows; +import lombok.val; +import org.springframework.util.StringUtils; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +/** + * The type Quartz job invocation util. + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/24/2021 11:56 AM + */ +@SuppressWarnings("unused") +public class QuartzJobInvocationUtil { + private QuartzJobInvocationUtil() { + } + + /** + * Invoke method. + * + * @param quartzJobConfiguration the quartz job configuration + */ + @SneakyThrows + public static void invokeMethod(QuartzJobConfiguration quartzJobConfiguration) { + val invokeTarget = quartzJobConfiguration.getInvokeTarget(); + val beanName = getBeanName(invokeTarget); + val methodName = getMethodName(invokeTarget); + val methodParams = getMethodParams(invokeTarget); + + Object bean; + if (!isValidClassName(beanName)) { + bean = SpringUtil.getBean(beanName); + } else { + bean = Class.forName(beanName).getDeclaredConstructor().newInstance(); + } + invokeMethod(bean, methodName, methodParams); + } + + /** + * Invoke method. + * + * @param bean the bean + * @param methodName the method name + * @param methodParams the method params + * @throws SecurityException the security exception + * @throws IllegalArgumentException the illegal argument exception + */ + private static void invokeMethod(Object bean, String methodName, List methodParams) { + val method = ReflectUtil.getMethodByName(bean.getClass(), methodName); + if (!AnnotationUtil.hasAnnotation(method, QuartzSchedulable.class)) { + throw new IllegalStateException( + "The method is not quartz-schedulable. Unable to invoke the method: " + method); + } + if (CollUtil.isNotEmpty(methodParams)) { + ReflectUtil.invoke(bean, methodName, methodParams.toArray()); + } else { + ReflectUtil.invoke(bean, methodName); + } + } + + /** + * Is valid class name boolean. + * + * @param invokeTarget the invoke target + * @return the boolean + */ + public static boolean isValidClassName(String invokeTarget) { + return StringUtils.countOccurrencesOf(invokeTarget, ".") > 1; + } + + /** + * Gets bean name. + * + * @param invokeTarget the invoke target + * @return the bean name + */ + public static String getBeanName(String invokeTarget) { + val beanName = StrUtil.subBefore(invokeTarget, "(", false); + return StrUtil.subBefore(beanName, ".", false); + } + + /** + * Gets method name. + * + * @param invokeTarget the invoke target + * @return the method name + */ + public static String getMethodName(String invokeTarget) { + val methodName = StrUtil.subBefore(invokeTarget, "(", false); + return StrUtil.subAfter(methodName, ".", false); + } + + /** + * Gets method params. + * + * @param invokeTarget the invoke target + * @return the method params + */ + public static List getMethodParams(String invokeTarget) { + val methodStr = StrUtil.subBetween(invokeTarget, "(", ")"); + if (StrUtil.isBlank(methodStr)) { + return Collections.emptyList(); + } + val methodParamArray = methodStr.split(","); + val paramList = new LinkedList(); + for (val s : methodParamArray) { + val trimmedParam = StrUtil.trimToEmpty(s); + // String type + if (StrUtil.contains(trimmedParam, "'")) { + paramList.add(new Object[]{StrUtil.replace(trimmedParam, "'", ""), String.class}); + } + // Boolean type + else if (StrUtil.equals(trimmedParam, "true") || StrUtil.equals(trimmedParam, "false")) { + paramList.add(new Object[]{Boolean.valueOf(trimmedParam), Boolean.class}); + } + // Long type + else if (StrUtil.contains(trimmedParam, "L")) { + paramList.add( + new Object[]{Long.valueOf(StrUtil.subPre(trimmedParam, trimmedParam.length())), Long.class}); + } + // Double type + else if (StrUtil.contains(trimmedParam, "D")) { + paramList.add(new Object[]{Double.valueOf( + StrUtil.subPre(trimmedParam, trimmedParam.length())), Double.class}); + } + // Integer type + else { + paramList.add(new Object[]{Integer.valueOf(trimmedParam), Integer.class}); + } + } + return paramList; + } + + /** + * Get method params type class [ ]. + * + * @param methodParams the method params + * @return the class [ ] + */ + public static Class[] getMethodParamsType(List methodParams) { + val clazz = new Class[methodParams.size()]; + var index = 0; + for (val os : methodParams) { + clazz[index] = (Class) os[1]; + index++; + } + return clazz; + } + + /** + * Get method params value object [ ]. + * + * @param methodParams the method params + * @return the object [ ] + */ + public static Object[] getMethodParamsValue(List methodParams) { + val clazz = new Object[methodParams.size()]; + var index = 0; + for (val os : methodParams) { + clazz[index] = os[0]; + index++; + } + return clazz; + } +} diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/ScheduleUtil.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/ScheduleUtil.java new file mode 100644 index 00000000..27ca3fe7 --- /dev/null +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/quartz/util/ScheduleUtil.java @@ -0,0 +1,138 @@ +package com.jmsoftware.maf.springcloudstarter.quartz.util; + +import cn.hutool.core.util.StrUtil; +import com.jmsoftware.maf.springcloudstarter.quartz.constant.Concurrent; +import com.jmsoftware.maf.springcloudstarter.quartz.constant.MisfirePolicy; +import com.jmsoftware.maf.springcloudstarter.quartz.constant.QuartzJobStatus; +import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; +import com.jmsoftware.maf.springcloudstarter.quartz.job.QuartzDisallowConcurrentExecution; +import com.jmsoftware.maf.springcloudstarter.quartz.job.QuartzJobExecution; +import lombok.extern.slf4j.Slf4j; +import lombok.val; +import org.quartz.*; + +import java.util.Optional; +import java.util.function.BiFunction; + +import static com.jmsoftware.maf.springcloudstarter.quartz.constant.ScheduleConstant.QUARTZ_JOB_CONFIGURATION; + +/** + * The type Schedule util. + * + * @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/24/2021 10:20 AM + */ +@Slf4j +public class ScheduleUtil { + public static final String JOB_DETAIL_POSTFIX = "-job-detail"; + public static final String TRIGGER_POSTFIX = "-trigger"; + public static final BiFunction JOB_DETAIL_NAME_OPERATOR = + (jobId, serviceName) -> String.format("%s#%d%s", serviceName, jobId, JOB_DETAIL_POSTFIX); + public static final BiFunction TRIGGER_NAME_OPERATOR = + (jobId, serviceName) -> String.format("%s#%d%s", serviceName, jobId, TRIGGER_POSTFIX); + + private ScheduleUtil() { + } + + /** + * Gets quartz job class. + * + * @param quartzJobConfiguration the sys job + * @return the quartz job class + */ + private static Class getQuartzJobClass(QuartzJobConfiguration quartzJobConfiguration) { + val concurrent = Concurrent.CONCURRENT.getValue().equals(quartzJobConfiguration.getConcurrent()); + return concurrent ? QuartzJobExecution.class : QuartzDisallowConcurrentExecution.class; + } + + /** + * Gets job key. + * + * @param jobId the job id + * @param jobGroup the job group + * @return the job key + */ + public static JobKey getJobKey(Long jobId, String jobGroup, String serviceName) { + return JobKey.jobKey(JOB_DETAIL_NAME_OPERATOR.apply(jobId, serviceName), jobGroup); + } + + /** + * Gets trigger key. + * + * @param jobId the job id + * @param jobGroup the job group + * @return the trigger key + */ + public static TriggerKey getTriggerKey(Long jobId, String jobGroup, String serviceName) { + return TriggerKey.triggerKey(TRIGGER_NAME_OPERATOR.apply(jobId, serviceName), jobGroup); + } + + /** + * Create schedule job. + * + * @param scheduler the scheduler + * @param quartzJobConfiguration the quartz job configuration + * @throws SchedulerException the scheduler exception + */ + public static JobDetail createScheduleJob(Scheduler scheduler, + QuartzJobConfiguration quartzJobConfiguration, + String serviceName) throws SchedulerException { + if (!StrUtil.equals(quartzJobConfiguration.getServiceName(), serviceName)) { + log.warn("The service name is not equal to quartzJobConfiguration's serviceName. serviceName: {}, {}", + serviceName, quartzJobConfiguration); + return null; + } + val jobClass = getQuartzJobClass(quartzJobConfiguration); + val jobId = quartzJobConfiguration.getId(); + val jobGroup = quartzJobConfiguration.getGroup(); + val jobDetail = JobBuilder + .newJob(jobClass) + .withIdentity(getJobKey(jobId, jobGroup, serviceName)) + .build(); + jobDetail.getJobDataMap().put(QUARTZ_JOB_CONFIGURATION, quartzJobConfiguration); + val cronScheduleBuilder = handleCronScheduleMisfirePolicy( + quartzJobConfiguration, + CronScheduleBuilder.cronSchedule(quartzJobConfiguration.getCronExpression()) + ); + val trigger = TriggerBuilder + .newTrigger() + .withIdentity(getTriggerKey(jobId, jobGroup, serviceName)) + .withSchedule(cronScheduleBuilder) + .build(); + if (scheduler.checkExists(getJobKey(jobId, jobGroup, serviceName))) { + scheduler.deleteJob(getJobKey(jobId, jobGroup, serviceName)); + } + scheduler.scheduleJob(jobDetail, trigger); + if (QuartzJobStatus.PAUSE.getValue().equals(quartzJobConfiguration.getStatus())) { + scheduler.pauseJob(ScheduleUtil.getJobKey(jobId, jobGroup, serviceName)); + } + return jobDetail; + } + + /** + * Handle cron schedule misfire policy cron schedule builder. + * + * @param job the job + * @param cb the cb + * @return the cron schedule builder + */ + public static CronScheduleBuilder handleCronScheduleMisfirePolicy(QuartzJobConfiguration job, + CronScheduleBuilder cb) { + val misfirePolicy = Optional + .ofNullable(MisfirePolicy.getByValue(job.getMisfirePolicy())) + .orElseThrow(); + switch (misfirePolicy) { + case MISFIRE_INSTRUCTION_SMART_POLICY: + return cb; + case MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY: + return cb.withMisfireHandlingInstructionIgnoreMisfires(); + case MISFIRE_INSTRUCTION_FIRE_ONCE_NOW: + return cb.withMisfireHandlingInstructionFireAndProceed(); + case MISFIRE_INSTRUCTION_DO_NOTHING: + return cb.withMisfireHandlingInstructionDoNothing(); + default: + throw new IllegalArgumentException( + String.format("The task misfire policy '%s' cannot be used in cron schedule tasks", + job.getMisfirePolicy())); + } + } +} diff --git a/spring-cloud-starter/src/main/resources/mapper/.placeholder b/spring-cloud-starter/src/main/resources/mapper/.placeholder new file mode 100644 index 00000000..e69de29b diff --git a/spring-cloud-starter/src/main/resources/mapper/quartz/QuartzJobConfigurationMapper.xml b/spring-cloud-starter/src/main/resources/mapper/quartz/QuartzJobConfigurationMapper.xml new file mode 100644 index 00000000..f8418dfa --- /dev/null +++ b/spring-cloud-starter/src/main/resources/mapper/quartz/QuartzJobConfigurationMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id, `name`, `group`, service_name, invoke_target, cron_expression, misfire_policy, concurrent, + description, `status`, created_by, created_time, modified_by, modified_time, deleted + +