Hi Sunkai, I have some ideas about your proposal: 1. Could we consider using the annotation without Spring? 2. Could we configure the jobs by annotations only? How to configure the JobExtraConfiguration like TracingConfiguration by annotations? 3. Support using YAML to configure jobs without Spring. This can refer to how ShardingSphere does.
------------------ Sincerely, Weijie Wu (TeslaCN) Apache ShardingSphere sk c <[email protected]> 于2021年8月10日周二 下午3:43写道: > > Hi everyone, > > I prefer to discuss the annotation of ElasticJob plan. > > example: > > ``` > @ElasticScheduled( > cron = "0/5 * * * * ?", > jobName = "SimpleTestJobSecond", > shardingTotalCount = 3, > shardingItemParameters = "0=Beijing,1=Shanghai,2=Guangzhou", > jobListenerTypes = {"NOOP", "LOG"}, > props = { > @ElasticJobProp(key = "print.title", value = "test title"), > @ElasticJobProp(key = "print.content", value = "test > content") > } > ) > public class SimpleTestJob implements CustomJob { > > @Override > public void execute(final ShardingContext shardingContext) { > } > > } > ``` > > ``` > @Configuration > @EnableElastic(scanBasePackages = > "org.apache.shardingsphere.elasticjob.lite.example.job.simple") > public class ElasticConfig { > > } > ``` > > we can look at it on > https://github.com/apache/shardingsphere-elasticjob/pull/1954 > > I am going to work it soon. Please remind me if you have a suggestion. > > > ------------------ > Sincerely, > SunKai Cai (skai)
