apache / shardingsphere-elasticjob

Distributed scheduled job
Apache License 2.0
8.12k stars 3.28k forks source link

ElasticJob Not compatible with mybatis #2398

Closed pingguanfei closed 1 month ago

pingguanfei commented 3 months ago
<dependency>
    <groupId>org.apache.shardingsphere.elasticjob</groupId>
    <artifactId>elasticjob-lite-spring-boot-starter</artifactId>
    <version>3.0.3</version>
</dependency>
<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
        <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>2.2.2</version>
</dependency>

2024-06-07 18:43:33.033 INFO 43444 --- [ main] com.afclab.AfcApplication : No active profile set, falling back to 1 default profile: "default" 2024-06-07 18:43:33.552 INFO 43444 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=650b6965-bd0a-398f-b070-2d1580698bb3 2024-06-07 18:43:33.614 WARN 43444 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'demoJOB': Unsatisfied dependency expressed through field 'demoMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.afclab.elasticjob.mapper.DemoMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 2024-06-07 18:43:33.627 INFO 43444 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2024-06-07 18:43:33.707 ERROR 43444 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field demoMapper in com.afclab.elasticjob.controller.DemoJOB required a bean of type 'com.afclab.elasticjob.mapper.DemoMapper' that could not be found.

The injection point has the following annotations:

Action:

Consider defining a bean of type 'com.afclab.elasticjob.mapper.DemoMapper' in your configuration.

linghengqian commented 2 months ago
linghengqian commented 1 month ago

Closed because it could not be reproduced.