quartz.enabled = true
spring.application.name=scheduler-service
#logger
logging.config=classpath:logger/logback-boot.xml
# http port
#server.port=9001
#dubbo
dubbo.port=20212
dubbo.host=127.0.0.1
#zookeeper
env.host.zookeeper=192.168.92.128
zookeeper.address=zookeeper://${env.host.zookeeper}:2181?timeout=20000
#spring.main.web-environment=false
#db
env.host.db=127.0.0.1
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc\:mysql\://${env.host.db}\:3306/scheduler?useUnicode\=true&characterEncoding\=UTF-8&&useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=20&serverTimezone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=root
#Specify the DBMS
spring.jpa.database = MYSQL
#Show or not log for each sql query
spring.jpa.show-sql = true
#Hibernate ddl auto (create, create-drop, update)
spring.jpa.hibernate.ddl-auto = none
#Naming strategy
spring.jpa.hibernate.naming.strategy= org.hibernate.cfg.ImprovedNamingStrategy
#stripped before adding them to the entity manager
#spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5Dialect
dubbo.xml (不使用dubbo调用微服务可以暂时不用)
DubboConfig.java(这里先注释掉)
package com.wl.service.scheduler.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
/**
* Created by Administrator on 2020/7/12.
*/
@Configuration
@ImportResource(locations = "classpath:dubbo/dubbo.xml")
public class DubboConfig {
}
package com.wl.service.scheduler.model;
import javax.persistence.*;
import java.util.Date;
/**
* Created by Administrator on 2020/7/15.
*/
@Entity
@Table(name = "task")
public class Task {
private Integer id; //id
private String name; //任务名称
private String description; //任务描述
private String cronTriggerText; //触发器描述
private String cronTriggerExpression; //触发表达式
private String jobName; //定时任务名
private String jobGroup; //定时任务组
private String jobClass; //对应Job实现类的全路径
//==============================job执行后 回调参数 listener
private Date prevFireTime; //上次执行时间
private Date thisFireTime; //当前执行时间
private Date nextFireTime; //下次执行时间
private Date startTime; //开始执行时间
private Date endTime; //任务结束时间 为空 不结束
private Integer exceptionCount; //异常次数
private Integer executedCount; //执行次数
private Integer stateType; //状态
private Date createTime; //创建时间
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Column(name = "cron_trigger_text")
public String getCronTriggerText() {
return cronTriggerText;
}
public void setCronTriggerText(String cronTriggerText) {
this.cronTriggerText = cronTriggerText;
}
@Column(name = "cron_trigger_expression")
public String getCronTriggerExpression() {
return cronTriggerExpression;
}
public void setCronTriggerExpression(String cronTriggerExpression) {
this.cronTriggerExpression = cronTriggerExpression;
}
@Column(name = "job_name")
public String getJobName() {
return jobName;
}
public void setJobName(String jobName) {
this.jobName = jobName;
}
@Column(name = "job_group")
public String getJobGroup() {
return jobGroup;
}
public void setJobGroup(String jobGroup) {
this.jobGroup = jobGroup;
}
@Column(name = "job_class")
public String getJobClass() {
return jobClass;
}
public void setJobClass(String jobClass) {
this.jobClass = jobClass;
}
@Column(name = "prev_fire_time")
public Date getPrevFireTime() {
return prevFireTime;
}
public void setPrevFireTime(Date prevFireTime) {
this.prevFireTime = prevFireTime;
}
@Column(name = "this_fire_time")
public Date getThisFireTime() {
return thisFireTime;
}
public void setThisFireTime(Date thisFireTime) {
this.thisFireTime = thisFireTime;
}
@Column(name = "next_fire_time")
public Date getNextFireTime() {
return nextFireTime;
}
public void setNextFireTime(Date nextFireTime) {
this.nextFireTime = nextFireTime;
}
@Column(name = "start_time")
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
@Column(name = "end_time")
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
@Column(name = "exception_count")
public Integer getExceptionCount() {
return exceptionCount;
}
public void setExceptionCount(Integer exceptionCount) {
this.exceptionCount = exceptionCount;
}
@Column(name = "executed_count")
public Integer getExecutedCount() {
return executedCount;
}
public void setExecutedCount(Integer executedCount) {
this.executedCount = executedCount;
}
@Column(name = "state_type")
public Integer getStateType() {
return stateType;
}
public void setStateType(Integer stateType) {
this.stateType = stateType;
}
@Column(name = "create_time")
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
ITaskRepository.java
package com.wl.service.scheduler.repository;
import com.wl.service.scheduler.model.Task;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import java.util.Date;
/**
* Created by Administrator on 2020/7/16.
*/
public interface ITaskRepository extends JpaRepository,JpaSpecificationExecutor {
@Modifying
@Query("update Task o set o.stateType=?3 where o.jobName=?1 and o.jobGroup=?2")
void updateTaskStatus(String jobName, String jobGroup, Integer value);
@Modifying
@Query("update Task o set o.prevFireTime = ?3 ,o.thisFireTime=?4,o.nextFireTime=?5,o.stateType=?6 where o.jobName=?1 and o.jobGroup=?2")
void updateTaskStatusAndFireTime(String jobName, String jobGroup, Date prevTime, Date thisTime, Date nextTime, Integer status);
@Modifying
@Query("update Task o set o.prevFireTime = ?3 ,o.thisFireTime=?4,o.nextFireTime=?5,o.stateType=?6 ,o.executedCount=o.executedCount+1 where o.jobName=?1 and o.jobGroup=?2")
void updateTaskStatusAndFireTimeAddExecuteCount(String jobName, String jobGroup, Date prevTime, Date thisTime, Date nextTime, Integer status);
}
ApplicationBeanUtil.java
package com.wl.service.scheduler.quartz.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* Created by wl on 2018/4/2.
*/
@Component
public class ApplicationBeanUtil implements ApplicationContextAware {
private static final Logger logger = LoggerFactory.getLogger(ApplicationBeanUtil.class);
private static ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
ApplicationBeanUtil.applicationContext = applicationContext;
}
//
public static T getBean(Class t){
T bean = null;
if(applicationContext != null) {
try {
bean = applicationContext.getBean(t);
}catch (BeansException e){
logger.error("通过类型获取bean失败",e);
}
if (bean == null) {
bean = getBean(getSimpleClassName(t.getSimpleName()),t);
}
}
return bean;
}
//
public static T getBean(String name,Class t){
if(applicationContext != null) {
try {
return applicationContext.getBean(name, t);
}catch (BeansException e){
logger.error("通过类名和类型获取bean失败",e);
}
}
return null;
}
private static String getSimpleClassName(String simpleName) {
return (simpleName.substring(0,1)).toLowerCase() + simpleName.substring(1);
}
// public static void main(String[] args) {
// System.out.println(ApplicationBeanUtil.getSimpleClassName(ApplicationBeanUtil.class.getSimpleName()));
// }
}
2020-07-16 11:58:56,931 INFO (StartupInfoLogger.java:57)- Started TestApplication in 3.934 seconds (JVM running for 4.548)
Hibernate: select task0_.id as id1_0_0_, task0_.create_time as create_t2_0_0_, task0_.cron_trigger_expression as cron_tri3_0_0_, task0_.cron_trigger_text as cron_tri4_0_0_, task0_.description as descript5_0_0_, task0_.end_time as end_time6_0_0_, task0_.exception_count as exceptio7_0_0_, task0_.executed_count as executed8_0_0_, task0_.job_class as job_clas9_0_0_, task0_.job_group as job_gro10_0_0_, task0_.job_name as job_nam11_0_0_, task0_.name as name12_0_0_, task0_.next_fire_time as next_fi13_0_0_, task0_.prev_fire_time as prev_fi14_0_0_, task0_.start_time as start_t15_0_0_, task0_.state_type as state_t16_0_0_, task0_.this_fire_time as this_fi17_0_0_ from task task0_ where task0_.id=?
Hibernate: insert into task (create_time, cron_trigger_expression, cron_trigger_text, description, end_time, exception_count, executed_count, job_class, job_group, job_name, name, next_fire_time, prev_fire_time, start_time, state_type, this_fire_time) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2020-07-16 11:58:57,034 INFO (SchedulerUtil.java:51)- add job to schedule jobName:更改订单状态 jobGroup:订单
2020-07-16 11:58:57,052 INFO (SchedulerUtil.java:64)- execute job jobName:更改订单状态 jobGroup:订单
2020-07-16 11:59:00,016 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 11:59:00,043 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 11:59:00,046 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 11:59:10,012 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 11:59:10,020 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 11:59:10,028 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
Disconnected from the target VM, address: '127.0.0.1:63761', transport: 'socket'
2020-07-16 13:56:16,391 INFO (SchedulerFactoryBean.java:645)- Starting Quartz Scheduler now
2020-07-16 13:56:16,408 INFO (DruidDataSource.java:922)- {dataSource-1} inited
2020-07-16 13:56:16,444 INFO (JobStoreSupport.java:3629)- ClusterManager: detected 1 failed or restarted instances.
2020-07-16 13:56:16,445 INFO (JobStoreSupport.java:3488)- ClusterManager: Scanning for instance "ILML1N09A7L7UC31594878612915"'s failed in-progress jobs.
2020-07-16 13:56:16,453 INFO (QuartzScheduler.java:547)- Scheduler schedulerFactoryBean_$_ILML1N09A7L7UC31594878975262 started.
2020-07-16 13:56:16,457 INFO (JobStoreSupport.java:973)- Handling 1 trigger(s) that missed their scheduled fire-time.
2020-07-16 13:56:16,463 INFO (StartupInfoLogger.java:57)- Started TestApplication in 3.929 seconds (JVM running for 4.558)
Hibernate: select task0_.id as id1_0_0_, task0_.create_time as create_t2_0_0_, task0_.cron_trigger_expression as cron_tri3_0_0_, task0_.cron_trigger_text as cron_tri4_0_0_, task0_.description as descript5_0_0_, task0_.end_time as end_time6_0_0_, task0_.exception_count as exceptio7_0_0_, task0_.executed_count as executed8_0_0_, task0_.job_class as job_clas9_0_0_, task0_.job_group as job_gro10_0_0_, task0_.job_name as job_nam11_0_0_, task0_.name as name12_0_0_, task0_.next_fire_time as next_fi13_0_0_, task0_.prev_fire_time as prev_fi14_0_0_, task0_.start_time as start_t15_0_0_, task0_.state_type as state_t16_0_0_, task0_.this_fire_time as this_fi17_0_0_ from task task0_ where task0_.id=?
重启:
2020-07-16 13:56:20,018 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 13:56:20,034 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 13:56:20,038 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 13:56:30,012 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 13:56:30,016 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 13:56:30,020 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 13:56:40,011 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 13:56:40,020 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 13:56:40,025 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
暂停
Hibernate: update task set state_type=? where job_name=? and job_group=?
重启
2020-07-16 13:57:30,016 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 13:57:30,020 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 13:57:30,023 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 13:57:40,011 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 13:57:40,015 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 13:57:40,019 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 13:57:50,007 INFO (QuartzJobListener.java:43)- 任务 job:更改订单状态 group:订单,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 13:57:50,012 INFO (OrderJob.java:29)- 更改订单状态定时任务执行
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 13:57:50,015 INFO (QuartzJobListener.java:87)- 任务 job:更改订单状态 group:订单 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 13:57:56,638 INFO (AbstractApplicationContext.java:984)- Closing org.springframework.web.context.support.GenericWebApplicationContext@7e276594: startup date [Thu Jul 16 13:56:12 CST 2020]; root of context hierarchy
2020-07-16 13:57:56,639 INFO (DefaultLifecycleProcessor.java:358)- Stopping beans in phase 2147483647
2020-07-16 13:57:56,640 INFO (QuartzScheduler.java:585)- Scheduler schedulerFactoryBean_$_ILML1N09A7L7UC31594878975262 paused.
2020-07-16 13:57:56,641 INFO (SchedulerFactoryBean.java:765)- Shutting down Quartz Scheduler
2020-07-16 13:57:56,641 INFO (QuartzScheduler.java:666)- Scheduler schedulerFactoryBean_$_ILML1N09A7L7UC31594878975262 shutting down.
2020-07-16 13:57:56,641 INFO (QuartzScheduler.java:585)- Scheduler schedulerFactoryBean_$_ILML1N09A7L7UC31594878975262 paused.
2020-07-16 13:57:56,643 INFO (DruidDataSource.java:1817)- {dataSource-1} closed
2020-07-16 13:57:56,643 INFO (QuartzScheduler.java:740)- Scheduler schedulerFactoryBean_$_ILML1N09A7L7UC31594878975262 shutdown complete.
2020-07-16 13:57:56,643 INFO (AbstractEntityManagerFactoryBean.java:548)- Closing JPA EntityManagerFactory for persistence unit 'default'
Disconnected from the target VM, address: '127.0.0.1:64758', transport: 'socket'
2020-07-16 15:50:53,680 INFO (StartupInfoLogger.java:57)- Started Application in 3.11 seconds (JVM running for 3.406)
2020-07-16 15:50:53,680 INFO (Application.java:28)- init SchedulerApplication Success
2020-07-16 15:51:00,183 INFO (QuartzJobListener.java:43)- 任务 job:通用httpJob1 group:httpJob,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 15:51:00,271 INFO (DirectJDKLog.java:179)- Initializing Spring FrameworkServlet 'dispatcherServlet'
2020-07-16 15:51:00,272 INFO (FrameworkServlet.java:489)- FrameworkServlet 'dispatcherServlet': initialization started
2020-07-16 15:51:00,288 INFO (FrameworkServlet.java:508)- FrameworkServlet 'dispatcherServlet': initialization completed in 16 ms
2020-07-16 15:51:00,317 INFO (HttpCommonJob.java:53)- httpJob
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 15:51:00,321 INFO (QuartzJobListener.java:87)- 任务 job:通用httpJob1 group:httpJob 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 15:51:10,021 INFO (QuartzJobListener.java:43)- 任务 job:通用httpJob1 group:httpJob,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 15:51:10,038 INFO (HttpCommonJob.java:53)- httpJob
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 15:51:10,042 INFO (QuartzJobListener.java:87)- 任务 job:通用httpJob1 group:httpJob 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
Disconnected from the target VM, address: '127.0.0.1:49791', transport: 'socket'
package com.wl.service.scheduler.dubbo;
/**
* Created by Administrator on 2020/7/16.
*/
public interface IDubboJobInterface {
String dubboJob(String str);
}
package com.wl.service.scheduler.dubbo;
import com.alibaba.dubbo.config.annotation.Service;
/**
* Created by Administrator on 2020/7/16.
*/
@Service(protocol = "dubbo",version = "1.0.0",group = "dubboJob")
public class DubboJobMicroService implements IDubboJobInterface{
@Override
public String dubboJob(String str) {
System.out.println("======================================" + str);
return str;
}
}
2020-07-16 17:50:18,859 INFO (StartupInfoLogger.java:57)- Started TestApplication in 13.442 seconds (JVM running for 13.994)
Hibernate: update task set state_type=? where job_name=? and job_group=?
Hibernate: select task0_.id as id1_0_0_, task0_.create_time as create_t2_0_0_, task0_.cron_trigger_expression as cron_tri3_0_0_, task0_.cron_trigger_text as cron_tri4_0_0_, task0_.description as descript5_0_0_, task0_.dubbo_detail as dubbo_de6_0_0_, task0_.end_time as end_time7_0_0_, task0_.exception_count as exceptio8_0_0_, task0_.executed_count as executed9_0_0_, task0_.http_detail as http_de10_0_0_, task0_.job_class as job_cla11_0_0_, task0_.job_group as job_gro12_0_0_, task0_.job_name as job_nam13_0_0_, task0_.name as name14_0_0_, task0_.next_fire_time as next_fi15_0_0_, task0_.prev_fire_time as prev_fi16_0_0_, task0_.start_time as start_t17_0_0_, task0_.state_type as state_t18_0_0_, task0_.this_fire_time as this_fi19_0_0_ from task task0_ where task0_.id=?
2020-07-16 17:50:19,048 INFO (SchedulerUtil.java:75)- add job to schedule jobName:通用dubboJob1 jobGroup:dubboJob
Hibernate: update task set create_time=?, cron_trigger_expression=?, cron_trigger_text=?, description=?, dubbo_detail=?, end_time=?, exception_count=?, executed_count=?, http_detail=?, job_class=?, job_group=?, job_name=?, name=?, next_fire_time=?, prev_fire_time=?, start_time=?, state_type=?, this_fire_time=? where id=?
2020-07-16 17:50:19,074 INFO (SchedulerUtil.java:88)- execute job jobName:通用dubboJob1 jobGroup:dubboJob
2020-07-16 17:50:20,035 INFO (QuartzJobListener.java:43)- 任务 job:通用dubboJob1 group:dubboJob,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 17:50:20,046 INFO (DubboCommonJob.java:58)-
serviceInterface:com.wl.service.scheduler.dubbo.IDubboJobInterface
serviceMethod:dubboJob
serviceGroup:dubboJob
serviceVersion:1.0.0
serviceMethodParameter:abcd
serviceMethodAsync:false
serviceMethodReturn:true
2020-07-16 17:50:20,051 INFO (Log4jLogger.java:59)- [DUBBO] Register: consumer://192.168.92.1/com.alibaba.dubbo.rpc.service.GenericService?application=scheduler-service&async=false&category=consumers&check=false&default.async=false&default.check=false&default.retries=0&default.timeout=6000000&dubbo=2.6.0&generic=true&group=dubboJob&interface=com.wl.service.scheduler.dubbo.IDubboJobInterface&pid=11564&side=consumer×tamp=1594893020049&version=1.0.0, dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,054 INFO (Log4jLogger.java:59)- [DUBBO] Subscribe: consumer://192.168.92.1/com.alibaba.dubbo.rpc.service.GenericService?application=scheduler-service&async=false&category=providers,configurators,routers&default.async=false&default.check=false&default.retries=0&default.timeout=6000000&dubbo=2.6.0&generic=true&group=dubboJob&interface=com.wl.service.scheduler.dubbo.IDubboJobInterface&pid=11564&side=consumer×tamp=1594893020049&version=1.0.0, dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,064 INFO (Log4jLogger.java:59)- [DUBBO] Notify urls for subscribe url consumer://192.168.92.1/com.alibaba.dubbo.rpc.service.GenericService?application=scheduler-service&async=false&category=providers,configurators,routers&default.async=false&default.check=false&default.retries=0&default.timeout=6000000&dubbo=2.6.0&generic=true&group=dubboJob&interface=com.wl.service.scheduler.dubbo.IDubboJobInterface&pid=11564&side=consumer×tamp=1594893020049&version=1.0.0, urls: [dubbo://192.168.92.1:20212/com.wl.service.scheduler.dubbo.IDubboJobInterface?anyhost=true&application=scheduler-service&default.retries=0&default.version=1.0.0&dubbo=2.6.0&generic=false&group=dubboJob&interface=com.wl.service.scheduler.dubbo.IDubboJobInterface&methods=dubboJob&pid=11564&revision=1.0.0&side=provider×tamp=1594893009389&version=1.0.0, empty://192.168.92.1/com.alibaba.dubbo.rpc.service.GenericService?application=scheduler-service&async=false&category=configurators&default.async=false&default.check=false&default.retries=0&default.timeout=6000000&dubbo=2.6.0&generic=true&group=dubboJob&interface=com.wl.service.scheduler.dubbo.IDubboJobInterface&pid=11564&side=consumer×tamp=1594893020049&version=1.0.0, empty://192.168.92.1/com.alibaba.dubbo.rpc.service.GenericService?application=scheduler-service&async=false&category=routers&default.async=false&default.check=false&default.retries=0&default.timeout=6000000&dubbo=2.6.0&generic=true&group=dubboJob&interface=com.wl.service.scheduler.dubbo.IDubboJobInterface&pid=11564&side=consumer×tamp=1594893020049&version=1.0.0], dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,092 INFO (Log4jLogger.java:59)- [DUBBO] Successed connect to server /192.168.92.1:20212 from NettyClient 192.168.92.1 using dubbo version 2.6.0, channel is NettyChannel [channel=[id: 0x7b41b504, /192.168.92.1:52528 => /192.168.92.1:20212]], dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,092 INFO (Log4jLogger.java:59)- [DUBBO] Start NettyClient ILML1N09A7L7UC3/192.168.92.1 connect to the server /192.168.92.1:20212, dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,099 INFO (Log4jLogger.java:59)- [DUBBO] Refer dubbo service com.alibaba.dubbo.rpc.service.GenericService from url zookeeper://192.168.92.128:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=scheduler-service&async=false&check=false&default.async=false&default.check=false&default.retries=0&default.timeout=6000000&default.version=1.0.0&dubbo=2.6.0&generic=true&group=dubboJob&interface=com.wl.service.scheduler.dubbo.IDubboJobInterface&methods=dubboJob&pid=11564®ister.ip=192.168.92.1&remote.timestamp=1594893009389&revision=1.0.0&side=consumer×tamp=1594893020049&version=1.0.0, dubbo version: 2.6.0, current host: 192.168.92.1
======================================abcd
2020-07-16 17:50:20,155 INFO (Log4jLogger.java:59)- [DUBBO] Executor for listenablefuture is null, will use default executor!, dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,156 INFO (Log4jLogger.java:59)- [DUBBO] Register: consumer:///com.alibaba.dubbo.monitor.MonitorService?category=consumers&check=false&dubbo=2.6.0&interface=com.alibaba.dubbo.monitor.MonitorService&pid=11564×tamp=1594893009448, dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,157 INFO (DubboCommonJob.java:110)- abcd
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 17:50:20,161 INFO (Log4jLogger.java:59)- [DUBBO] Subscribe: consumer:///com.alibaba.dubbo.monitor.MonitorService?category=providers,configurators,routers&dubbo=2.6.0&interface=com.alibaba.dubbo.monitor.MonitorService&pid=11564×tamp=1594893009448, dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:20,161 INFO (QuartzJobListener.java:87)- 任务 job:通用dubboJob1 group:dubboJob 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
2020-07-16 17:50:20,168 INFO (Log4jLogger.java:59)- [DUBBO] Notify urls for subscribe url consumer:///com.alibaba.dubbo.monitor.MonitorService?category=providers,configurators,routers&dubbo=2.6.0&interface=com.alibaba.dubbo.monitor.MonitorService&pid=11564×tamp=1594893009448, urls: [empty:///com.alibaba.dubbo.monitor.MonitorService?category=providers&dubbo=2.6.0&interface=com.alibaba.dubbo.monitor.MonitorService&pid=11564×tamp=1594893009448, empty:///com.alibaba.dubbo.monitor.MonitorService?category=configurators&dubbo=2.6.0&interface=com.alibaba.dubbo.monitor.MonitorService&pid=11564×tamp=1594893009448, empty:///com.alibaba.dubbo.monitor.MonitorService?category=routers&dubbo=2.6.0&interface=com.alibaba.dubbo.monitor.MonitorService&pid=11564×tamp=1594893009448], dubbo version: 2.6.0, current host: 192.168.92.1
2020-07-16 17:50:30,018 INFO (QuartzJobListener.java:43)- 任务 job:通用dubboJob1 group:dubboJob,即将执行
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=? where job_name=? and job_group=?
2020-07-16 17:50:30,022 INFO (DubboCommonJob.java:58)-
serviceInterface:com.wl.service.scheduler.dubbo.IDubboJobInterface
serviceMethod:dubboJob
serviceGroup:dubboJob
serviceVersion:1.0.0
serviceMethodParameter:abcd
serviceMethodAsync:false
serviceMethodReturn:true
======================================abcd
2020-07-16 17:50:30,024 INFO (DubboCommonJob.java:110)- abcd
Hibernate: update task set state_type=? where job_name=? and job_group=?
2020-07-16 17:50:30,028 INFO (QuartzJobListener.java:87)- 任务 job:通用dubboJob1 group:dubboJob 执行完毕
Hibernate: update task set prev_fire_time=?, this_fire_time=?, next_fire_time=?, state_type=?, executed_count=executed_count+1 where job_name=? and job_group=?
Disconnected from the target VM, address: '127.0.0.1:52506', transport: 'socket'
在网上无意中看到淘宝提交的hotspot patch,共四个,有意思,记录一下。
7050685:jsdbproc64.sh has a typo in the package name
7058036:FieldsAllocationStyle=2 does not work in 32-bit VM
7060619:C1 should respect inline and
CREATE TABLE sessions (
id CHAR(32) NOT NULL,
data TEXT,
last_accessed TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
<?php
/**
* Created by PhpStorm.
* User: michaeldu
* Date
public Vector<CartProduct> delCart(Vector<CartProduct> cart, String id) {
for (int i = 0; i < cart.size(); i++) {
if (cart.get(i).getId().equals(id)) {
cart.remove(i);
问题是首页在火狐、谷歌、所有IE中正常显示,列表页的页面在火狐谷歌中正常,在IE6、7、8中都不中,觉得可能那个地方设置的让IE系列都不认识,仔细查看后发现,列表页中没写HTML模板部分没有添加DTD定义,就是<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3
com.jcraft.jsch.JSchException: Auth cancel
at com.jcraft.jsch.Session.connect(Session.java:460)
at com.jcraft.jsch.Session.connect(Session.java:154)
at cn.vivame.util.ftp.SftpServerAccess.connec
centos p安装
yum -y install tree
mac os安装
brew install tree
首先来看tree的用法
tree 中文解释:tree
功能说明:以树状图列出目录的内容。
语 法:tree [-aACdDfFgilnNpqstux][-I <范本样式>][-P <范本样式
一. 实体类简述
实体类其实就是俗称的POJO,这种类一般不实现特殊框架下的接口,在程序中仅作为数据容器用来持久化存储数据用的
POJO(Plain Old Java Objects)简单的Java对象
它的一般格式就是
public class A{
private String id;
public Str