You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "yqbboy (via GitHub)" <gi...@apache.org> on 2023/06/08 06:47:30 UTC
[GitHub] [shardingsphere-elasticjob] yqbboy opened a new issue, #2228: elasticjob-lite哪个版本支持springboot3+版本?
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] linghengqian closed issue #2228: elasticjob-lite哪个版本支持springboot3+版本?
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian closed issue #2228: elasticjob-lite哪个版本支持springboot3+版本?
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2228
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] linghengqian commented on issue #2228: elasticjob-lite哪个版本支持springboot3+版本?
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #2228:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2228#issuecomment-1634076581
- It has not yet been released. You can manually add several files to your project's META-INF as described in https://github.com/apache/shardingsphere-elasticjob/issues/2214#issuecomment-1581977605 .
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org