博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Quart整合Spring
阅读量:3915 次
发布时间:2019-05-23

本文共 1576 字,大约阅读时间需要 5 分钟。

创建一个简单的maven 项目

在这里插入图片描述

4.0.0
com.etoak.et1904.quartz
quartz-spring
1.0-SNAPSHOT
jar
org.quartz-scheduler
quartz
2.3.0
org.springframework
spring-jdbc
5.0.7.RELEASE
org.springframework
spring-tx
5.0.7.RELEASE
org.springframework
spring-context-support
5.0.7.RELEASE

spring.xml

package com.etoak.job;import java.text.SimpleDateFormat;import java.util.Date;public class SpringJob {    public void executeJob(){        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");        System.out.println("Spring Job~"+simpleDateFormat.format(new Date()));    }}
package com.etoak;import org.springframework.context.support.ClassPathXmlApplicationContext;public class SpringMain {    public static void main(String[] args) {       new ClassPathXmlApplicationContext("spring.xml");    }}

在这里插入图片描述

转载地址:http://pxvrn.baihongyu.com/

你可能感兴趣的文章
设计模式之适配器模式
查看>>
如何利用Gitlab-CI持续部署到远程机器?
查看>>
.NET Core + K8S + Loki 玩转日志聚合
查看>>
ASP.NET Core中的分布式缓存
查看>>
在ASP.NET Core中创建自定义端点可视化图
查看>>
继续分享 5 个实用的 vs 调试技巧
查看>>
五年了,别再把务虚会开 “虚” 了
查看>>
一文看懂"async"和“await”关键词是如何简化了C#中多线程的开发过程
查看>>
每天都在支付,你真的了解信息流和资金流?
查看>>
.Net Core 自定义配置源从配置中心读取配置
查看>>
基于.NetCore3.1系列 —— 日志记录之日志配置揭秘
查看>>
设计模式之享元模式
查看>>
单例模式最佳实践
查看>>
.NET Core + Spring Cloud:服务注册与发现
查看>>
今天你内卷了吗?
查看>>
设计模式之代理模式
查看>>
在 MySQL 中使用码农很忙 IP 地址数据库
查看>>
结构型设计模式总结
查看>>
dotNET:怎样处理程序中的异常(实战篇)?
查看>>
What is 测试金字塔?
查看>>