一、该问题的重现步骤是什么?
新增配置类,并注入userMapper.
2. 启动定时任务,执行对应方法
二、你期待的结果是什么?实际看到的又是什么?
测试邮件能顺利发送成功;调用userMapper的方法报错空指针异常。
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
2.7 bladex ,springcloud版本,在centos7上
四、请提供详细的错误堆栈信息,这很重要。
2021-03-23 10:52:00.652 ERROR 30704 --- [sync-scheduler1] o.s.c.b.c.BladeExecutorConfiguration : Unexpected scheduler exception
java.lang.NullPointerException: null
at org.springblade.system.user.config.EmailTimingConfiguration.scheduleTestSendEmail(EmailTimingConfiguration.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端