解决 redis 和 mysql 在单元测试会报错的问题
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
package cn.iocoder.dashboard.config;
|
||||
|
||||
import org.mockito.Mockito;
|
||||
import org.quartz.impl.StdScheduler;
|
||||
import org.quartz.Scheduler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
|
||||
@Configuration
|
||||
@Lazy(false)
|
||||
public class QuartzTestConfiguration {
|
||||
|
||||
@Bean
|
||||
public StdScheduler scheduler() {
|
||||
return Mockito.mock(StdScheduler.class);
|
||||
public Scheduler scheduler() {
|
||||
return Mockito.mock(Scheduler.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user