-
大小: 1.44MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-08-30
- 语言: 其他
- 标签: springboot
资源简介
在springboot中通过读取数据库的定时任务信息,动态生成quartz定时任务
代码片段和文件信息
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License Version 2.0 (the
“License“); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing
software distributed under the License is distributed on an
“AS IS“ BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.util.Properties;
public class MavenWrapperDownloader {
/**
* Default URL to download the maven-wrapper.jar from if no ‘downloadUrl‘ is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL =
“https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar“;
/**
* Path to the maven-wrapper.properties file which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
“.mvn/wrapper/maven-wrapper.properties“;
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
“.mvn/wrapper/maven-wrapper.jar“;
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = “wrapperUrl“;
public static void main(String args[]) {
System.out.println(“- Downloader started“);
File baseDirectory = new File(args[0]);
System.out.println(“- Using base directory: “ + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if (mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL url);
} catch (IOException e) {
Syste
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 277 2019-02-24 15:47 quartz02\.gitignore
文件 48337 2019-02-24 15:47 quartz02\.mvn\wrapper\maven-wrapper.jar
文件 116 2019-02-24 15:47 quartz02\.mvn\wrapper\maven-wrapper.properties
文件 4628 2019-02-24 15:48 quartz02\.mvn\wrapper\MavenWrapperDownloader.java
文件 789 2019-02-24 15:47 quartz02\HELP.md
文件 9113 2019-02-24 15:47 quartz02\mvnw
文件 5810 2019-02-24 15:47 quartz02\mvnw.cmd
文件 5172 2019-02-25 10:59 quartz02\pom.xm
文件 11062 2019-02-24 16:28 quartz02\quartz02.iml
文件 833 2019-02-25 15:21 quartz02\src\main\java\com\zking\quartz02\config\MyWebAppConfigurer.java
文件 5802 2019-02-25 16:20 quartz02\src\main\java\com\zking\quartz02\controller\FtlController.java
文件 671 2019-02-24 16:55 quartz02\src\main\java\com\zking\quartz02\mapper\ScheduleTriggerMapper.java
文件 4115 2019-02-24 16:49 quartz02\src\main\java\com\zking\quartz02\mapper\ScheduleTriggerMapper.xm
文件 775 2019-02-24 16:55 quartz02\src\main\java\com\zking\quartz02\mapper\ScheduleTriggerParamMapper.java
文件 3960 2019-02-24 16:50 quartz02\src\main\java\com\zking\quartz02\mapper\ScheduleTriggerParamMapper.xm
文件 1328 2019-02-24 16:31 quartz02\src\main\java\com\zking\quartz02\model\ScheduleTrigger.java
文件 1253 2019-02-24 16:31 quartz02\src\main\java\com\zking\quartz02\model\ScheduleTriggerParam.java
文件 539 2019-02-25 08:59 quartz02\src\main\java\com\zking\quartz02\quartz\MyJob.java
文件 797 2019-02-25 09:02 quartz02\src\main\java\com\zking\quartz02\quartz\MyJob1.java
文件 657 2019-02-25 09:01 quartz02\src\main\java\com\zking\quartz02\quartz\MyJob2.java
文件 1066 2019-02-25 09:30 quartz02\src\main\java\com\zking\quartz02\quartz\MyJobFactory.java
文件 1761 2019-02-24 16:46 quartz02\src\main\java\com\zking\quartz02\quartz\QuartzConfiguration.java
文件 546 2019-02-25 10:26 quartz02\src\main\java\com\zking\quartz02\Quartz02Application.java
文件 902 2019-02-25 15:49 quartz02\src\main\java\com\zking\quartz02\service\impl\OutScheduleTriggerServiceImpl.java
文件 807 2019-02-24 16:58 quartz02\src\main\java\com\zking\quartz02\service\impl\ScheduleTriggerParamServiceImpl.java
文件 5034 2019-02-25 08:44 quartz02\src\main\java\com\zking\quartz02\service\impl\ScheduleTriggerServiceImpl.java
文件 435 2019-02-24 16:58 quartz02\src\main\java\com\zking\quartz02\service\ScheduleTriggerParamService.java
文件 517 2019-02-25 15:49 quartz02\src\main\java\com\zking\quartz02\service\ScheduleTriggerService.java
文件 6543 2019-02-24 16:36 quartz02\src\main\java\com\zking\quartz02\util\DruidConnectionProvider.java
文件 3497 2019-02-25 10:05 quartz02\src\main\resources\application.yml
............此处省略336个文件信息
相关资源
- SpringBoot+mybatis登录注册及其账号密码
- SpringBoot-mybatis登录、注册、拦截器、
- SpringBoot+Mybatis+前端页面 CRUD 整合案例
- redis学习笔记+练习springboot-redisdemo
- springBoot全教程
- 基于springboot实现的文件上传
- springboot + shiro + mybatis-plus + beetl后台管
- apollo配置中心的配置和使用
- springboot2.x 集成activiti5.22+ modeler可视化
- springboot框架电商项目
- 使用springboot方式简单集成支付宝支付
- 1119509SpringBoot笔记.zip
- SpringBoot+Mybatis+SpringSecurity+JWT
- 41_springboot二手交易市场实现.zip
- vue-springboot.rar
- springboot+vue前后端完整demo.zip
- 海康威视sdk二次开发基于springboot报警
- 201801020105-孟涛.rar
- SpringBoot+Mabatis实战App信息管理系统
- 网上商城前台后台+angular-springboot-mo
- SpringBoot利用Spring-Data-Jpa操作数据库
- 毕业设计:基于SpringBoot框架的动吧旅
- Spring Boot 实战,中文版+英文版+源码
- springboot+springmvc+mybatis+layui实现登录用
- springboot整合springcloud
- 酒店推荐系统.zip
- Springboot商城后台管理系统
- springboot个人微博开发项目
- springboot rabbitmq 模拟高并发秒杀系统
- 基于Springboot+Mybatis打造接口自动化测
评论
共有 条评论