yqbboy opened a new issue, #2228:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2228
我目前用的是springboot3.0.5,集成的starter是3.0.3,整体集成完之后,运行无报错,但是job也不能正常运行,以下是我得集成情况:
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-lite-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
```properties
elasticjob.reg-center.server-lists=172.16.51.206:2181
elasticjob.jobs.simpleJob.elastic-job-class=com.test.schedule.SpringBootSimpleJob
elasticjob.jobs.simpleJob.cron=0/5 * * * * ?
elasticjob.jobs.simpleJob.timeZone=GMT+08:00
elasticjob.jobs.simpleJob.sharding-total-count=3
elasticjob.jobs.simpleJob.sharding-item-parameters=0=Beijing,1=Shanghai,2=Guangzhou
```
```java
@Component
public class SpringBootSimpleJob implements SimpleJob {
private final Logger logger =
LoggerFactory.getLogger(SpringBootSimpleJob.class);
@Override
public void execute(final ShardingContext shardingContext) {
logger.info("Item: {} | Time: {} | Thread: {} | {}",
shardingContext.getShardingItem(), new
SimpleDateFormat("HH:mm:ss").format(new Date()),
Thread.currentThread().getId(), "SIMPLE");
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]