我正在例外
org.springframework.beans.factory.BeanCreationException:在类路径资源中创建名称为“ quartzScheduler”的bean时出错
谁能帮我解决问题。
我正在使用以下依赖
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
</dependency>
`enter code here`<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我的代码如下
@Configuration
@ComponentScan(
basePackages = {"com.test"},
useDefaultFilters = false,
includeFilters = {
@ComponentScan.Filter(type = FilterType.ANNOTATION, value = Service.class),
@ComponentScan.Filter(type = FilterType.ANNOTATION, value = Component.class)
})
public class QuartzConfig {
// this data source points to the database that contains Quartz tables
@Autowired
private DataSource dataSource;
@Autowired
private PlatformTransactionManager transactionManager;
@Autowired
private ApplicationContext applicationContext;
@Bean
public SchedulerFactoryBean quartzScheduler() {
SchedulerFactoryBean quartzScheduler = new SchedulerFactoryBean(); …Run Code Online (Sandbox Code Playgroud)